User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 361,924 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,724 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1098 | Replies: 6 | Solved
Reply
Join Date: Feb 2008
Posts: 36
Reputation: vedmack is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
vedmack vedmack is offline Offline
Light Poster

Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #1  
Feb 25th, 2008
Hi
Im trying to submit a form , which holds another form tags inside (i must do it this way)
the problem is that this doesn't work on IE, while it works perfect on Firefox

the button seems to have no effect on the page... its like it is not connected to the form....

this is how the page looks like ( i minimized it to show here...)

I did tryed to change the button to input type=submit... but it doesn't work also....

  1. <form name="submitPage" action="package.servletName">
  2. <table border="0" id="tblClass">
  3. <tbody>
  4. <tr>
  5. <td><center>Class ID</center></td>
  6. <td><center>Life Cycle State</center></td>
  7. <td><center>VSSite</center></td>
  8. <td><center>Condition</center></td>
  9. </tr>
  10. <tr>
  11. <td><input type="text" name="reqClassId" value="-" /></td>
  12. <td><input type="text" name="reqLifeCycleState" value="-" /></td>
  13. <td><input type="text" name="reqVSSite" value="-" /></td>
  14. <td><input type="text" name="reqCondition" value="-" /></td>
  15. </tr>
  16. </tbody>
  17. </table>
  18. <form name="ieBad">
  19. <table border="0" id="tblRevision1">
  20. <tbody>
  21. <tr>
  22. <td><center>Event ID</center></td>
  23. <td><center>Event Format</center></td>
  24. <td><center>Event Data</center></td>
  25. </tr>
  26. <tr>
  27. <td><input type="text" name="reqEventID1" value="-" /></td>
  28. <td><input type="text" name="EventFormat1" value="-" /></td>
  29. <td><input type="text" name="reqEventData1" value="-" /></td>
  30. </tr>
  31. </tbody>
  32. </table>
  33. </form>
  34. <button name="Add" value="submit" type="submit" >Add</button>
  35. </form>
  36.  
  37. Any Ideas?
  38.  
  39. Thanks ahead!
  40.  
  41. Daniel
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2007
Location: Birmingham
Posts: 365
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 34
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

Re: Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #2  
Feb 25th, 2008
you cannot nest a form within a form as set by w3c.
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote  
Join Date: Jan 2008
Location: Bangalore, India
Posts: 327
Reputation: DangerDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 31
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Whiz

Re: Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #3  
Feb 25th, 2008
dont nest forms
(i must do it this way)
what actually you want to do ?
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
~Mitch Ratcliffe
Reply With Quote  
Join Date: Feb 2008
Posts: 36
Reputation: vedmack is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
vedmack vedmack is offline Offline
Light Poster

Re: Cannont submit form which holds another form inside it (Works on FF, but not on I

  #4  
Feb 25th, 2008
Thanks 4 the reply...

Originally Posted by DangerDev View Post
dont nest forms

what actually you want to do ?


I'm adding dynamically using js a table with two tr which holds several td's

i must enter this table under other table (which is present from the first time as default)

unlsess i surround the default table with a form tag i wont be able to add the new table underneath it by using "tabBodyRev=document.forms[2];"

the problem is that "tabBodyRev=document.getElementById("tblRevision1");" doesnt work in IE... it works fine in FF but when i try to do browse it with IE it doesnt work, and the "tabBodyRev=document.forms[2];" is the only thing that works....
Reply With Quote  
Join Date: Apr 2007
Location: Birmingham
Posts: 365
Reputation: Fungus1487 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 34
Fungus1487's Avatar
Fungus1487 Fungus1487 is offline Offline
Posting Whiz

Re: Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #5  
Feb 25th, 2008
There is a problem with your javascript code somewhere as "document.getElementById" is perfectly fine for obtaining a table element with an ID.
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Reply With Quote  
Join Date: Jan 2008
Location: Bangalore, India
Posts: 327
Reputation: DangerDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 31
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Whiz

Re: Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #6  
Feb 25th, 2008
ok
getElementById works fine in IE and FF. just check your js code.
see one example:
  1. <html>
  2. <head>
  3. <script type='text/javascript'>
  4. function clickMe()
  5. {
  6. document.getElementById('txt_id').value="hi how are you";
  7. }
  8. </script>
  9. </head>
  10. <body>
  11. <input type='text' id='txt_id'/>
  12. <input type='button' value='click me!' onclick='clickMe()'/>
  13.  
  14. </body>
  15. </html>
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
~Mitch Ratcliffe
Reply With Quote  
Join Date: Feb 2008
Posts: 36
Reputation: vedmack is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
vedmack vedmack is offline Offline
Light Poster

Re: Cannont submit form which holds another form inside it (Works on FF, but not on IE)

  #7  
Feb 26th, 2008
Thx alot 4 the replys , the reason i think that its not js error is cause the code works perfect in FF and when i checked the page with IE, it did not work at all... i figured what was the problem...
IE and FF acts differently when generating/appending new tables with js...

Thanx again.. solved....
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 10:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC