Do JavaScript customizations have to go in the "script" field on the customization pa

jfriendjfriend Registered Users Posts: 8,097 Major grins
edited July 27, 2005 in SmugMug Support
When customzing your page, is there any difference between putting <script>xxx</script> stuff in the header versus putting the actual JavaScript in the "script" section of the customization page without script tags around it?

Is the script field in the customization page just a convenience to save me using my own <script> tags or is there some advantage to putting script stuff there?

I ask because I've got a piece of working JavaScript I got from somewhere else that includes <script> and <noscript> tags and I put it in the header field in the customization dialog. It seems to be working fine, but I'm wondering if there's any problem with this?

--John
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • {JT}{JT} Registered Users Posts: 1,016 Major grins
    edited July 27, 2005
    Technically there is no problem on where you put the code. You will notice on several different pages in the site (the cart for sure), where I have had to put javascript mixed in with regular code and not in the header. As long as you reference the code once the page has loaded, or the content you want has been loaded, then it should work.
    jfriend wrote:
    When customzing your page, is there any difference between putting <script>xxx</script> stuff in the header versus putting the actual JavaScript in the "script" section of the customization page without script tags around it?

    Is the script field in the customization page just a convenience to save me using my own <script> tags or is there some advantage to putting script stuff there?

    I ask because I've got a piece of working JavaScript I got from somewhere else that includes <script> and <noscript> tags and I put it in the header field in the customization dialog. It seems to be working fine, but I'm wondering if there's any problem with this?

    --John
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited July 27, 2005
    Thanks.
    {JT} wrote:
    Technically there is no problem on where you put the code. You will notice on several different pages in the site (the cart for sure), where I have had to put javascript mixed in with regular code and not in the header. As long as you reference the code once the page has loaded, or the content you want has been loaded, then it should work.
    Thanks.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
Sign In or Register to comment.