• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 990
  • Last Modified:

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?

0
Sumukha
Asked:
Sumukha
  • 2
  • 2
  • 2
1 Solution
 
hieloCommented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now