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
Reply

Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Forms without action "imitate" of other Form (which do have action) ???

 
0
  #1
Mar 5th, 2008
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...

  1. function go()
  2. {
  3. document.one.submit();
  4. }
  5.  
  6. function gogo()
  7. {
  8. document.two.submit();
  9. }
  10.  
  11. function gogogo()
  12. {
  13. document.three.submit();
  14. }
  15.  
  16. <form name="one" >
  17. <select name="oneone" id="oneone" onchange="go()">
  18. </select>
  19. </form>
  20.  
  21. <form name="two" >
  22. <select name="twotwo" id="twotwo" onchange="gogo()">
  23. </select>
  24. </form>
  25.  
  26. <form name="three" >
  27. <select name="threethree" id="threethree" onchange="gogogo()">
  28. </select>
  29. </form>
  30.  
  31.  
  32. <form name="four" action="ComputeAndReturn" >
  33. <input type="submit" value="Add" name="Add" />
  34. </form>

thanks ahead...

Daniel
Last edited by vedmack; Mar 5th, 2008 at 6:38 am. Reason: Added more details....
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #2
Mar 5th, 2008
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..!
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #3
Mar 5th, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #4
Mar 5th, 2008
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.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #5
Mar 5th, 2008
thx 4 the suggestion ,but it doesn't fit my needs , cause i need to receive some data back from the servlet and to show it ....
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #6
Mar 7th, 2008
I use action=none when I don't want any submission.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #7
Mar 8th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Re: Form without action "imitate" of other Form (which do have action) ???

 
0
  #8
Mar 9th, 2008
action=none doesn't work also... after first form submitting of the "problematic form" all other forms starts to behave like it also.....
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: McVaio is an unknown quantity at this point 
Solved Threads: 0
McVaio McVaio is offline Offline
Newbie Poster
 
0
  #9
Oct 15th, 2009
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. action="javascript:void(0);"
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC