Show price in field when radio button or checkbox is selected.

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Show price in field when radio button or checkbox is selected.

 
0
  #11
Jun 23rd, 2009
Ok here is it...
Note that i've excluded all the PHP block on this demo, so you'll need to put them back again in place.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <?xml-stylesheet type="text/css" href="#css21" media="screen"?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head profile="http://www.w3.org/2005/10/profile">
  7. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  8. <meta http-equiv="Window-Target" content="_top" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <meta http-equiv="Content-Style-Type" content="text/css" />
  11. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  12. <title>Free Live Help!</title>
  13. <style id="css21" type="text/css" media="screen">
  14. /* <![CDATA[ */
  15. table {
  16. margin : 0 auto;
  17. color : #405060;
  18. letter-spacing : 2px;
  19. border : 1px solid #aaa;
  20. empty-cells : show;
  21. border-collapse : collapse;
  22. width : 98%; }
  23.  
  24. td {
  25. padding : .500em 1em .500em 1em;
  26. border-bottom : 1px solid #aaa; }
  27.  
  28. td:first-child {
  29. background-color : #f7f7f7;
  30. text-align : center;
  31. width : 25%;
  32. border-right : medium groove #aaa;
  33. padding : 0; }
  34.  
  35. tr { line-height : 1.6 }
  36.  
  37. /* ]]> */
  38. </style>
  39. <script id="javascriptV15" type="text/javascript">
  40. // <![CDATA[
  41. var showValue = function() {
  42. var cel = (( this.type === "radio" ) ? this.parentNode.parentNode.nextSibling : this.parentNode.nextSibling );
  43. var eVal = (( isNaN( this.value )) ? this.value : this.value * 1 );
  44. if ( this.checked ) {
  45. cel.style.color = "#f80";
  46. cel.innerText = eVal;
  47. return;
  48. } cel.innerText = "";
  49. };
  50.  
  51. var getValue = function() {
  52. var form;
  53. try {
  54. form = document.forms["form1"];
  55. } catch( e ) {
  56. form = (( "getElementsByName" in document ) ? document.getElementsByName( "form1" )[ 0 ] : (( "getElementById" in document ) ? document.getElementById("form1") : document.all[ "form1" ] ));
  57. } var elem = form.elements;
  58. for ( var x = 0; x < elem.length; x++ ) {
  59. if ( elem[ x ].type === "radio" || elem[ x ].type === "checkbox" ) {
  60. try {
  61. if ( "addEventListener" in window ) {
  62. elem[ x ].addEventListener( "click", showValue, false );
  63. } else if ( "attachEvent" in window ) {
  64. elem[ x ].attachEvent( "onclick", showValue );
  65. }
  66. } catch( er ) {
  67. elem[ x ].onclick = showValue;
  68. } continue;
  69. }
  70. }
  71. };
  72.  
  73. window.onload = getValue;
  74.  
  75.  
  76.  
  77. // ]]>
  78. </script>
  79. </head>
  80. <body>
  81. <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
  82. <table frame="void" rules="none" cellpadding="2" cellspacing="0" class="KT_tngtable" summary="JavaScript :: Live Demo!">
  83. <tr>
  84. <td class="KT_th">3-Day Package:</td>
  85. <td>Includes all general sessions, all exhibit events, lunches, and afternoon Breakout Sessions on Thursday, Friday, and Saturday.<td>
  86. </tr>
  87. <tr>
  88. <td width="20%" class="KT_th"><label for="reg3day_1"></label></td>
  89. <td><div>
  90. <input type="radio" name="reg3day" id="reg3day_1" value="ASCLS Member" />
  91. <label for="reg3day_1">ASCLS Professional I or II Member ($210.00)</label>
  92. </div>
  93. <div>
  94. <input type="radio" name="reg3day" id="reg3day_2" value="ASCLS Collaborative" />
  95. <label for="reg3day_2">ASCLS Collaborative Member ($315.00)</label>
  96. </div>
  97. <div>
  98. <input type="radio" name="reg3day" id="reg3day_3" value="ASCLS Student/Emeritus" />
  99. <label for="reg3day_3">ASCLS Student/Emeritus Member ($140.00)</label>
  100. </div>
  101. <td style="width : 25%; text-align : center"></td>
  102. </tr>
  103. <tr>
  104. <td width="20%" class="KT_th"><label for="regExhibits">Exhibits Only:</label></td>
  105. <td><input type="checkbox" name="regExhibits" id="regExhibits" value="Y" />
  106. Entrance Fee - One Time Pass, includes food ($25.00)</td>
  107. <td style="width : 25%; text-align : center"></td>
  108. </tr>
  109. <tr class="KT_buttons">
  110. <td style="border-right : none; width : auto; padding : .500em 1em .500em 1em;" colspan="3"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" />
  111. </td>
  112. </tr>
  113. </table>
  114. <input type="hidden" name="regLate" id="regLate" value="" />
  115. </form>
  116. </body>
  117. </html>
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 15
Reputation: jrconstance is an unknown quantity at this point 
Solved Threads: 0
jrconstance jrconstance is offline Offline
Newbie Poster

Re: Show price in field when radio button or checkbox is selected.

 
0
  #12
Jun 23rd, 2009
Thanks. I'll have to look at this later today.

J.R.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 15
Reputation: jrconstance is an unknown quantity at this point 
Solved Threads: 0
jrconstance jrconstance is offline Offline
Newbie Poster

Re: Show price in field when radio button or checkbox is selected.

 
0
  #13
Jun 24th, 2009
I'm not seeing the right hand column where the $$values should be showing up. Am I missing something?

J.R.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 15
Reputation: jrconstance is an unknown quantity at this point 
Solved Threads: 0
jrconstance jrconstance is offline Offline
Newbie Poster

Re: Show price in field when radio button or checkbox is selected.

 
0
  #14
Jun 27th, 2009
essential,

Not sure if you have moved on to something else or not. I am still trying to figure this out since the example you provided does not show the price in the right hand column. Any chance you can take a look at that and get back to me.

I appreciate your assistance with this. Thanks.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Show price in field when radio button or checkbox is selected.

 
0
  #15
Jun 28th, 2009
Hi jrconstance,

sorry to keep u hanging on this thread. Im just busy with some new project here.

And regarding about displaying its price value, i really need some reference into it, so that i can display each of these values' on their specific field.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 15
Reputation: jrconstance is an unknown quantity at this point 
Solved Threads: 0
jrconstance jrconstance is offline Offline
Newbie Poster

Re: Show price in field when radio button or checkbox is selected.

 
0
  #16
Jun 28th, 2009
Here is your original code with the added fields in the form for you to reference:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1.  
  2. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  3. <?xml-stylesheet type="text/css" href="#css21" media="screen"?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  5. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  6. <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  7. <head profile="http://www.w3.org/2005/10/profile">
  8. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  9. <meta http-equiv="Window-Target" content="_top" />
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  11. <meta http-equiv="Content-Style-Type" content="text/css" />
  12. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  13. <title>Free Live Help!</title>
  14. <style id="css21" type="text/css" media="screen">
  15. /* <![CDATA[ */
  16. table {
  17. margin : 0 auto;
  18. color : #405060;
  19. letter-spacing : 2px;
  20. border : 1px solid #aaa;
  21. empty-cells : show;
  22. border-collapse : collapse;
  23. width : 98%; }
  24.  
  25. td {
  26. padding : .500em 1em .500em 1em;
  27. border-bottom : 1px solid #aaa; }
  28.  
  29. td:first-child {
  30. background-color : #f7f7f7;
  31. text-align : center;
  32. width : 25%;
  33. border-right : medium groove #aaa;
  34. padding : 0; }
  35.  
  36. tr { line-height : 1.6 }
  37.  
  38. /* ]]> */
  39. </style>
  40. <script id="javascriptV15" type="text/javascript">
  41. // <![CDATA[
  42. var showValue = function() {
  43. var cel = (( this.type === "radio" ) ? this.parentNode.parentNode.nextSibling : this.parentNode.nextSibling );
  44. var eVal = (( isNaN( this.value )) ? this.value : this.value * 1 );
  45. if ( this.checked ) {
  46. cel.style.color = "#f80";
  47. cel.innerText = eVal;
  48. return;
  49. } cel.innerText = "";
  50. };
  51.  
  52. var getValue = function() {
  53. var form;
  54. try {
  55. form = document.forms["form1"];
  56. } catch( e ) {
  57. form = (( "getElementsByName" in document ) ? document.getElementsByName( "form1" )[ 0 ] : (( "getElementById" in document ) ? document.getElementById("form1") : document.all[ "form1" ] ));
  58. } var elem = form.elements;
  59. for ( var x = 0; x < elem.length; x++ ) {
  60. if ( elem[ x ].type === "radio" || elem[ x ].type === "checkbox" ) {
  61. try {
  62. if ( "addEventListener" in window ) {
  63. elem[ x ].addEventListener( "click", showValue, false );
  64. } else if ( "attachEvent" in window ) {
  65. elem[ x ].attachEvent( "onclick", showValue );
  66. }
  67. } catch( er ) {
  68. elem[ x ].onclick = showValue;
  69. } continue;
  70. }
  71. }
  72. };
  73.  
  74. window.onload = getValue;
  75.  
  76.  
  77.  
  78. // ]]>
  79. </script>
  80. </head>
  81. <body>
  82. <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
  83. <table frame="void" rules="none" cellpadding="2" cellspacing="0" class="KT_tngtable" summary="JavaScript :: Live Demo!">
  84. <tr>
  85. <td class="KT_th">3-Day Package:</td>
  86. <td>Includes all general sessions, all exhibit events, lunches, and afternoon Breakout Sessions on Thursday, Friday, and Saturday.<td>
  87. </tr>
  88. <tr>
  89. <td width="20%" class="KT_th"><label for="reg3day_1"></label></td>
  90. <td><div>
  91. <input type="radio" name="reg3day" id="reg3day_1" value="ASCLS Member" />
  92. <label for="reg3day_1">ASCLS Professional I or II Member ($210.00)</label>
  93. </div>
  94. <div>
  95. <input type="radio" name="reg3day" id="reg3day_2" value="ASCLS Collaborative" />
  96. <label for="reg3day_2">ASCLS Collaborative Member ($315.00)</label>
  97. </div>
  98. <div>
  99. <input type="radio" name="reg3day" id="reg3day_3" value="ASCLS Student/Emeritus" />
  100. <label for="reg3day_3">ASCLS Student/Emeritus Member ($140.00)</label>
  101. </div>
  102. <td style="width : 25%; text-align : center"><input name="reg3dayPrice" type="text" id="reg3dayPrice" size="10" /></td>
  103. </tr>
  104. <tr>
  105. <td width="20%" class="KT_th"><label for="regExhibits">Exhibits Only:</label></td>
  106. <td><input type="checkbox" name="regExhibits" id="regExhibits" value="Y" />
  107. Entrance Fee - One Time Pass, includes food ($25.00)</td>
  108. <td style="width : 25%; text-align : center"><input name="regExhibitsPrice" type="text" id="regExhibitsPrice" size="10" /></td>
  109. </tr>
  110. <tr class="KT_buttons">
  111. <td style="border-right : none; width : auto; padding : .500em 1em .500em 1em;" colspan="3"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" />
  112. </td>
  113. </tr>
  114. </table>
  115. <input type="hidden" name="regLate" id="regLate" value="" />
  116. </form>
  117. </body>
  118. </html>
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Show price in field when radio button or checkbox is selected.

 
0
  #17
Jun 28th, 2009
Try this again:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <?xml-stylesheet type="text/css" href="#css21" media="screen"?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head profile="http://www.w3.org/2005/10/profile">
  7. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  8. <meta http-equiv="Window-Target" content="_top" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <meta http-equiv="Content-Style-Type" content="text/css" />
  11. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  12. <title>Free Live Help!</title>
  13. <style id="css21" type="text/css" media="screen">
  14. /* <![CDATA[ */
  15. table {
  16. margin : 0 auto;
  17. color : #405060;
  18. letter-spacing : 2px;
  19. border : 1px solid #aaa;
  20. empty-cells : show;
  21. border-collapse : collapse;
  22. width : 98%; }
  23.  
  24. td {
  25. padding : .500em 1em .500em 1em;
  26. border-bottom : 1px solid #aaa; }
  27.  
  28. td:first-child {
  29. background-color : #f7f7f7;
  30. text-align : center;
  31. width : 25%;
  32. border-right : medium groove #aaa;
  33. padding : 0; }
  34.  
  35. tr { line-height : 1.6 }
  36.  
  37. /* ]]> */
  38. </style>
  39. <script id="javascriptV15" type="text/javascript">
  40. // <![CDATA[
  41. var form;
  42. var showValue = function() {
  43. var showPrice = form.reg3dayPrice;
  44. var exhibits = form.regExhibitsPrice;
  45. var eVal = this.parentNode.innerText.match( /\$.\d+\.\d+/i )[ 0 ];
  46. if ( this.checked ) {
  47. if ( this.type === "radio" ) {
  48. showPrice.value = eVal;
  49. } else if ( this.type === "checkbox" ) {
  50. exhibits.value = eVal;
  51. } return;
  52. } showPrice.value = "";
  53. exhibits.value = "";
  54. }; var getValue = function() {
  55. try {
  56. form = document.forms["form1"];
  57. } catch( e ) {
  58. form = (( "getElementsByName" in document ) ? document.getElementsByName( "form1" )[ 0 ] : (( "getElementById" in document ) ? document.getElementById("form1") : document.all[ "form1" ] ));
  59. } var elem = form.elements;
  60. for ( var x = 0; x < elem.length; x++ ) {
  61. if ( elem[ x ].type === "radio" || elem[ x ].type === "checkbox" ) {
  62. try {
  63. if ( "addEventListener" in window ) {
  64. elem[ x ].addEventListener( "click", showValue, false );
  65. } else if ( "attachEvent" in window ) {
  66. elem[ x ].attachEvent( "onclick", showValue );
  67. }
  68. } catch( er ) {
  69. elem[ x ].onclick = showValue;
  70. } continue;
  71. }
  72. }
  73. };
  74. window.onload = getValue;
  75. // ]]>
  76. </script>
  77. </head>
  78. <body>
  79. <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
  80. <table frame="void" rules="none" cellpadding="2" cellspacing="0" class="KT_tngtable" summary="JavaScript :: Live Demo!">
  81. <tr>
  82. <td class="KT_th">3-Day Package:</td>
  83. <td>Includes all general sessions, all exhibit events, lunches, and afternoon Breakout Sessions on Thursday, Friday, and Saturday.<td>
  84. </tr>
  85. <tr>
  86. <td width="20%" class="KT_th"><label for="reg3day_1"></label></td>
  87. <td><div>
  88. <input type="radio" name="reg3day" id="reg3day_1" value="ASCLS Member" />
  89. <label for="reg3day_1">ASCLS Professional I or II Member ($210.00)</label>
  90. </div>
  91. <div>
  92. <input type="radio" name="reg3day" id="reg3day_2" value="ASCLS Collaborative" />
  93. <label for="reg3day_2">ASCLS Collaborative Member ($315.00)</label>
  94. </div>
  95. <div>
  96. <input type="radio" name="reg3day" id="reg3day_3" value="ASCLS Student/Emeritus" />
  97. <label for="reg3day_3">ASCLS Student/Emeritus Member ($140.00)</label>
  98. </div>
  99. <td style="width : 25%; text-align : center"><input name="reg3dayPrice" type="text" id="reg3dayPrice" size="10" /></td>
  100. </tr>
  101. <tr>
  102. <td width="20%" class="KT_th"><label for="regExhibits">Exhibits Only:</label></td>
  103. <td><input type="checkbox" name="regExhibits" id="regExhibits" value="Y" />
  104. Entrance Fee - One Time Pass, includes food ($25.00)</td>
  105. <td style="width : 25%; text-align : center"><input name="regExhibitsPrice" type="text" id="regExhibitsPrice" size="10" /></td>
  106. </tr>
  107. <tr class="KT_buttons">
  108. <td style="border-right : none; width : auto; padding : .500em 1em .500em 1em;" colspan="3"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" />
  109. </td>
  110. </tr>
  111. </table>
  112. <input type="hidden" name="regLate" id="regLate" value="" />
  113. </form>
  114. </body>
  115. </html>
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 15
Reputation: jrconstance is an unknown quantity at this point 
Solved Threads: 0
jrconstance jrconstance is offline Offline
Newbie Poster

Re: Show price in field when radio button or checkbox is selected.

 
0
  #18
Jun 30th, 2009
Still not working, but I think I now understand how this is supposed to work. When you said:

"And regarding about displaying its price value, i really need some reference into it, so that i can display each of these values' on their specific field."

were you saying that you need both a hidden reference somewhere in the form with the actual price of the item, along with the field in which this price would be displayed? If that's the case, I am wondering how best to set up the reference fields, especially for the radio buttons. I can certainly create a hidden field for that but not sure how to do that with an array of buttons. Can we create an array with the costs somewhere in the javascript?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Show price in field when radio button or checkbox is selected.

 
0
  #19
Jul 1st, 2009
Yes, that would be possible. I'll try to provide you with another example later....
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Show price in field when radio button or checkbox is selected.

 
0
  #20
Jul 2nd, 2009
This comes with predefined price values:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <?xml-stylesheet type="text/css" href="#css21" media="screen"?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head profile="http://www.w3.org/2005/10/profile">
  7. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  8. <meta http-equiv="Window-Target" content="_top" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <meta http-equiv="Content-Style-Type" content="text/css" />
  11. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  12. <title>Free Live Help!</title>
  13. <style id="css21" type="text/css" media="screen">
  14. /* <![CDATA[ */
  15. table {
  16. margin : 0 auto;
  17. color : #405060;
  18. letter-spacing : 2px;
  19. border : 1px solid #aaa;
  20. empty-cells : show;
  21. border-collapse : collapse;
  22. width : 98%; }
  23.  
  24. td {
  25. padding : .500em 1em .500em 1em;
  26. border-bottom : 1px solid #aaa; }
  27.  
  28. td:first-child {
  29. background-color : #f7f7f7;
  30. text-align : center;
  31. width : 25%;
  32. border-right : medium groove #aaa;
  33. padding : 0; }
  34.  
  35. tr { line-height : 1.6 }
  36.  
  37. /* ]]> */
  38. </style>
  39. <script id="javascriptV15" type="text/javascript">
  40. // <![CDATA[
  41. var field1, field2;
  42.  
  43. var price = { // Specify the following price value for this element.
  44.  
  45. reg3day_1 : "$210.00",
  46. reg3day_2 : "$315.00",
  47. reg3day_3 : "$140.00",
  48. regExhibits : "$25.00"
  49. };
  50.  
  51. var showValue = function( ids ) {
  52. field2 = (( document.getElementById ) ? document.getElementById("regExhibitsPrice") : document.all.regExhibitsPrice );
  53. if ( this.checked && this.type === "radio" ) {
  54. field1.value = price[ this.id ];
  55. } else {
  56. if ( typeof ids !== "undefined" ) {
  57. field2.value = (( field2.value === price[ ids ] ) ? "" : price[ ids ] );
  58. }
  59. }
  60. };
  61.  
  62. var getValue = function() {
  63. var check = true;
  64. field1 = (( document.getElementById ) ? document.getElementById("reg3dayPrice") : document.all.reg3dayPrice );
  65. var iRadio;
  66. try {
  67. if ( document.getElementsByName ) {
  68. iRadio = document.getElementsByName( "reg3day" );
  69. }
  70. } catch( e ) {
  71. check = false;
  72. iRadio = (( document.getElementsByTagName ) ? document.getElementsByTagName("input") : document.all.tags("input"));
  73. } for ( var x = 0; x < (( check ) ? iRadio.length : 3 ); x++ ) {
  74. if ( check ) {
  75. iRadio[ x ].onclick = showValue;
  76. } else {
  77. iRadio[ "reg3day_" + (( x ) + 1 ) ].onclick = showValue;
  78. }
  79. }
  80. };
  81. window.onload = getValue;
  82.  
  83. // ]]>
  84. </script>
  85. </head>
  86. <body>
  87. <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
  88. <table frame="void" rules="none" cellpadding="2" cellspacing="0" class="KT_tngtable" summary="JavaScript :: Live Demo!">
  89. <tr>
  90. <td class="KT_th">3-Day Package:</td>
  91. <td>Includes all general sessions, all exhibit events, lunches, and afternoon Breakout Sessions on Thursday, Friday, and Saturday.<td>
  92. </tr>
  93. <tr>
  94. <td width="20%" class="KT_th"><label for="reg3day_1"></label></td>
  95. <td><div>
  96. <input type="radio" name="reg3day" id="reg3day_1" value="ASCLS Member" />
  97. <label for="reg3day_1">ASCLS Professional I or II Member ($210.00)</label>
  98. </div>
  99. <div>
  100. <input type="radio" name="reg3day" id="reg3day_2" value="ASCLS Collaborative" />
  101. <label for="reg3day_2">ASCLS Collaborative Member ($315.00)</label>
  102. </div>
  103. <div>
  104. <input type="radio" name="reg3day" id="reg3day_3" value="ASCLS Student/Emeritus" />
  105. <label for="reg3day_3">ASCLS Student/Emeritus Member ($140.00)</label>
  106. </div>
  107. <td style="width : 25%; text-align : center"><input name="reg3dayPrice" type="text" id="reg3dayPrice" size="10" /></td>
  108. </tr>
  109. <tr>
  110. <td width="20%" class="KT_th"><label for="regExhibits">Exhibits Only:</label></td>
  111. <td><input type="checkbox" name="regExhibits" id="regExhibits" value="Y" onclick="showValue( this.id );" />
  112. Entrance Fee - One Time Pass, includes food ($25.00)</td>
  113. <td style="width : 25%; text-align : center"><input name="regExhibitsPrice" type="text" id="regExhibitsPrice" size="10" /></td>
  114. </tr>
  115. <tr class="KT_buttons">
  116. <td style="border-right : none; width : auto; padding : .500em 1em .500em 1em;" colspan="3"><input type="submit" name="KT_Insert1" id="KT_Insert1" value="Insert record" />
  117. </td>
  118. </tr>
  119. </table>
  120. <input type="hidden" name="regLate" id="regLate" value="" />
  121. </form>
  122. </body>
  123. </html>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC