views:

53

answers:

2

I am doing an integration with a support system (Helpstream) and I am currently working on doing some in-app context sensitive help. I have put in a link that will send the user to a section of Helpstream that will allow them to ask a question. Problem is, there are buttons on the page that call Javascript that will bring up a lightbox where the user fills out a form to submit a question.

What I need to do is have that form come up after the user goes through the link, so essentially run the Javascript once the user hits the page. The call that I have to implement is

NewTopic.CreateNew({type:"Question"})

Any tips would be greatly appreciated. Thanks in advance.

A: 

Call it on DOM ready

window.onload = function(){
  NewTopic.CreateNew({type:"Question"});
}
Anpher
That would work, but I can't modify the page that has the Javascript on it. It is a page that was made in Helpstream, so I don't have access to the code.
kratos2488
A: 

Pretty sure this won't be possible due to browser security policies disallowing Javascript calls to windows with a different source.

Further clarification...

Window A with the URL example.com cannot send a Javascript calls to Window B, or access DOM elements from Window B with the URL example2.com

Anpher had the right idea if there wasn't a cross domain security policy

Flash84x
Thanks for the answer. This makes sense, as it could be seen as an XSS attack. Didn't think of that.
kratos2488