Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  99] [ 4]  / answers: 1 / hits: 42546  / 14 Years ago, sat, february 26, 2011, 12:00:00

How do I load another page on the onClick event in Javascript?



<div id=div_man onclick=/subfolder/index.htm></div>


The code above is not working.
Please explain. I am sure it's quite simple. Thanks in advance!


More From » html

 Answers
116
<div id=div_man onclick=location.href='/subfolder/index.htm'></div>


Here's a working example: http://jsfiddle.net/ArtBIT/EEjyP/


[#93569] Thursday, February 24, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
beatrices

Total Points: 745
Total Questions: 103
Total Answers: 105

Location: Guam
Member since Tue, Nov 29, 2022
2 Years ago
beatrices questions
Fri, Jan 14, 22, 00:00, 2 Years ago
Sun, Feb 14, 21, 00:00, 3 Years ago
Fri, Nov 20, 20, 00:00, 4 Years ago
Mon, Aug 12, 19, 00:00, 5 Years ago
;