Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Javascript on an page loaded in Frame

Status
Not open for further replies.

manufiu

Programmer
Joined
Jun 4, 2006
Messages
2
Location
US
Hi all,

Current situation:
I load 'ABC' webpage and then type in URL:
URL: javascript://some commands
then those commands get executed on the ABC webpage.

Now I want to load ABC page in an Frame/Iframe on XYZ page and execute the same URL
URL: javascript://some commands
on that ABC page.

Is it possible to do such functionality using Javascript?

I hope I have made the requirements clear. IF not let me know.

Thanks for your valuable advice.
 
I think
URL: javascript://some commands
should be read like this?
[tt] URL: javascript:some commands [/tt]
Further you can do it like this figuratively for iframe/frame named or with id iframename.
[tt] URL: javascript:window.frames["iframename"].some commands [/tt]
 

Thanks for the excellent idea! It works. But when I do that I get Permission denied from the third party site ABC.

Any work-around for that problem; even though the Session from the thirdparty hasnt expired.
 
There's a security restriction on Javascript about content of other domains accesed inside a frame. If that's the case, I'm afraid you cannot do it.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top