...

View Full Version : how do I autofill a web form on someone elses web page



berlich
03-18-2008, 07:07 AM
I need to fill in a lengthy form on a web page. The report takes about an hour + because I am going back and forth cutting and pasting the data, text box by text box.

I have the data in an access database on my machine. How can I use JavaScript to autofill the text boxes from the database without violating the cross domain scripting rules and getting an access denied error.

I tried bringing their page in using the iframe tag but get an access denied error because it is a different domain than the small page and script I wrote.

The solution would save me a ton of time as I complete these reports regularly, via the Web, and would like to automate the process.

I have IE7, Safari, and Firefox available to me.

Thanks,

Brian

Philip M
03-18-2008, 08:18 AM
I have the data in an access database on my machine. How can I use JavaScript to autofill the text boxes from the database without violating the cross domain scripting rules and getting an access denied error.


You can't. That is why the cross-domain scripting rule exists.

For security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin.

Kor
03-18-2008, 09:09 AM
Actualy you can. You may use a combination of AJAX and a server-side application (written in php, asp, java....).

For instance, AJAX+php
http://www.troywolf.com/articles/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum