Reputation: 147
First of all hello everybody,
I'm new to this site but I still searched for 10 minutes and couldn't find an answer to my question so I'll ask it now.
I'm trying to create a sidebar gadget for windows vista/7. In that gadget I need to get some text from another page in the web (not in my domain). I know I can't really do it but I've found a work around with an Iframe. Right now the page I want is loading through the Iframe and I can see that.
The question is how do I get the entire text of that page in the Iframe into a label or text area or whatever...
Since the windows sidebar gadgets doesn't work with ASP I need this done with pure HTML and javascript.
Anyone that can help me please do, Thanks, Sagi.
Upvotes: 1
Views: 139
Reputation: 9924
If the fact that the page escapes your Iframe is the issue you can set up an intermediate server, that gets the text from the server you want (as you mentioned; www.bbc.com), and serves it as clean text. Have your widget then include an ifram from the text from you intermediate server. This would be the cleanest approach really.
Upvotes: 0
Reputation: 9924
You'll probably want to do an ajax call to the server where the other webpage is hosted.
jQuery might help with this (using .ajax()
), otherwise, just google how to do this normally in js.
[EDIT]
An intermediate server/proxy where you do the ajax calls might help, you can use access control headers to allox cross-site-scripting. See my here for more info :)
Upvotes: 0
Reputation: 13482
The sidebar may not allow ASP, but it will certainly allow ajax calls, your asp page will reside on the server and do all this hard work, and your gadget will just call your asp page?
Upvotes: 1