Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 16th, 2012, 6:42 PM   #1
jzp253
Intermediate Programmer
 
jzp253's Avatar
 
Join Date: May 2011
Location: Sumner, Wa
Posts: 440
Rep Power: 6 jzp253 is on a distinguished road
HTML5 script

I just did a little drag and drop thingy and this time we put the script outside the body. Then I tested putting it inside. came up with same results but, would there be a time where it would matter when the script is read? or how does a compiler run HTML5 does it run the program by going down line by line or does it run it after it's all been compiled so it doesn't matter the order?
__________________
You only get as far as your try.
jzp253 is offline   Reply With Quote
Old Jul 17th, 2012, 1:52 AM   #2
SteveO
Hobby Programmer
 
SteveO's Avatar
 
Join Date: Nov 2010
Location: Texas
Posts: 693
Rep Power: 7 SteveO is on a distinguished road
Re: HTML5 script

If possible, it would be better to write scripts in a separate folder and then link them to the page as you need them...at least that's what I do since I use quite a bit of Javascript and it works better to edit one source file instead of multiple <script> sections on however many pages I have. I always load scripts using the async attribute, but you could use the defer attribute as well. It honestly doesn't *really* matter where the scripts are put, but convention is that they usually are put in the <head> or <body> sections (usually before or after all markup in the <body> section). You either want to load scripts before or after all content has been loaded, but I choose to load it asynchronously just because it saves some time at the expense of slightly slower page loading times for as large of pages as I work with right now with my university.
__________________
"I have no special talent. I am only passionately curious."
SteveO is offline   Reply With Quote
Old Jul 17th, 2012, 2:24 AM   #3
jzp253
Intermediate Programmer
 
jzp253's Avatar
 
Join Date: May 2011
Location: Sumner, Wa
Posts: 440
Rep Power: 6 jzp253 is on a distinguished road
Re: HTML5 script

Thanks this actually helped. rep +

Edit: lol nvm no rep + already gave u rep + lol maybe next time
__________________
You only get as far as your try.
jzp253 is offline   Reply With Quote
Old Dec 14th, 2012, 8:13 AM   #4
amitmax
Newbie
 
Join Date: Oct 2010
Posts: 22
Rep Power: 0 amitmax is an unknown quantity at this point
Re: HTML5 script

HTML 5 defines text/javascript as the default, and you'd be hard pressed to find a browser that didn't treat it as such. So you can omit it.

Refer Link: http://stackoverflow.com/questions/5...t-declarations
__________________
For any CMS development based queries, feel free to discuss with our CMS experts today.
amitmax is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script Tasks Icostyle Bash / Shell Scripting 1 Jan 16th, 2012 3:20 PM
Remote Copy Script effektd Bash / Shell Scripting 0 Apr 12th, 2011 9:18 AM
applying the "watch" command to a script yan Bash / Shell Scripting 0 Apr 22nd, 2010 3:19 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:22 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC