/    Sign up×
Community /Pin to ProfileBookmark

Sending JavaScript commands across servers

Right, I have a website implementation that runs locally/on a webserver, but needs to send JavaScript to a remote page located at [url]www.pandorabots.com[/url] (the remote page runs inside an iframe).
Basically, a chatbot needs to recieve a JavaScript function from a remote server (Pandorabots) but this is obviously blocked (IE gives me a [I]permission denied[/I] error message whilst Firefox helpfully says nothing :rolleyes: )

I assume its a sandbox limitation of JavaScript designed to prevent a remote server from controlling the browser that prevents me sending these scripts backwards and forwards but if anyone has any ideas or workarounds im all ears.

I was pondering whether using PHP to ‘include’ the remote page rather than run it separately in an iframe would work (seeing as the page is constructed before JavaScript starts, it may sort the problem), but thats probably beyond the scope and remit of this forum.

As above, all help is welcome.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@balloonbuffoonApr 18.2006 — (IE gives me a [I]permission denied[/I] error message whilst Firefox helpfully says nothing :rolleyes: )[/QUOTE]If you look in the Javascript console, it should show an error message.

If you can include what you would've in the iframe, on the page and on your server, do it. As I guess you've figured out, Javascript can only interact with other pages that exist on the same server.

--Steve
×

Success!

Help @Optimaximal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...