Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Location
    Royal Oak, MI
    Posts
    1
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Smile how do I autofill a web form on someone elses web page

    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

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,915
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by berlich View Post

    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.

  • Users who have thanked Philip M for this post:

    berlich (03-18-2008)

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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/
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • The Following 2 Users Say Thank You to Kor For This Useful Post:

    abduraooft (03-18-2008), berlich (03-18-2008)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •