views:

99

answers:

1

Ive been trying to target iframe using Raphael JS

heres some sample code

var c = paper.circle(10, 10, 10); c.attr({href: "http://google.com/", target: "top"}); v

var t = paper.text(250, 50, "Raphaël\nkicks\nbutt!"); t.attr({href: "http://google.com/", target: "_blank"});

Also..cant get href to work with text ar t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); t.attr({href: "http://google.com/", target: "_blank"});

A: 

After spending a little time to think it out

c.node.onclick = function load2 (iframe1URL, iframe2URL) { parent.iframe1.location.href='page1.htm' parent.iframe2.location.href='page2.htm'