View Full Version : New CPanels (need help)

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")');
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
part, I would like to use HTML inside that javascript alert.
'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..

09-14-2010, 08:11 PM
alert("<a href="http://dynamicdrive.com">DynamicDrive</a> rocks.");
can be done 2 ways I think...

alert('<a href="http://dynamicdrive.com">DynamicDrive</a> rocks.');


alert("<a href=\"http://dynamicdrive.com\">DynamicDrive</a> rocks.");

09-14-2010, 08:45 PM
Now I have another issue, when I test the page, NOTHING is there. Example HTML included. No matter what I do to fix this won't work :(
EDIT: I got it to work, I opened up "outlook.html" and used the code from that, though I don't see why the other pages weren't working :/