PDA

View Full Version : Do JavaScript customizations have to go in the "script" field on the customization pa


jfriend
Jul-27-2005, 04:36 PM
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

{JT}
Jul-27-2005, 07:35 PM
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.

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

jfriend
Jul-27-2005, 07:44 PM
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.