Javascript cross domain or emulate browsing - Local Only

I am trying to create a way to automate a few steps of browsing a website. Steps include clicking buttons/links and filling out a login form. The overall goal is to parse tabular data after successfully logging into my account on the website. I thought this would be as easy as using JavaScript and an iframe or remote window. Enter IE Cross Domain Security. I understand the need for the security but i would like to find a way to disable it on my local machine or some other manner to emulate browsing.
Any suggestions?

My only options i am have come up with are:
> Write an IE helper object that can be addon on to IE
> Write my own crude browser (yes I considered it)

I don't think XMLDom will work because of the required validation for the login on the site.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


1. Open Internet Explorer
2. On the Tools menu, click Internet Options.
3. On the Security tab, click Trusted Sites, and then click Sites.
4. Under Add this website to the zone, type http://localhost.
5. Click Add, and then click Close.

now you can create a page (debug.htm) with an internal frame, and populate whatever you want inside the page loaded in this internal frame.
clickclickbangAuthor Commented:
Hi cwichoski,
I tried that and i still get a javascript "Access Denied" error.
I'm not sure about a javascript solution.  But another method that might work is to use C#, php or perl or any language to send a custom html header to login.  I believe this would get by the cross site scripting problem and allow you to parse the data you receive.

Hope this helps
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!


what is the URL that you put on iframe? isnt at same machine? localhost? you can explain your configurations for Trusted Sites?
clickclickbangAuthor Commented:
the site is running on localhost but the url for the iframe is on a different location example: i tried adding http://localhost and the full target URL to the trusted sites and it still didn't work.

What server do you use on localhost? if you use Apache, you can use ProxyPass directive, and can achieve what you need without to deal with Browsers security.

you configure on your httpd.conf:

ProxyPass /google/
ProxyReverse /google/

then point your internal frame to http://localhost/google/

with this you can access the internal frame without worry about browser security.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clickclickbangAuthor Commented:
Wow that sounds perfect. I am running a windows box but i don't mind running apache for this purpose. Do you think there are security measures that could be in place on the target website that would keep this from working? Obviously you have no background on my project but is there some common methods you know of that could limit some one from using your suggestion?

What a great concept! Thanks
This dont work if the target site, check if it is inside an internal frame. sometimes, if it is inside a internal frame, then the target site, redirects to another page, or just open a new window, to avoid the internal frame.
clickclickbangAuthor Commented:
a security limitation on the target site will not allow me to use the proxy. i just get a 403 error. If i don't get an answer on how to disable the cross domain security for IE or other browser then i will award you the points cwichoski. You offered a great potential solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.