The url needs to be a string:
<div onclick="window.location = 'photo.php'"></div>
Question
This is my Code:
<div onclick="window.location = photo.php"></div>
But the url if I click on the div is:
http://www.domain.com/[object%20HTMLDivElement]
What could be the reason for it?
Solution
The url needs to be a string:
<div onclick="window.location = 'photo.php'"></div>
OTHER TIPS
missing quotes in the value.
<div onclick="window.location = 'photo.php'"></div>