Click here to Skip to main content
16,004,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Im new to Javascript. Im having one checkbox and link(i agree the terms)in register page. on clicking the link im populating the popup with terms&condition text in that i have one button (I agree) if i click iagree button in popup i want to check the checkbox in my register page.
Posted
Updated 25-Dec-12 20:17pm
v2

it's too simple, suppose your popup id is 'dvPopup'

write the following code on click of close button:

JavaScript
document.getElementById('dvPopup').style.display = 'none';
 
Share this answer
 
on button click event:
JavaScript
window.close(); 
return false;


pls specify where is your check box
 
Share this answer
 
Comments
dineshdena 26-Dec-12 2:10am    
My checkbox is on page not in popup
dineshdena 26-Dec-12 2:16am    
Im having one checkbox and link (i agree the terms)in register page. on clicking the link im populating the popup with terms&condition text in that i have one button (I agree) if i click iagree button in popup i want to check the checkbox in my register page.
gagan sawaliya 26-Dec-12 2:54am    
on popup window's button click event:
window.opener.document.getElementById('checkboxid').checked = true;
window.close();
Suppose your checkbox id is "chk" and it is inside a form "form1".

On popup's button click event write:

JavaScript
window.opener.form1.chk.checked = true;
window.close();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900