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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Firefox loves me, IE hates me, please help 1

Status
Not open for further replies.

csolar

Programmer
Dec 10, 2003
11
US
I am writing a web site, and I am using a cool toolbar thing. Its in javascript and I am having a problem.

I put all the toolbar core code into a js file for simple importing into each web site, and everything works perfectly except for one page on one browser. Yep, you guessed it, Internet Explorer!! YAY

Anyway, I get an object expected, very vague, says on line 1 character 1, which is very much wrong, but I was able to chase down the culprit of the bug.

This one web site is written in perl cgi, and the problem is with this line

print "<body link='black' vlink='black' alink='black' onLoad=\"writeMenus()\" onResize=\"if (isNS4) nsResizeHandler()\">";

writeMenus() is a function from the menu code imported at the bottom of my web site:

print '<script language="javascript" src="../easymenus.js"><script>';
print end_html;

Now I know that at the bottom might seem to be my problem right off the bat, and the answer is YES it is my problem. But, my real problem is I cannot place that script line anywhere else on the page without causing an internal server error.. And, on every single other page (not cgi) putting the script code at the bottom works perfectly. And, everything works perfectly in firefox.

Could someone please show me another reason why IE sucks? I am ripping out my hair trying to figure it out.
 
That sounds like the old "file not found" chestnut... Make sure that the path to the JS file is correct relative to the calling page. Also make sure that the capitalisation of the filename is correct - some hosts are case-sensitive.

I also note that your script tag isn't closed properly - you have an open script tag followed by another open script tag, followed by script. This is just plain wrong. You should fix this.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I also note that your script tag isn't closed properly - you have an open script tag followed by another open script tag, followed by script. This is just plain wrong. You should fix this.

Which is kind of odd.... IE is usually the good one about completely ignoring f'd up code.

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
images
 
Wow, thanks a lot guys, I probably would of never spotted that. I figured it was just like every other page and something was wrong from the cgi/perl side.. Guess sometimes it takes an outsider to tell you how stupid you are :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top