void setup() { size(300,300); } void loop() { rect(120,120, 60,60); } void mousePressed() { // this only works when running as applet // this works in firefox but not IE /* if(mouseX>=120 && mouseX<180 && mouseY>=120 && mouseY<180) link("javascript:function winopen(url)"+ " {window.open(url,'blah','width=400,height=400,"+ "toolbar=false,status=false ');}; winopen('http://www.db.no/');"); */ if(mouseX>=120 && mouseX<180 && mouseY>=120 && mouseY<180) link("http://www.db.no/"); }