Forum Moderators: open
I'm not very used with javascript, but with a basic script I made a dropdownmenu. The browser gives a message of some errors in the site (with the menu), but I can't find the problem.
The site works good (beside of the server problems).
Errors are like this (all the same, except the line):
Line: 118
Char: 33
Error: Expected: ';'
A piece of the code (complete code visibly by viewing page source):
<a href="forum/index.php" onClick="return clickreturnvalue(); open url('forum/index.php');" onMouseover="dropdownmenu(this, event, 'main_menu_forum');">
<img name="button_forum" src="templimages/menu/button_forum_off.gif" width="64" height="28" border="0"></a>
<div id="main_menu_forum" class="main_menu" style="width: 115px; border-top: 0px;">
<a class="sub_menu" href="forum/index.php">Forum</a>
<a class="sub_menu" href="forum/profile.php?mode=editprofile">Profiel</a>
<a class="sub_menu" href="forum/profile.php?mode=register">Registreren</a>
</div>
It seems to have some difficulties with the first line. I see no place where an extra ';' is needed en removing them doesn't fix the error.
[edited by: jatar_k at 3:07 pm (utc) on Oct. 5, 2005]
[edit reason] no urls thanks [/edit]
<a href="some_page.htm" onclick="window.open(this.href,'','height=200,width=400');return false;">open win</a>
Otherwise, just removing the "open url()" part should allow the links to function, assuming "clickreturnvalue()" is a valid function and doesn't return "false". Removing the entire onclick attribute would allow the links to function, but may break something else.
window.location=this.href;
instead of openUrl(this.href) (since openUrl is not a function unless you define it.
So your result will be this:
<a href="forum/index.php" onClick="return clickreturnvalue(); window.location=this.href;" onMouseover="dropdownmenu(this, event, 'main_menu_forum');">