Posts ID:156715 Favorites Creations
ID:156715

So I'm trying to learn about the Browser pop-ups available in DM. I'm coming back to BYOND today for the first time in a long long time, so I'm very rusty (and I wasn't terribly good before anyway), so please be a little forgiving.

 mob Topic(href, list/href_list) ..() var/action = href_list["action"] var/value = href_list["value"] switch(action) if("Meep") world<<"MEEP [value]" if("Close") src << browse(null, "window=Mee") verb Show_brower_text() var/text = {" Mee The text inside this window has a black background, with a white font colour.
The text is inside a pop-up window, which is sized 500x300.
"} src << browse(text, "window=Mee;size=500x300") 

That is the code I am currently using, adapted from the Unknown Person's tutorial. At the moment I can click either of the buttons, and they "click in" (graphically) but nothing else happens.

~Ease~
 #1 Aug 10 2010, 10:57 am This isn't too related but... the [code] [/code] tags are outdated. Use [dm] [/dm] instead.
 #2 Aug 10 2010, 2:22 pm In response to Darkjohn66 (#1) Ah thanks, I guess that shows how long I've been away from here!
 #3 Aug 10 2010, 2:59 pm Check the javascript. 'disabledclick' should be onclick
 #4 Aug 10 2010, 11:47 pm In response to Pirion (#3) Thanks! That worked! I don't know any Javascript, so was trusting the tutorial. Weird that they used disabledclick in it if it doesn't work. ~Ease~
 #5 Aug 11 2010, 8:20 am In response to Ease (#4) Ease wrote: Thanks! That worked! I don't know any Javascript, so was trusting the tutorial. Weird that they used disabledclick in it if it doesn't work. ~Ease~ I think it happened because of a security feature so that no runnable javascript gets posted in an article. It could get abused, so 'onclick' inside any tag gets turned into 'disabledclick'.
 #6 Aug 11 2010, 3:25 pm In response to Skyspark (#5) Skyspark wrote: Ease wrote: Thanks! That worked! I don't know any Javascript, so was trusting the tutorial. Weird that they used disabledclick in it if it doesn't work. ~Ease~ I think it happened because of a security feature so that no runnable javascript gets posted in an article. It could get abused, so 'onclick' inside any tag gets turned into 'disabledclick'. Ah cool, makes sense. I wish I was a bit more savvy about javascript now.