How to open onClick='window.location'"http://www.trallalla.com" in a new window?

Hello Experts,

How can I modify

<div Width="130px" class='CategoryBox' style="CURSOR: pointer" onClick='window.location="http://www.trallalla.com" ' onmouseover='this.className="OverCategoryBox";' onmouseout='this.className="CategoryBox";'>Trallalla</div>

so it opens in a new window?

SumukhaAsked:
Who is Participating?
 
hieloConnect With a Mentor Commented:
try:
<div Width="130px" class='CategoryBox' style="CURSOR: pointer" onClick='window.open("http://www.trallalla.com","newwin","width=500,height=500")' onmouseover='this.className="OverCategoryBox";' onmouseout='this.className="CategoryBox";'>Trallalla</div>

Open in new window

0
 
erikTsomikSystem Architect, CF programmer Commented:
try this
<div Width="130px" class='CategoryBox' style="CURSOR: pointer" onClick='window.open="http://www.trallalla.com" ' onmouseover='this.className="OverCategoryBox";' onmouseout='this.className="CategoryBox";'>Trallalla</div>
0
 
SumukhaAuthor Commented:
This worked perfectly. Thanks!
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
erikTsomikSystem Architect, CF programmer Commented:
what is wrong with my answer

0
 
hieloCommented:
>>what is wrong with my answer
window.open is a method, not a property. You just overwrote the function reference with a string. It will not open a window.
0
 
SumukhaAuthor Commented:
Hello erikTsomik,

your suggestion did not work.

Thanks for suggesting anyway.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.