Javascript + Widget = busted OpenURL string. noob hopefully
Posted: Mon Nov 19, 2007 5:57 pm
feyd | Please use
the .pngs show up great, just the link isn't working. hand cursor shows up, but is unclickable.
oh, and by the way, if I manually type in the html file name, it works fine:
Thats it. Thanks for the time. What else has been going on the past 8 months or so?
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Thank god I found this site again. Hello everybody - long time. So, I moved off php for a while, and got back into the design side of things. Needless to say, I forgot a lot of things, and here we are today.
So I'm making this Widget for Mac OSX and I'm having trouble with 1 line of Javascript code. I'm trying to generate a link name using the getdate() var thing I don't really know much about.
What's weird is it works for the img src= part of it, just not the OpenURLpart. I think I'm missing some curly brackets or back ticks or the use of a magic wand, who knows. Here's some code:
Broken:
[syntax="javascript"]document.getElementById("recipes").innerHTML= "<img id='recipelink' onclick='widget.openURL(\"http://www.example.com/\" + todaym + todayd + \".htm\");' src='nrs/" + todaym + todayd + ".png'>";oh, and by the way, if I manually type in the html file name, it works fine:
Code: Select all
document.getElementById("recipes").innerHTML= "<img id='recipelink' onclick='widget.openURL(\"http://www.example.com/1019.htm\");' src='nrs/" + todaym + todayd + ".png'>";feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]