Welcome to WebmasterWorld Guest from 18.208.159.25

Forum Moderators: open

Message Too Old, No Replies

AJAX with forms

     
6:30 pm on Dec 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


hello, im using the dynamic drive code (Dynamic Ajax Content) to load pages depending on a link pressed, however the problem i am having is that though they are loaded they are not added to the source and my main reason for doing this would be for a form

i wanted to spit the form seperate forms

so you ahve a radio button and depending on what option you choose

one.html two.html three.html or four.html is added into the div that works fine however if those sub pages contain a form then the subpages input values are not submitted

(i really dont want to have all the information on the page and just use js and css to hide and display the infomation if possible)

if anyone has any advice please let me know

thanks

Dom

9:06 pm on Dec 13, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 22, 2002
posts:1751
votes: 0


Just to clarify things for dumb readers like me: what is the structure of the page? For example:

.. 
<form>
<!-- start of dynamically loaded content -->
<html><body>
<form>
<input type="text" name="foo">
</form>
</body></html>
<!-- end of dynamically loaded content -->
<input type="submit">
</form>
..
11:04 pm on Dec 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


<form>

<input>
<input>

<checkbox> <checkbox> <checkbox>

<-- dynamic content depending on checkbox ->>

<input> <input> <input>
<-- end of dynamic content -->

<input>
<input>

<submit>

11:05 pm on Dec 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


ok not quite sure how to edit my post but </form> at the end of that :)
11:42 pm on Dec 13, 2005 (gmt 0)

Full Member

10+ Year Member

joined:June 15, 2003
posts:302
votes: 0


Hi quozt,

I believe that if you have the variable inputs in a <div> that is invisible, they will still submit. So why not just change the visibility depending on the check boxes that are selected using JavaScript?

11:50 pm on Dec 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


because im looking 6 forms with between 10 and 100 input box's each (its not as weird as it sounds when i set it out right) my main problem is if a person goes to the page and it has to download all the forms just to hide 5 of them and they only want to input into two box's its a waste of loading time for them and a waste of bandwidth for me
5:35 pm on Dec 14, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 22, 2002
posts:1751
votes: 0


This is sort of a wild guess, but maybe you need to add the new fields to the document's existing DOM. With methods such as createElement() and appendChild().