Creating javascript links

hey everyone,

i was wondering how one would go about creating links using javascript. here is my situation:

i have a div layer, and i want the user to be able to click on the div layer and go to a new html page within the same window

any suggestion?

#474393

I don't think you need Javascript for that...can't you just be creative with the tag?

-NC

#474403

well everything i've tried, required some text in the layer, the problem is don't want text in the layer, nor do i want a gif. so the only ohter solution i can think of is javascript.

any suggestions?

#474405

You may need to define a height and width for the div with coldwerturkey's example, but that should work just fine.

-NC

#474407

Thank You So Much!!!!!!!!!!!!!!!!!!!!

#474435

In my experience, this also works:

<div onclick="location.href='http://www.example.com';"></div>

#474445