Re: [PHP] Using link to submit a form

2003-07-30 Thread andu


--On Wednesday, July 30, 2003 14:32:11 -0500 Tyler Longren 
[EMAIL PROTECTED] wrote:

Hi everyone,

Can I replace Submit buttons on forms with a text button?
I need to be able to click on a link:
a href=index.php?option=editEdit/a
Something like:
a href=javascript: document.your_form_name.submit();Edit/a
and have it submit the form.  The form only contains one field...does
anyone know how to do this?  I've been searching google for an answer,
but couldn't find any info that really applies to my question.  This
isn't exactly a PHP related question, but php is hugely involved in this
project.
Thanks!
Tyler Longren


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





Andu

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


RE: [PHP] Using link to submit a form

2003-07-30 Thread Jennifer Goodie
 Hi everyone,
 
 Can I replace Submit buttons on forms with a text button?
 I need to be able to click on a link:
 a href=index.php?option=editEdit/a
 
 and have it submit the form.  The form only contains one 
 field...does anyone
 know how to do this?  I've been searching google for an answer, 
 but couldn't
 find any info that really applies to my question.  


This was answered yesterday.

http://marc.theaimsgroup.com/?t=10516067212r=1w=2

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



RE: [PHP] Using link to submit a form

2003-07-30 Thread Matt Palermo
//Just use this javascript function...
echo 
script LANGUAGE=\JavaScript\ 
!-- 
function LetsSubmit(where) 
{
document.forms[0].action = where;
document.forms[0].submit(); 
} 
//-- 
/script
;


// Then output the submit link like this...
echo 
a href=\javascript:LetsSubmit('submit_page.php');\
;

// You can have multiple submit links that send it
// to different pages just by changes the value 
// inside the (''), like this...
echo 
a href=\javascript:LetsSubmit('another_page.php');\
;

//You should be able to do as many different links
// with this function as you want.  If you want a 
// button like this, you can also do this...
echo 
input type=\submit\ value=\Rename Files\ name=\RenameButton\ 
onclick=\javascript:LetsSubmit('any_page.php');\
;


I spent a while trying to figure this one out myself, so I hope this helps 
you.

Matt



= Original Message From Tyler Longren [EMAIL PROTECTED] =
Hi everyone,

Can I replace Submit buttons on forms with a text button?
I need to be able to click on a link:
a href=index.php?option=editEdit/a

and have it submit the form.  The form only contains one field...does anyone
know how to do this?  I've been searching google for an answer, but couldn't
find any info that really applies to my question.  This isn't exactly a PHP
related question, but php is hugely involved in this project.

Thanks!
Tyler Longren



--
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