PDA

View Full Version : Placing Javascript WITHIN a Javascript src.jss page


Shane
01-07-2003, 04:18 AM
I am trying to refer to a javascript.jss file from an .htm page. I find I can use the document.write function fine to view the html elements, however I can't get javascript to work within the .jss file. (Specifically, next to my list two arrows should appear next to list item with the mouse-over, at the list on the left).

The links below link to a) the htm page, and b) the javascript file. At this point I have left the functional javascript script at the beginning of the .htm file - the reference is <!-- lefthand pane -->.

http://www.arts.vic.gov.au/news/news.htm
http://www.arts.vic.gov.au/javascript/news/news_lefthand.jss

Shane
01-07-2003, 04:21 AM
Sorry, the addresses above should be

http://www.arts.vic.gov.au/arts/news/news.htm
http://www.arts.vic.gov.au/arts/javascript/news/news_lefthand.jss

missing-score
01-08-2003, 08:05 PM
Are you sure its .jss, all my JavaScript files are .js

Tails
01-08-2003, 08:29 PM
Writing HTML tags in a document.write is great. Unfortunately, you can't seem to nest a <SCRIPT> tag. I have this problem too.

scroots
01-08-2003, 08:56 PM
it is possible to nest a script tag in a .js file do a search of this catergory there are many examples.

scroots

missing-score
01-09-2003, 08:44 PM
I have never had a problem putting HTML or XHTML in a script tag. It is best no to use an external file, just put the <script> and </script> tags between where you want it to appear. Ill set an example, try it soon JS Test (http://split-infinity.web1000.com/CF)

For " and ' within HTML tags, backslash them \' or \"