bit of javascript help needed

Associate
Joined
8 Oct 2005
Posts
97
Location
Bristol
Hi

cant get my head round all the blinkin quotes comas etc

ive got this...

var menu2=new Array()
menu2[0]='<a href="#" onClick="window.open('test.asp','mywindow','width=400,height=200')"><span class=cursorstyle">Delivery</span></a>'

now i know this wont work because it needs to look like this

var menu2=new Array()
menu2[0]='<a href="#" onClick="window.open(test.asp,mywindow,width=400,height=200)"><span class=cursorstyle">Delivery</span></a>'

but for the window.open thing to work it needs to look like this

onClick="window.open('test.asp','mywindow','width=400,height=200')"

im getting confused just typing this, so how can i get the window.open to work within the menu2 array ? everything ive tried either kicks up an error or just does nothing
 
Back
Top Bottom