becca

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 35 total)
  • Author
    Posts
  • in reply to: Code throwing errors selectively #26720

    becca
    Participant

    Side effect of being new to js and getting references from multiple different sources is code not being designed cohesively, I’ll clean up my code using this and let you know if I’m still getting errors. Thanks a ton 🙂

  • in reply to: spjs.dffs.dlgBox #26124

    becca
    Participant

    Got it, I moved one bracket out of place. Oh the joys of coding, one character off but not in an error-throwing way can cause so much headache. This works, now just to add this button press to my redirection navigation exceptions and I’m done with this story.

    Thanks for getting my morning off to a good start.

  • in reply to: spjs.dffs.dlgBox #26109

    becca
    Participant

    I think the issue is the return false in the PreSaveAction, since other events in the PreSaveAction are running before getting caught on that line. Seems like bad practice. What I’m going to try next is replace the Submit button with a matching clone that triggers the dlg if needed or goes straight to triggerSave otherwise, and see if putting a triggerSave in the dlg btnOK works that way.

  • in reply to: spjs.dffs.dlgBox #26107

    becca
    Participant

    No dice, didn’t change a thing

  • in reply to: spjs.dffs.dlgBox #26086

    becca
    Participant

    I have the misc tab set to give me the yellow notification bar for missed required fields and I double checked my js for the only changes made with this addition so that’s not the problem. If it was I wouldn’t get to PreSaveAction in the first place.

    On load

    Resource interpreted as Document but transferred with MIME type
    clienttemplates.js?r…jz4PK%2FeWg%3D%3D:1 image/gif: “http://sharepoint4.company.com/_layouts/15/images/blank.gif?rev=23”

    Resource interpreted as Document but transferred with MIME type image/gif: “http://sharepoint4.company.com/_layouts/15/images/blank.gif?rev=38”

    With both jquery.js:3 and jquery.js:4

    [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.

    With jquery.js:4

    and nothing new when I save

  • in reply to: spjs.dffs.dlgBox #26075

    becca
    Participant

    I’ve swapped a few different save attempts in and none have worked and returned so far.

    
    
    function customCloseFunc() {
        var inff = $("#info").val(); var houu = $("#hours").val();
        if (inff !== "" && houu !== ""){
            setFieldValue('field1', inff); setFieldValue('field2', houu);
            spjs.dffs.closeDlg();
            alrtOKd = true;
            spjs.dffs.processEmailTemplate("email"); //this does run
            //jQspjs("input[id$='diidIOSaveItem']:last").trigger("click");
            //$("input[id$='diidIOSaveItem']:last").trigger("click");
            //spjs.dffs.triggerSave();
            //return true;
        }
        else{
            if (inff === ""){$("#formVal1").show();}else{$("#formVal1").hide();}
            if (houu === ""){$("#formVal2").show();}else{$("#formVal2").hide();}
        }
    }
    
    var alrtOKd = false;
    function PreSaveAction() {
        //
        //just a whole bunch of other checks and emails
        //
        if (getFieldValue('Complete') === true){
            if (!alrtOKd){
                spjs.dffs.alert({
                    "title":"blah",
                    "msg":"important parts are <textarea id='info></textarea> <div id='formVal1'> <input type='number'> <div id='formVal2'> <input type='button' class='spjs-dlg-btnOK' onclick='customCloseFunc' value='Save'> <input type='button' class='spjs-dlg-cancelOK' onclick='spjs.dffs.closeDlg();' value='Cancel Save'>",
                    "noBtn":true
                });
            }
            return false;
        }
        return true;
    }

    Everything else works correctly, just the save and return will not happen.
    *sorry for all the edits, coding in vba too so I kept using ‘ instead of // and messing everything up

    • This reply was modified 2 months ago by  becca.
    • This reply was modified 2 months ago by  becca.
    • This reply was modified 2 months ago by  becca.
  • in reply to: spjs.dffs.dlgBox #26073

    becca
    Participant

    Updated to the most recent version and it still is not working

  • in reply to: Get ID on New Item Save #26063

    becca
    Participant

    So not sure what is up with this right now, when I last responded it took me directly to the item but now both view and edit are taking me to a list view filtered to only the item, or all items with the same name. I tried this on 2 separate sites and they’re both taking me to a list view now for links from new items, did I mess something up?

  • in reply to: spjs.dffs.dlgBox #26061

    becca
    Participant

    Backend v4.4.3.58 css v.4.46 spjs.utility v1.328

  • in reply to: spjs.dffs.dlgBox #26051

    becca
    Participant

    Related to my post from yesterday, I have this set up and tried both the trigger.(“click”) and triggerSave and neither makes presaveaction run again, then I can’t click submit again

  • in reply to: Get ID on New Item Save #25874

    becca
    Participant

    Awesome work-around, thanks.

  • in reply to: Add CSS to E-Mail and Print #25856

    becca
    Participant

    I got it to work as a link but the only styling it keeps is the text color, text size, and text background color. In w3school’s editor it looks correct though. I think I’ll have to change it to an image with a link, little bit of a bummer since I wanted the nice click function, but emails are not kind.

    Thanks for your help per usual

  • in reply to: Add CSS to E-Mail and Print #25853

    becca
    Participant

    I switched it to be inline but now I just get the button text :\


  • becca
    Participant

    Works perfectly, thanks.

  • in reply to: Having issues hiding a sbs label #25428

    becca
    Participant

    Okay, so to use it the way I want I would have to put the first reference to the sbs in a function dffs_ready(){} before continuing with my code. That makes a lot of sense since with my rules solution I have to use dffs_ready with my first reference to the rule. This actually helps me understand dffs as a whole a bit better, thanks a ton.

Viewing 15 posts - 1 through 15 (of 35 total)