[thelist] Brain Addled Javascript....

Anthony Baratta Anthony at Baratta.com
Fri Jun 22 17:35:33 CDT 2001


I'm stumped. I'm trying to get a "nice to have" working with a Javascript 
I'm using.

Here's the anchor link:

[a href="javascript:PreSelectMajors(document.FormMajors);" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('premajo','','images/btn_majo_sync1.gif',1)"][img 
src="images/btn_majo_sync0.gif" width="90" height="28" align="left" 
hspace="10" alt="Pre-Select My Majors" name="premajo" border="0"][/a][span 
class="paraPopup">Click to pre-select all majors from your list[/span]

The Function PreSelectMajors works great. But since it's in the href, the 
cursor "hangs" in the hour glass shape while waiting for something to 
"return". It clears itself as soon as you move the mouse, but I want to 
return to normal automatically.

I checked the archives and saw the following format:

<a href="javascript:PreSelectMajors(document.FormMajors); return false;"...

Which I tried. I ended up breaking the script with an error:

invalid return.

PreSelectMajors(document.FormMajors); return false;
......................................^

I also tried to add the return false to the function and change the href to:

<a href="javascript:return PreSelectMajors(document.FormMajors);"...

I basically get the same error message:

invalid return.

return PreSelectMajors(document.FormMajors);
^

Any clues would be appreciated. Thanks.
---
Anthony Baratta
President
Keyboard Jockeys

Blatant Plug: Cool Jazz for a hot summer,
     http://LisaMarie.Baratta.com





More information about the thelist mailing list