| | |
Form without action "imitate" of other Form (which do have action) ???
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 51
Reputation:
Solved Threads: 0
I have a very weired problem (which is not easy to describe.. but I'll do my best):
I have a html page with several forms , only one of the got the action="ComputeAndReturn" and the other forms got only name="" tag...
the problem is that after i submit the form with the action , and than after a computatioon it returns to the original page, now... if i will submit any of the forms without the action=...
they will act as if they were defined action="ComputeAndReturn" (altho they are not!)
Now... if they were defined from the first time with action="anything", and than i would submit the form with action="ComputeAndReturn" this problem would not appear (the other forms will keep their action="anything" and would not "imitate" the action="ComputeAndReturn" to them selfs...
any ideas how can i keep my forms without action="" , cause all i need them to do is be submitted to pass the submitted value to other form inside that page....
it looks something like this...
thanks ahead...
Daniel
I have a html page with several forms , only one of the got the action="ComputeAndReturn" and the other forms got only name="" tag...
the problem is that after i submit the form with the action , and than after a computatioon it returns to the original page, now... if i will submit any of the forms without the action=...
they will act as if they were defined action="ComputeAndReturn" (altho they are not!)
Now... if they were defined from the first time with action="anything", and than i would submit the form with action="ComputeAndReturn" this problem would not appear (the other forms will keep their action="anything" and would not "imitate" the action="ComputeAndReturn" to them selfs...
any ideas how can i keep my forms without action="" , cause all i need them to do is be submitted to pass the submitted value to other form inside that page....
it looks something like this...
javascript Syntax (Toggle Plain Text)
function go() { document.one.submit(); } function gogo() { document.two.submit(); } function gogogo() { document.three.submit(); } <form name="one" > <select name="oneone" id="oneone" onchange="go()"> </select> </form> <form name="two" > <select name="twotwo" id="twotwo" onchange="gogo()"> </select> </form> <form name="three" > <select name="threethree" id="threethree" onchange="gogogo()"> </select> </form> <form name="four" action="ComputeAndReturn" > <input type="submit" value="Add" name="Add" /> </form>
thanks ahead...
Daniel
Last edited by vedmack; Mar 5th, 2008 at 6:38 am. Reason: Added more details....
hi
i am not getting same problem as you are getting as i tried, any way you try to put action="#"
hope it will help..!
i am not getting same problem as you are getting as i tried, any way you try to put action="#"
hope it will help..!
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
•
•
Join Date: Feb 2008
Posts: 51
Reputation:
Solved Threads: 0
I did tried action="#" , but it doesn't change anything... still the other forms tries to act as if they were defined with action="ComputeAndReturn"
i know that a part of the blame that this all happening is of ComputeAndReturn which is a servlet that returns something that messing all that html... but i'm looking for a solution that i will be able to apply on the html side only...
any other ideas?
i know that a part of the blame that this all happening is of ComputeAndReturn which is a servlet that returns something that messing all that html... but i'm looking for a solution that i will be able to apply on the html side only...
any other ideas?
instead of calling ComputeAndReturn directly can't you call a jsp file there you will take care of calling ComputeAndReturn.
you can also have hidden field on all the form with same name and at jsp file you can check the value of hidden field and on the basis of perform correct action.
you can also have hidden field on all the form with same name and at jsp file you can check the value of hidden field and on the basis of perform correct action.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
form.submit() causes a form submit irrespective of whether that form has been assigned a real or dummy action. Plus on a page at a time only one form can be submitted. The best way here would be to rethink your design and encapsulate all the elements in the same form and perform the arbitration logic at the server itself. I don't accept change; I don't deserve to live.
•
•
Join Date: Oct 2009
Posts: 1
Reputation:
Solved Threads: 0
0
#9 26 Days Ago
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
action="javascript:void(0);"
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Ajax Modal Pop Up not working in FireFox
- Next Thread: Select Box Updates DIV on the page
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser captchaformproblem checkbox close codes css cursor debugger decimal dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position problem programming prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c window windowofwords windowsxp wysiwyg \n






