RE: [PHP] Submit form from javascript code

2002-08-31 Thread Todd Pasley

Hi

Instead of
>   retrun false;
im sure you meant
return false;

The reason its working with confirm and the like is because of their return
code which is actually true.
Try changing it to return true, im pretty sure that will fix it.

Cheers,

Todd.

> -Original Message-
> From: Madjid Nasiri [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 31 August 2002 9:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Submit form from javascript code
>
>
> Hi all
> I need submit a form from javascript code. My code near this code:
>
> 
> 
> 
> 
> function submitform(iId)
> {
>   document.myform.elements['id'].value=iId;
>   document.myform.submit();
>   alert("foo"); // This is code is dummy
>   retrun false;
> }
> 
> Id One
> Id Two
> 
> Id 1000
> 
>
> If I remove alert() call in submitform function, this code noting
> work, but
> if i used alert() or confirm() function this code working, Why?
> How can i remove alert() function and my code work?
>
> Thanks for Answer
>
> Madjid Nasiri
> [EMAIL PROTECTED]
> http://www.kawacomputer.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Submit form from javascript code

2002-08-31 Thread Jason Wong

On Saturday 31 August 2002 19:43, Madjid Nasiri wrote:

> I need submit a form from javascript code. My code near this code:

Please ask javascript questions on a javascript list.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Steinbach's Guideline for Systems Programming:
Never test for an error condition you don't know how to handle.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Submit form from javascript code

2002-08-31 Thread Madjid Nasiri

Hi all
I need submit a form from javascript code. My code near this code:





function submitform(iId)
{
  document.myform.elements['id'].value=iId;
  document.myform.submit();
  alert("foo"); // This is code is dummy
  retrun false;
}

Id One
Id Two

Id 1000


If I remove alert() call in submitform function, this code noting work, but
if i used alert() or confirm() function this code working, Why?
How can i remove alert() function and my code work?

Thanks for Answer

Madjid Nasiri
[EMAIL PROTECTED]
http://www.kawacomputer.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php