2009年8月11日星期二

Re: [fw-mvc] form get method rewrite url

Is there any more sophisticated way? What if form have 20 fields, you must
develop javascript parser :)


Guillaume Rossolini wrote:
>
> Hi,
>
> I guess one solution would be to use the "onsubmit" event of the browser
> to
> set the "window.location" property to your liking.
>
> Basically:
> $form = new Zend_Form();
> $form->setAttrib('onsubmit', "window.location =
> 'module/controller/action/param/'+document.getElementById('field').value;
> return false;");
>
> Regards,
>
>
> On Wed, Apr 30, 2008 at 12:03 PM, voogzy <voogzy@gmail.com> wrote:
>
>>
>> Hi.
>>
>> I have a form with a GET method. I want it to submit to a url like this:
>> bla.localhost/search/value1/value2/value3/value4...
>>
>> what i get now is
>> bla.localhost/search?param1=value1&param2=value2&param3=value3...
>>
>> you get the picture.
>>
>> How do i set it so it will rewrite the url?
>> --
>> View this message in context:
>> http://www.nabble.com/form-get-method-rewrite-url-tp16979352p16979352.html
>> Sent from the Zend MVC mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Guillaume Rossolini
>
>

--
View this message in context: http://www.nabble.com/form-get-method-rewrite-url-tp16979352p24915089.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: