[SOLVED] Confused about buttons

This is a discussion on "[SOLVED] Confused about buttons" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Confused about buttons are both part of the Program Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 3rd, 2008, 14:15
New Member
Join Date: Apr 2008
Location: Wales
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question [SOLVED] Confused about buttons

Hey guys,

I've got a problem with my radio buttons. Before i put them in my check boxes where adding up a total this is the code

Code: Select all
<script type="text/javascript">
<!-- 
function UpdateCost() {
  var sum = 0;
  var gn, elem;
  for (i=0; i<15; i++) {
    gn = 'game'+i;
    elem = document.getElementById(gn);
    if (elem.checked == true) { sum += Number(elem.value); }
  }
  document.getElementById('totalcost').value = sum.toFixed(2);
}
// -->
</script>
Then when i tried to put radio buttons in nothing worked heres what i got so far :

Code: Select all
<input type="checkbox" id='game9' value="2.99" onChange="UpdateCost()">&pound;2.99<br>
        
</div>
<p>
What type of postage would you like? (We use Royal mail to deliver our games)
</p>
<input type="radio" id="game10" value="0" onChange="UpdateCost()" />free delivery<br/>
<input type="radio" id="gamw11" value="2.20" onChange="UpdateCost()"/>Next day delivery &pound;2.20<br/>
<input type="radio" name="Post" value="3.20" onChange="UpdateCost()"/>Saturday delivery &pound;3.20<br/>
Thanks for the help!
Reply With Quote

  #2 (permalink)  
Old Apr 3rd, 2008, 20:48
New Member
Join Date: Apr 2008
Location: Wales
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Confused about buttons

Dont worry guys figured it out and its FIXED!!
Reply With Quote
  #3 (permalink)  
Old Apr 4th, 2008, 09:29
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,012
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: [SOLVED] Confused about buttons

Please could you post your solution for other users
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
Reply

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
[SOLVED] Help with Radio buttons Oak JavaScript Forum 17 Feb 2nd, 2008 09:44
[SOLVED] Buttons alexgeek Graphics and 3D 11 Dec 22nd, 2007 00:16
Still confused... PHP ssnerdy Starting Out 14 Oct 1st, 2007 10:29
Now im really confused cressy Scripts and Online Services 1 Aug 4th, 2007 08:14
help with fwd/backwrd buttons affecting other buttons typeofdoug Flash & Multimedia Forum 5 Feb 4th, 2007 03:48


All times are GMT. The time now is 04:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43