You are here: Re: submit for on multiple actions « PHP Language « IT news, forums, messages
Re: submit for on multiple actions

Posted by misiek on 04/27/07 16:16

Rik wrote:
> misiek wrote:
>> Christoph Burschka wrote:
>>> misiek schrieb:
>>>> Hi is it possible to have many submit buttons and those will submit
>>>> the one form on different action ?
>>>>
>>>
>>> Not to different actions in the sense of different URLs to send the
>>> form to, but it is possible to have several submit buttons and have
>>> the destination page check which of them was pressed.
>>>
>>> > <form id='form' method='post' action=''>
>>> >
>>> > <textarea>TEST<textarea>
>>> >
>>> > <input type='submit' name='op' value='Preview' />
>>> > <input type='submit' name='op' value='Submit' />
>>> > <input type='submit' name='op' value='Delete' />
>>>
>>> $_POST['op'] will contain the value of the button that was clicked
>>> (Preview, Submit or Delete).
>>
>> I forgot to tell that I use to submit ajax form
>>
>> this way it return for me all params, all buttons values
>
> It shouldn't, find a better JS library.
>

I found a way

<?
print $html->formtag();
print $html->textarea('Email/body', array('cols'=>'60', 'rows'=>'10'));
print '<br>';
print $ajax->submit('document', array('url' =>
'/email/analize/?type=document', 'update'=>'div', 'before' =>
'Effect.Appear(\'div\',{duration:0.6});'));
print $ajax->submit('word', array('url' => '/email/analize/?type=word',
'update'=>'div', 'before' => 'Effect.Appear(\'div\',{duration:0.6});'));

?>
</form>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация