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

List:       kde-devel
Subject:    Re: khtml 3.4 javascript submit() problem
From:       Andy Pieters <andy () vlaamse-kern ! com>
Date:       2005-03-31 15:58:54
Message-ID: 200503311759.02627.andy () vlaamse-kern ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi 

This smells like something I know...

I can only guess at what you actually have in your document but you should 
know that a form MUST HAVE a submit button.

Either you use the 

input type="submit"

which is supported by all the browsers since a decade

or

you use button type="submit" 

which is a bit less supported.

If you want to send the form from inside javascript, or any other interface, 
including the submit button will releave you of your pain.

<form action="somwhere.php" method="get">
	<input type="text" value="something" name="test">
	<button onclick="javascript:document.forms[0].submit()">
</form>

WILL NOT WORK!


but
<script type="text/javascript">
 function validate()
{#return a value of true to continue sending the form
 #return a value of false to cancel sending the form}
</script>
<form action="somwhere.php" method="get">
	<input type="text" value="something" name="test">
	<input type="submit" onclick="return(validate())" value="Submit">
</form>

Has many chances of success!


Kind regards


Andy 


-- 
Registered Linux User Number 379093
--
Feel free to check out these few
php utilities that I released under the GPL2 and 
that are meant for use with a php cli binary:
http://www.vlaamse-kern.com/sas/
--

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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