Use Ajax to populate a form

strictlyPPC

New member
Feb 11, 2010
48
0
0
hey, anyone know how to use AJAX to populate a form? for example, user enters his details on page 1 and chooses which offers he would like. then, i open the offers one by one in a frame on my page and populate the details with the details he entered on page 1.

+rep if anyone knows of a good ajax tutorial that deals with something like this or could help me out.
 


If you mean iframing the offers on your page and prepopulating, that is not possible in javascript as you would have to manipulate the form fields of another domain. You can't have client side code manipulate one domain's content that is served up from a different domain.

Maybe if you ran some host and post offers or something. Can't imagine your network would be happy with that though, very easy to fraud the offers if you're automatically doing any of it.
 
As others have said, this is impossible. The reason is that JavaScript has a Same Origin Policy.

Also, get your terminology right. This is not AJAX, it's JavaScript. AJAX is used to make requests to the server independent of the normal page request.
 
You sure seem to stand out from the crowd....please, do tell

Some of it's public knowledge, some of it's not (and not going to be.)

I would need more details on the OPs setup and the target forms.
 
Them bookmark sites that auto fill your details in a number of sites use something similar to this, I'll try dig up a link to what I'm talking about.


Like on social marker site.