iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old July 27th, 2006, 07:39 PM   #1
New Member
 

Join Date: Mar 2005
Location: Australia
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 joshcxa is on a distinguished road
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?
joshcxa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 28th, 2006, 01:24 AM   #2
New Member
 

Join Date: Jun 2006
Location: London UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Net-Margin is on a distinguished road
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 Code:
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 Code:
<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.
Net-Margin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 1st, 2006, 03:06 AM   #3
New Member
 

Join Date: Mar 2005
Location: Australia
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 joshcxa is on a distinguished road
Re: automatic pop-up when click on a radio button

Thanks alot

I tried the onClick and that works fine
joshcxa is offline  
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

Bookmarks

Tags
automatic , popup , click , radio , button


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 2 April 4th, 2008 11:38 AM
[SOLVED] Automatic Checkbox/Radio Button Checking Stuart JavaScript 8 November 8th, 2007 10:55 PM
[SOLVED] Selected radio button value Pugger JavaScript 8 November 3rd, 2007 10:16 AM
Radio Button Problems in ActionScript 3.0 dgstarr Flash and ActionScript 1 September 6th, 2007 02:11 PM
Any way to use an image for a radio button? masonbarge HTML, XHTML and CSS 23 January 6th, 2007 06:06 AM


Search Engine Optimization by vBSEO 3.2.0 RC8