Forum Moderators: open

Message Too Old, No Replies

inline javascript and strict webstandards safari

         

pepijn

10:54 am on Apr 26, 2007 (gmt 0)

10+ Year Member



i noticed that safari does not support :

<a href="#" class="back">previous page</a>
and approch the element using DOM
it can be approched by doing this:

if (navigator.platform.indexOf("Mac")!= -1 && e[i].className == "back") 
e[i].setAttribute("href", "javascript:history.go(-1)");
e[i].onclick = function(){
if (this.className == "back")
history.go(-1);
}

Is there another solution?

Drag_Racer

7:59 am on Apr 27, 2007 (gmt 0)

10+ Year Member



why not just put it in the link

<a href="javascript:history.go(-1);">previous page</a>