PDA

View Full Version : js pop-up


crmpicco
06-10-2005, 09:17 AM
How do i click the radio button and make it do the same as the link does?



function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


<input type="radio" id="fare_brakedown_c" name="fare_brakedown_c" onClick="javascript: NewWindow(this.href,'name','650','650','yes');return false;">


<a href="fare_details.asp?pnrno=<%=pnrno%>&iChdPax=<%=iChdPax%>&iInfPax=<%=iInfPax%>" onClick="javascript: NewWindow(this.href,'name','650','650','yes');return false;"><font face="verdana" size="-2">&nbsp;<b>Fare Breakdown</b></font></a>

gsoft
06-10-2005, 09:35 AM
Well is the radio button suppose to be getting the link from within the link shown? Or is it suppose to have its own link?

glenngv
06-10-2005, 11:05 AM
Just copy the url in the href and replace this.href in the onclick of radio button.
And also remove the return false in the onclick.
<input type="radio" id="fare_brakedown_c" name="fare_brakedown_c" onClick="NewWindow('fare_details.asp?pnrno=<%=pnrno%>&iChdPax=<%=iChdPax%>&iInfPax=<%=iInfPax%>','name','650','650','yes');">