开发者

Calling Javascript after linking to another page

I am doing an integration with a support system (Helpstream) an开发者_开发知识库d 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.


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


Call it on DOM ready

window.onload = function(){
  NewTopic.CreateNew({type:"Question"});
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜