I need to be able to call a DM proc via javascript. The idea is to change the interface once the iframe inside of a browser control finishes loading.
Is this possible? May I have an example?
![]() May 31 2014, 8:09 pm
|
|
I think it's only possible using Topic[] calls.
|
As Jittai explained, JavaScript could call the Topic() in DM and send messages to procs that way. Any other way will be news to me.
Example: client/Topic(href) |
You should be able to use JavaScript to call a verb, using the new features.
You use it exactly like the winset() proc, or the client-side .winset command, except you invoke it as a URL destination and it gets passed to client/Topic() when you click it - so be sure that if you overwrite client/Topic(), you call ..() and it'll just do the same as the winset functions. var url = "byond://winset?command="; |
Oh, thanks guys. Both are wonderful answers but I'll probably go with the winset command method. This sloves my problem.
|
I am very confused right now, I looked into the winset command stuff and for some reason, JavaScript seems to be disabled for me when I try to use it, I end up with no results.
When I attempt Ter's tutorial, if JavaScript is not enabled, you will be kicked from the game, and it so happens that I get kicked from the game. When I do the old way to call Topic() it works, any suggestions? |
have you tried to...enable JavaScript?
I dunno. I asked Ter to check this thread out when he has time. |
I noticed SSX's version didn't work while the ID param was in the url. Here's what I did, although it's not complete.
EDIT: I noticed it doesn't always work though. Like if I navigate to MSN.com it never works. However if I go to byond.com, or many others it does work. getNavURL(url as text) |
I am assuming this uses Internet Explorer still, and I have JavaScript enabled for Internet Explorer.
For some reason I can use JavaScript for certain things but not other things. It seems that Remvoving the id from the url makes it work, but Ter's example still doesn't work for me at all. |
Pretty sure he's talking about this:
http://www.byond.com/forum/?post=1581490#comment10298209 or this: http://www.byond.com/forum/?post=1477869#comment8506256 The second one is kind of weak in a few respects, though. |