[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    JavaScript question
From:       Michael Ritzert <kde () ritzert ! de>
Date:       2001-07-19 18:01:39
[Download RAW message or body]

Hi all,

I noticed that Continental Airlines' Flight Status Page doesn't work any
more with recent Konqueror CVS versions. When I investigated why, I stripped
down the page to this:

<HTML>
<HEAD>
</HEAD>
<BODY>


<script Language="JavaScript">
<!--

function ReturnFalse()
{
return (false);
}

function PageValidate()
 {
	document.frmStatusInput.action = "flightstatus.asp";
	document.frmStatusInput.submit();    
}
//--></script>


<FORM action=""  method=POST  name=frmStatusInput  onSubmit="return ReturnFalse();"  >
	<INPUT type="text" name=txtNumber MAXLENGTH=4 SIZE=4>
	<A HREF="javascript:PageValidate();">Submit</A>
</form>

</BODY>
</HTML>

Looking at the code I understand what happens:
document.frmStatusInput.submit() is called, then ReturnFalse is called (via
onSubmit) and returns false. Therefore the form is not submitted. It sounds
logical that form.submit() calls onSubmit(). But since it is different in
both Netscape and IE, I still wonder whether it is correct.

Michael

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic