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.

Thanks
LVL 1
clickclickbangAsked:
Who is Participating?
 
cwichoskiConnect With a Mentor Commented:
hum,

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/ http://www.google.com/
ProxyReverse /google/ http://www.google.com/

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

with this you can access the internal frame without worry about browser security.
0
 
cwichoskiCommented:
Hi,

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.
0
 
clickclickbangAuthor Commented:
Hi cwichoski,
I tried that and i still get a javascript "Access Denied" error.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
tempstf1Commented:
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
0
 
cwichoskiCommented:
Hi,

what is the URL that you put on iframe? isnt at same machine? localhost? you can explain your configurations for Trusted Sites?
0
 
clickclickbangAuthor Commented:
the site is running on localhost but the url for the iframe is on a different location example: http://www.google.com. i tried adding http://localhost and the full target URL to the trusted sites and it still didn't work.
0
 
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
0
 
cwichoskiCommented:
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.
0
 
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.
0
All Courses

From novice to tech pro — start learning today.