Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

automatic pop-up when click on a radio button

This is a discussion on "automatic pop-up when click on a radio button" within the JavaScript Forum section. This forum, and the thread "automatic pop-up when click on a radio button are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 27th, 2006, 23:39
Junior Member
Join Date: Mar 2005
Location: Australia
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
automatic pop-up when click on a radio button

As the title suggests

I have 2 options for a user to choose from. If the click the radio button, "yes," I want a pop up window to appear

How do I go about that?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Jul 28th, 2006, 05:24
New Member
Join Date: Jun 2006
Location: London UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: automatic pop-up when click on a radio button

I would go about setting the radio buttons up in some kind of an array if possible and using the if statement to say something like this, which you will need to heavily modify to your form fields and code.

HTML: Select all
if (form == yes)
{
openWindow()
}
Now I have used a function, although it being 5am for me I may have made a syntax error so I would check it through before implementing it into your site, now I will show you basically how to code the function, although you will need to modify it to your properties.

HTML: Select all
<script type="text/javascript">
 
<!--
function openWindow() {
window.open("", "newwin", "height=300,width=300");
}
//-->
 
</script>
Theres the function, however you could also use onClick method, I think although I have never experimented it on radio buttons it may be possible.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 1st, 2006, 07:06
Junior Member
Join Date: Mar 2005
Location: Australia
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Re: automatic pop-up when click on a radio button

Thanks alot

I tried the onClick and that works fine
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
automatic, popup, click, radio, button

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Button 'Looping' for Navigation starrzo JavaScript Forum 2 Apr 4th, 2008 15:38
[SOLVED] Automatic Checkbox/Radio Button Checking Stuart JavaScript Forum 8 Nov 9th, 2007 02:55
[SOLVED] Selected radio button value Pugger JavaScript Forum 8 Nov 3rd, 2007 14:16
Radio Button Problems in ActionScript 3.0 dgstarr Flash & Multimedia Forum 1 Sep 6th, 2007 18:11
Any way to use an image for a radio button? masonbarge Web Page Design 23 Jan 6th, 2007 10:06


All times are GMT. The time now is 09:40.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8