[Nicolas]
09-14-2010, 07:29 PM
So, I found this really cool side panel script I could use as new CPanels for my site. (kapleenmusic.webfreehosting.net) I just have one question; How can I use HTML inside Javascript, if you know what I mean.
p = new createPanel('p','testpanel');
p.addButton('peditor.gif','Personal<BR>Editor','alert("Personal Editor")');
p.addButton('logo.gif','test<br>button','alert("linkhere")');
o.addPanel(p);
Note I have two buttons in there, top being used as example when I'm editing. The second button is what we're watching here; Anyways, to the point, in the
'alert("linkhere")'
part, I would like to use HTML inside that javascript alert.
Ex:
'alert("<a href="http://dynamicdrive.com">DynamicDrive</a> rocks.")'
I tried that and it failed, what should I do?
EDIT: Got it to work, actually the code I was supposed to add was parent.main.location="http://link.com".
EDIT: Nevermind :/ It won't go to the link. http://kapleenmusic.webfreehosting.net/outlook.html to see for yourself..
p = new createPanel('p','testpanel');
p.addButton('peditor.gif','Personal<BR>Editor','alert("Personal Editor")');
p.addButton('logo.gif','test<br>button','alert("linkhere")');
o.addPanel(p);
Note I have two buttons in there, top being used as example when I'm editing. The second button is what we're watching here; Anyways, to the point, in the
'alert("linkhere")'
part, I would like to use HTML inside that javascript alert.
Ex:
'alert("<a href="http://dynamicdrive.com">DynamicDrive</a> rocks.")'
I tried that and it failed, what should I do?
EDIT: Got it to work, actually the code I was supposed to add was parent.main.location="http://link.com".
EDIT: Nevermind :/ It won't go to the link. http://kapleenmusic.webfreehosting.net/outlook.html to see for yourself..