| | |
external javascript
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
Save your script in a file with a ".js" extension, for example, "myExternal.js" Do NOT put <script> tags in the file. In your HTML, you reference the file:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<SCRIPT language="JavaScript" SRC="myExternal.js"></SCRIPT>
•
•
•
•
Originally Posted by tgreer
Save your script in a file with a ".js" extension, for example, "myExternal.js" Do NOT put <script> tags in the file. In your HTML, you reference the file:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<SCRIPT language="JavaScript" SRC="myExternal.js"></SCRIPT>
Actually, my problem isn't in the html document. I don't have a clue as to how to format the javascript file. Is it done like the external CSS?
Also, I read that FireFox doesn't recognize external js. What I was reading though was written in October and FireFox has updated twice since then. Do you know anything about this?
•
•
•
•
Originally Posted by tgreer
Any collection of JavaScript variables, functions, and objects can be called a "script". Yes, you can put them all into the same file.
At this point I think you have enough information to experiment. I think you'll be able to answer most of your own questions by trying it out. If not, let us know!
Thank you tgreer.
![]() |
Similar Threads
- Connecting To External Javascript File (JavaScript / DHTML / AJAX)
- Javascript generated drop down menu (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: How do they do this - Cool Effect
- Next Thread: I need help with my website. Using Dreamweaver.
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxhelp animate array automatically beta box browser bug calendar captchaformproblem cart checkbox child class codes column createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox focus forms frameworks google gwt highlightedword html htmlform ie8 iframe images index internet java javascript jawascriptruntimeerror jquery jsf jsfile jsp jump listbox masterpage math menu microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent pdf php player post problem progressbar prototype redirect regex runtime scale scroll search select shopping size sql text textarea toggle w3c web website window windowofwords windowsxp wysiwyg \n






