[thelist] Netscape - Form onSubmit with Image problem

Jagjeet Hayer Jagjeet.Hayer at softwareag.co.uk
Tue May 30 12:38:33 2000


Its ok folks.  I've just been a dumbass. 

Please ignore previous plea.  Its all sorted.

Regards,

Jag.

> -----Original Message-----
> From: thelist-admin@lists.evolt.org
> [mailto:thelist-admin@lists.evolt.org]On Behalf Of Jagjeet Hayer
> Sent: Tuesday, May 30, 2000 3:40 PM
> To: thelist@lists.evolt.org
> Subject: [thelist] Netscape - Form onSubmit with Image problem
> 
> 
> Hi everyone,
> 
> I have a slight Netscape problem.
> 
> I have a form with some fields and an input of type image which 
> when clicked
> will submit the form.  This is fine in IE but not in Netscape.  
> The image no
> longer swaps and doesn't submit.
> 
> ---------------------------------------------
> 
> function MM_swapImgRestore()
> 
>   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
> x.src=x.oSrc;
> }
> 
> 
> function MM_swapImage()
> 
>   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
> for(i=0;i<(a.length-2);i+=3)
>    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
> x.oSrc=x.src; x.src=a[i+2];}
> }
> 
> function checkFields()
> {
> 	if(!allValid())
> 	{
> 		return false;
> 	}
> 	else
> 	{
> 		document.regform.submit();
> 	}
> }
> 
> <BODY>
> 
> <FORM action="/servlet/registration1" method=post id=regform name=regform
> onsubmit="return checkFields()">
> 
> <table>
> 
> <some fields>
> 
> <input type="image" onMouseOut="MM_swapImgRestore()"
> 
> onMouseOver="MM_swapImage('Image2','','../images/main/gifs/mortapp
> conton.gif
> ',1)"
>         name="Image2" border="0"
> src="../images/main/gifs/mortappcontoff.gif"
>         width="94" height="23" alt="Continue">
> 
> </table>
> 
> </body>
> 
> ------------------------------------------
> 
> I don't really know the ins and outs of Netscape so I would appreciate if
> anyone could shed some light on this.
> 
> Thanks,
> 
> Jag.
> 
> 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 
>