Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Javascript in head of CMS

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 965 Views
  • aarono
    Avatar
    Community Member
    34 Posts

    Javascript in head of CMS Link to this post

    Hi guys

    Im getting a very odd issue when using Safari (Firefox, Chrome and IE seem to be fine). If i login to the cms, then jump from section to section (Files & Images, Custom ModelAdmin), sometimes I will get a block of JS appear at the top:

    his.validate(); } }, '#Form_EditForm input' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } if(!this.old_onfocus) this.old_onfocus = function() { return true; } }, onblur : function() { if(this.old_onblur()) { // Don't perform instant validation for CalendarDateField fields; it creates usability wierdness. if(this.parentNode.className.indexOf('calendardate') == -1 || this.value) { return $('Form_EditForm').validate(this); } else { return true; } } } }, '#Form_EditForm textarea' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } if(!this.old_onfocus) this.old_onfocus = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditForm').validate(this); } } }, '#Form_EditForm select' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditForm').validate(this); } } } }); //]]>

    I have tracked this down to being inside sapphire/forms/Validator.php, but I cant figure out why it would print to the browser.

    Anyone run into this issue or have any ideas?

    Screenshot attached.

    Thanks
    Aaron

    Attached Files
  • aarono
    Avatar
    Community Member
    34 Posts

    Re: Javascript in head of CMS Link to this post

    Anyone?

  • neilcreagh
    Avatar
    Community Member
    94 Posts

    Re: Javascript in head of CMS Link to this post

    I saw this message from Willr on another post "Make sure all your files uploaded successfully and then try reload the cms - yoursite.com/admin?flush=1"

    The message disappeared for me when I flushed the admin section.

  • aarono
    Avatar
    Community Member
    34 Posts

    Re: Javascript in head of CMS Link to this post

    Yea it does go away if you flush, but it will come back after a few clicks (I dont want to make my clients flush=1 every time).

    965 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.