help popups in profile broken on mozilla/firefox [FIXED?]

already fixed bugs

Moderator: AniDB

Locked
hhaamu

help popups in profile broken on mozilla/firefox [FIXED?]

Post by hhaamu »

http://anidb.ath.cx/perl-bin/animedb.pl?show=profile

The orange question mark popups don't work on mozilla (1.6) or phoen^Wfirebir^H^H^Hfox. They give this javascript error:

Code: Select all

Error: invalid return
Source File: javascript:popup('/cgi-bin/adbhelp.pl?help=NickWatch',300,450,1,1,'helppopup'); return(0);
Line: 1, Column: 69
Source Code:
popup('/cgi-bin/adbhelp.pl?help=NickWatch',300,450,1,1,'helppopup'); return(0);
FWIW, I have the following things disabled:
Allow scripts to:
  • Move or resize existing windows
    Raise or lower windows
    Hide the status bar
    Change status bar text
but I don't think that's relevant, since other popups work just fine, and it's a javascript error.
ninjamask
Posts: 50
Joined: Mon Apr 12, 2004 10:47 pm
Location: Germany, Cologne
Contact:

Post by ninjamask »

its broken on inet 6.0 too.
gives me the error: return outside a function.

i did a test... after removing "return(0);" the popup showed up fine.
Elberet
Posts: 778
Joined: Sat Jul 19, 2003 8:14 pm

Post by Elberet »

Indeed. "javascript:" links can not have a return, but "onX" event handlers can.

For example, this would work:

Code: Select all

<img src="..." onClick="popup('/cgi-bin/adbhelp.pl?help=NickWatch',300,450,1,1,'helppopup'); return(0);" style="cursor: hand;">
This works too:

Code: Select all

<a href="javascript:popup('/cgi-bin/adbhelp.pl?help=NickWatch',300,450,1,1,'helppopup')">
<img ... border="0">
</a>
And this too:

Code: Select all

<a href="#" onClick="popup('/cgi-bin/adbhelp.pl?help=NickWatch',300,450,1,1,'helppopup'); return(0);">
<img ... border="0">
</a>
In the third example, the return(0); makes browsers ignore the link. If the return statement is omitted there, the browser will show the popup, but it will also execute the link to "#" and hence jump to the top of the page.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

In Netscape 7.1 I don't get any error messages, they just don't do anything.

Rar
HiHoSilver
Posts: 3
Joined: Mon Nov 03, 2003 4:58 pm
Location: Earth

Post by HiHoSilver »

I'm having the exact same problem
the help popups in the "profile" section doesn't work in either IE6 or firefox
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

*changed*

BYe!
EXP
ninjamask
Posts: 50
Joined: Mon Apr 12, 2004 10:47 pm
Location: Germany, Cologne
Contact:

Post by ninjamask »

thx ^^
now it works fine
Locked