View Full Version : Linking

04-06-2008, 03:38 PM
hi, i am new to DW, and is currently having trouble with the onClick codes.

basicly i want to click on a APdiv and link to a seperate page in in the same window.

this is my code atm

<div class="style1" id="apDiv1" onclick="news.html">news</div>

where im trying to link to news.html

can someone help me fix the code?

04-06-2008, 08:43 PM
You can call a function with onClick, typing a url in there does nothing :)

If you want to open a new page, use the anchor tag <a>:
<div class="style1" id="apDiv1"><a href="news.html">news</a></div>