Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.js problem

Status
Not open for further replies.

cb49747

MIS
Apr 23, 2002
181
US
I had a java script that worked perfectly when located in the head section of html file. removed java and placed in .js file and then get error.

here is insert line.

<script LANGUAGE="javascript" type="text/Javascript" src="sg1_java.js"></script>

The error I get is object expected.

any ideas?

and yes the .js file is in the same directory as the .html file
 
Take the <SCRIPT></SCRIPT> tags out of the .js file.

Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...east is east and west is west and if you take cranberries and stew them like applesauce
they taste much more like prunes than rhubarb does
[infinity]
 
OK I have allready done that.

The problem is fixed though. Here is what I did.

I have a proxy server so when I refreshed the page it just reloaded the page but did not reload any extras such as images, java, etc.

Did a force refresh and it worked fine.

Thanks for the help.
 
Going out on a limb for this one cause it's happened to me before with css files:

Do you put all your js files in a subdirectory? If so, all of your folder references to images may have to be readjusted.

For my example with the css files - when I'd develop putting all the styles in a <style> tag at the top of the page all my background images and such would be pulled in like url(./images/imagename.gif) but when put into the css directory I'd have to change them to url([red].[/red]./images/imagename.gif)

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top