p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   JavaScript open pop-up (http://p2p.wrox.com/showthread.php?t=30297)

crmpicco June 10th, 2005 03:16 AM

JavaScript open pop-up
 
How do i click the radio button and make it do the same as the link does?

Code:


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;">&nbsp;<b>Fare Breakdown</b></a>


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt

ChrisScott June 10th, 2005 03:40 AM

A radio button does not have an href attribute.
You need to specify a valid value for the first parameter of your NewWindow() function call.

HTH,

Chris



All times are GMT -4. The time now is 10:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.