W3C home > Mailing lists > Public > www-html@w3.org > January 1999


From: Mukul Gandhi <mgandhi@mtcindia.com>
Date: Mon Jan 25 07:24:48 1999
Message-ID: <01BE488B.DF921760@pc055>
To: "'JOSE ADRIANO BALTIERI'" <JABALTIE@iep-cen.unimep.br>, "www-html@w3.org" <www-html@w3.org>
Hi !
You have mentioned CGI's query string. It means ur using GET method of form submission .
In this case, a JavaScript solution might work. U write a function to submit a form , say sub_form(form). Instead of having a usual submit button(which fires the CGI script in form's action tag), u should have a normal button. 

On click event of that button you call sub_form(form). Inside this function u can write something like this -
form.action="<ur cgi script name>". { u should frame the CGI script's path name manually by appending the button variable also to it . for eg : http://www.domain.com/cgi-bin/program.cgi?a=val1+b=val2}

I think u cannot submit a form using POST with JavaScript manually. I had researched very much on this earlier.
Hope this suggestion helps.

Mukul Gandhi

Sent: 	Monday, January 25, 1999 6:24 PM
To: 	www-html@w3.org

         I'm not quite sure but I think this has been asked before....

         Anyway, here it goes again :

         I have a very simple form with a text field and a submit button..

         When the text field is selected and the cursor is in its middle, I
press Enter. A form submit is triggered but, whithin CGI's query string I can
see that the button field was cut off, I mean it was not included..

         If I submit the form using the button, it is included correctly..

         Doesn't matter if the form is GET or POST or if I use a PROXY server
or not..

         What can I do to include the button field under any circumstances ?

         Maybe some sort of Javascript trick ?

                                Obrigado/Thanks a lot,

                                Jose Adriano Baltieri
                                Analista de Sistemas
                                CPD - CENTRO
                                UNIMEP - Universidade Metodista de Piracicaba
                                PIRACICABA - SP - BRASIL
                                Fone : (019) 430-1884 (english spoken)
                                Fax  : (019) 430-1898
Received on Monday, 25 January 1999 07:24:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:49 UTC