Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box Onclick event question 1

Status
Not open for further replies.

Dashley

Programmer
Joined
Dec 5, 2002
Messages
925
Location
US
Hi,

Im using an onClick event on a checkbox so that when sombody ckicks the checkbox a small window opens (codes below).

Is there a way to not open the window (dont fire the onclick event)if the checkbox is already checked?


Thanks

Code:
onClick=window.open('1win.asp?Q=3B&FRM=31','','toolbar,width=600,height=200')>
 
Make the following changes:
Code:
onClick=[!]"if (this.checked) {[/!]window.open('1win.asp?Q=3B&FRM=31','','toolbar,width=600,height=200')[!]}"[/!]>

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Kaht

Thanks Thats just what I needed


Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top