Pergunta

I'm trying to write a script to popup a web form and then auto fill the form field with some data.

I'm using jQuery popupWindow to popup the page but I don't have any idea how to fill that form field.

Here a example http://jsfiddle.net/moreno/EHhpk/1/

note.: The form field are in an external server and I don't have access to their code.

Thanks for your help.

Foi útil?

Solução

I'm not entirely certain how you would handle this using that jQuery library, but if you use the old-school...

window.open(...)

...method, it will return a reference to window that has a document property. Assuming the new window is within the same domain, you should be able to edit the form elements that way.

There's enough example code here to get started:

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top