/    Sign up×
Community /Pin to ProfileBookmark

Firefox problem with javascript

I have a javascript menu that does not work correctly in Fire Fox when I use the include tag.
The page use to be in frames and not dynamically created. I have recreated the whole site in Cold Fusion so alot has changed on the site. I think this is a javascript/firefox problem.

If you view the page in IE you will see how it is suppose to work.
If you view the page in FF you will see my problem.
[url]http://www.mswgraphics.com/pinnaclespokane/test.cfm[/url]

[url]http://www.mswgraphics.com/pinnaclespokane/menu.htm[/url]
has the code for the menu.

here is the code for the test.cfm page
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/html4/loose.dtd“>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<title>Pinnacle Realty Inc.</title>
</head>

<body
text=”#000000″ bgcolor=”#FFEF00″ topmargin=”0″ leftmargin=”0″>
<table width=”723″ border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td><table width=”723″ border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td width=”123″ background=”images/left.gif”></td>
<td width=”600″ height=”100″ align=”center”><img src=”images/pinnlogosm.gif” width=”184″ height=”112″></td>
</tr>
<tr>
<td width=”123″ height=”400″ background=”images/left.gif”><cfinclude template=”menu.htm”/></td>
<td width=”600″ height=”400″ valign=”top”>
<table border=”0″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”##111111″ width=”500″ id=”AutoNumber1″>
<tr>
<td width=”600″>

</td>

</tr>
</table>
</td>
</tr>
<tr>
<td width=”123″ background=”images/left.gif”>
</td>
<td><cfinclude template=”shared/footer.htm”/>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

any help making this work correctly would be appreciated.

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@ExuroJul 26.2005 — If you view the page in IE you will see how it is suppose to work.

If you view the page in FF you will see my problem.[/QUOTE]
Actually telling us the problem is usually much more helpful than making us guess... You're talking about the gap on the left-hand side though, right? This is a problem with your CSS, not the JavaScript. Add a [FONT=Comic Sans MS]body{margin:0;}[/FONT] to your stylesheet and that should take care of it.
Copy linkTweet thisAlerts:
@prpldudeauthorJul 26.2005 — Sorry about that Exuro, I guess I was too worried about forgetting to leave the examples.

The margin was one of the issues (and thank you for the help on that) but the main issue is that when you click on the "for lease" or "for sale" buttons the submenu that should drop down does not drop down. The submenu shows up "behind" the buttons.

Thanks again for any help. (now that you know what I'm having troubles with)
Copy linkTweet thisAlerts:
@ExuroJul 26.2005 — Your page [i]could[/i] be fixed as it is, but I really suggest just redoing it. If you use CSS for the layout rather than tables, use the proper elements to structure your content (like using a list for the menu), and follow basic accessibility guidelines, your page should turn out much better. I've attached a sample of how the page could be reworked. Feel free to ask any questions you may have, and good luck! ?

[upl-file uuid=c86185b4-ab3d-4475-83d2-6b2925bb7978 size=10kB]sample.zip[/upl-file]
Copy linkTweet thisAlerts:
@prpldudeauthorJul 26.2005 — Why is CSS better than tables?

Is there a good tutorial out there to learn CSS?

In the sample.zip is there a way to make the first menu item text smaller to fit "Listings by address"?

Thanks again for the help.
Copy linkTweet thisAlerts:
@ExuroJul 27.2005 — Why is CSS better than tables?[/QUOTE]Tables were never meant for laying out webpages, they were meant for displaying tabular data. However, back in the day, it was the best way of going about making a website, but now that we have CSS there's no need to keep using this "hack". Compare the code in my sample file to the code in your web page. Which is cleaner, more easy to read, and would be easier to update/fix? Also, with CSS, you can do a complete remodel without changing a single line of HTML. Take a look at [url=http://www.csszengarden.com/]CSS Zen Garden[/url].


Is there a good tutorial out there to learn CSS?[/QUOTE]I guess there's always [url=http://www.w3schools.com/css/default.asp]W3School's[/url].


In the sample.zip is there a way to make the first menu item text smaller to fit "Listings by address"?[/QUOTE]I guess you could give the first menu item a class or an ID, and then style it via the CSS to make the text smaller, and you'll have to mess with the padding so it's still centered vertically.
Copy linkTweet thisAlerts:
@prpldudeauthorJul 27.2005 — Ok I see what you mean about cleaner and easier to update. I'll have to try and see what I can learn and mess with the Menu.

Thanks again for all your help and insight. You've been a great help.
Copy linkTweet thisAlerts:
@prpldudeauthorJul 28.2005 — Another Question. Can I do some sort of include with the "menu" so I only have to change anything to do with The menu in one spot.

Like if I wanted to change one of the menu Items. I could just change it in the menu.htm file. Or do I need to put the menu info on every page so that it works correctly?

This is the code I'm asking about:

<head>

<link rel="stylesheet" type="text/css" href="main.css" />

<script type="text/javascript" src="menu.js"></script>

</head>

<body>

<ul id="menu">

<li>Listings</li>

<li>About Us</li>

<li><div>For Lease</div>

<ul class="subMenu">

<li><a href="#">Washington</a></li>

<li><a href="#">Idaho</a></li>

<li><a href="#">Montana</a></li>

</ul>

</li>

<li><div>For Sale</div>

<ul class="subMenu"><li><a href="#">Washington</a></li></ul>

</li>

<li>Demographics</li>

<li>Agents</li>

<li>Links</li>

<li>Home</li>

</ul>

</body>

</html>

Does it need to be on every page or can I have an external file?
Copy linkTweet thisAlerts:
@ExuroJul 28.2005 — Is there any particular reason that you're using Cold Fusion? I've never used it before, so I'm not sure if you can do includes with that or not. However, it looks like your server is running IIS6, so you should be able to use ASP or ASP.NET technologies in your pages, which means that you can use [url=http://www.w3schools.com/asp/asp_incfiles.asp]server-side includes[/url]. (The syntax for that is the same in ASP and ASP.NET)
Copy linkTweet thisAlerts:
@prpldudeauthorJul 28.2005 — I'm using CF because it's the one I learned. CF is pretty easy. I did the <cfinclude> but it gave me problems. I've thought about trying to switch over to asp or php. Maybe it's time.
Copy linkTweet thisAlerts:
@obsesikJul 29.2005 — Cant help but i can say that it dont work in Safari either...from my standpoint
×

Success!

Help @prpldude spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...