Necesito un poco de ayuda de PHP y JavaScript

  • RSMEDUDE
  • Novice
  • Novice
  • Avatar de Usuario
  • Registrado: Jul 10, 2004
  • Mensajes: 33
  • Status: Offline

Nota Septiembre 20th, 2011, 12:24 am

Hola todos,

Necesito un poco de ayuda y creo que esto es donde debo publicar esta cuestión. Me dirijo a usted el sitio Web para mi model railroad club y tengo un pequeño problema con un formulario que estoy trabajando. Tengo un formulario que se encuentra en el código de fuente del planeta y que es libre de utilizar pero no puedo meter esta uno función para trabajar. Es necesario o debo decir que quiero tener una si resúmenes para ver si se hace clic en una casilla de verificación o no. Si no entonces un pop cuadro vienen diciendo algo en el sentido de deba leer esto y haga clic aquí. Quiero hacer esto en un fassion similar a lo que hace con las áreas de cuadro de texto. Me gustaría appricaite cualquier ayuda que puedo sacar de esto. Incluiré el código fuente de lo que hasta el momento.

PHP Código: [ Select ]
<?php
ob_start('ob_gzhandler');
session_start();
include 'picnic3_inc.php';
// if submit
if (($_POST[x])&&(substr($_SESSION[igif], 17) === $_SESSION['afloat'])){
 
// posted
$x = $_POST[x];
 
// decode, strip string and round numbers
$a = base64_decode($_SESSION['afloat']);
$b = 0 + $a;
$a = explode(" ", $a);
$a = $a[3];
$bb = round($b);
$aa = round($a);
 
// x coords
$gc = explode(" ", '0 19 40 60 82 104 79 100 121 142 163 185');
 
// check if correct number has been clicked
$ac = $aa + 6;
if ($bb <= $aa){ $ac = $bb + 1; }
 
//wrong number clicked error message below
$mess = "ERROR: Sorry " . $_POST[yname] . " the wrong number was clicked so please try again!";
// if correct number clicked success
if (($x >= $gc[$ac-1]) && ($x <= $gc[$ac])){
 
// submit your form
$to  = $owner_email . ',';
//$to .= email;
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
// Additional headers
$headers .= 'From:<' . $_POST[email] . '>' . $_POST[yname] .  "\r\n";
$headers .= 'DO NOT respond to this email. This is the RSME Picnic Inquiry Form automated responce email version 1.0.' .  "\r\n";
 
// Message content
$messages = '<br><br>To ' . $_POST[yname] . ',' . '<p>Thank you for your inquiry about using the RSME for your groups function. For now you do not need to do anything except watch your email and your telephone for when our coordinator contacts you to go over some details and finalize plans.<br>' . '<p>Notes for the RSME coordinator: <BR>Please review the information below and contact the requestor with information about the usage of our facility.' . '<p><b>Did read rules:</b> ' . $_POST[liability] . '<p><b>Name:</b> ' . $_POST[yname] . '<p><b>E-mail:</b> ' . $_POST[email] . '<p><b>Telephonem Number:</b> ' . $_POST[phone] . '<p><b>Date Requested:</b> ' . $_POST[dater] . '<p><b>Approximate Start Time:</b> ' . $_POST[stime] . '<p><b>Approximate End Time:</b> ' . $_POST[etime] . '<p><b>Approximate Number of guests:</b> ' . $_POST[guests] . '<p><b>Comments:</b><br>' . $_POST[message];
 
// Mail it   
mail($to, $sitename . " MAIL: Picnic Inquiry Form [BETA TEST]", $messages, $headers);
$yname = $_POST[yname];
?>
<script>
alert("Thank you <? echo $yname; ?> for your inquiry about using out facility to host your groups function. Our coordinator will be in contact with you soon!");
window.location = "<?=$redirect;?>";
</script>  
<?  
exit; }
 
//demo alert message below
?>
<script>  
alert("<?=$mess;?>");
window.location = window.location;
</script>
<?
session_unset();
session_destroy();
ob_end_flush();
exit;
}
// afloat = base64_encoded random string
$afloat = base64_encode(" " . $num1 = rand(0,3) . "." . $num2 = rand(100,999) . "
Float " . $num3 = rand(1,4) . "." . $num4 = rand(100,999) . "  ");
 
// rectangle x coord
 
$aler = "> 78";
if(round($num1 . "." . $num2) <= round($num3 . "." . $num4)) {$aler = "< 105";}
 
// create random image
$_SESSION[igif] = "create_gif.php?a=" . $afloat . "";
$_SESSION['afloat'] = $afloat;
 
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="resource-type" content="document">
<meta name="Generator" content="rsmeorga Tag Generator">
<meta name="revisit-after" content="10">
<meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
<meta name="rating" content="Safe For Kids">
 
<title>Reading Society of Model Engineers</title>
<base target="main">
 
<LINK REL=stylesheet TYPE="text/css" HREF=../../../rsme.css>
 
<style type="text/css">
/* click image */
.cd {
width: 185px;
height: 15px;
background-image: url(<?=$_SESSION[igif];?>);
background-repeat: no-repeat;
position: relative;
left:<?=rand(-100,100);?>px;
bottom:<?=rand(-5,20);?>px;
z-index: 2;
}
</style>
 
<!--        START TO VALIDATE ALL FIELDS ARE FILLED IN      -->
 
<script language="JavaScript">
 
 
 
 
// submit form func val i date
function submitform() {
 
 
/*if($_POST['liability'] == 'YES'){
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; }*/
 
 
if (xcoords.liability.value == "false") {
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; } */
if (document.xcoords.yname.value == "") {
alert("Please enter your name.");
return false; }
if (document.xcoords.email.value == "" || document.xcoords.email.value.indexOf("@")<1|| document.xcoords.email.value.indexOf(".")<1) {
alert("Please enter a valid E-mail address.");
return false;}
if (document.xcoords.phone.value == "") {
alert("Please enter your Phone Number.");
return false; }
if (document.xcoords.btime.value == "") {
alert("Please enter the best time to call you if needed.");
return false; }
if (document.xcoords.dater.value == "") {
alert("Please enter the date you would like to host your function on.");
return false; }
if (document.xcoords.stime.value == "") {
alert("Please enter the approximate time you would like to start your function at.");
return false; }
if (document.xcoords.etime.value == "") {
alert("Please enter the approximate time your function will be over at.");
return false; }
if (document.xcoords.guests.value == "") {
alert("Please enter the approximate number of guests you expect at your function.");
return false; }
 
 
<!--        END TO VALIDATE ALL FIELDS ARE FILLED IN     -->
 
// if box coord submit else rectangle coord alert
// Do not edit javascript below this line. you can edit the alert message
 
if (document.xcoords.x.value <?=$aler;?>) {
document.xcoords.submit();
 
} else {
alert("Click number in square identicale to number in rectangle to submit.");
}
}
// image x value
function xcoord(event) {
image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
document.xcoords.x.value = image;
}
</script>
 
 
</head>
<body>
 
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100">
  <tr>
      <td align="center" height="100" width="250" valign="top"><img src="images/rsmelogo.gif" width="178" height="88" align="center"></td>
      <td align="center" height="100" width="833" valign="top"><h2>Reading Society of Model Engineers</h2><p>Berks County, Pennsylvania, USA</p></td>
      <td align="center" height="100" width="250" valign="top"><img border="0" src="images/LITERAIL.gif" width="216" height="112" align="center"></td>
  </tr>
</table>
 
<div align="center"> <br><div style="background: #C0C0C0; width: 720px" align="center">
<table summary="" border="0">
   <tr>
      <td Colspan=2 style="font: bold 18px Arial; color: <?=$fontcolor;?>" align="center"><img scr="pp-2.jpg"><br>Picnic Pavilion Information and Reservation Form</td>
   </tr>
   <tr>
      <td colspan=2><br><BR>Please read over this information carefully as there are some general information items about hosting your activity(s) at the RSME. Following these few steps will ensure that we can help you make your activity a huge success!<br><br>
<font color="red"><b>*</b></font>The typical donation for the use of the RSME facility and 15" guage train is 0.00. However, if you feel that is out of your donation range, we are more than willing to work with you and your group to reach a fair donation to host your activity(s).<BR><BR>
<font color="red"><b>*</b></font>Absolutely no alcohol beverages are permitted on the property, no exceptions. This is for the safety of our guests and members alike.<br><br>
<font color="red"><b>*</b></font>Children that are brought onto the property are you responsability.<br><br>
<font color="red"><b>*</b></font>Do not walk on the roadway.<br><br>
<font color="red"><b>*</b></font>Use walkways and foot bridges provided.<BR><BR>
<font color="red"><b>*</b></font>Do not get on or off of moving trains.<br><br>
<font color="red"><b>*</b></font>Passangers must stay within the confines of the cars at all times.<br><br>
<font color="red"><b>*</b></font>Please obey all posted signs.<br><br>
<font color="red"><b>*</b></font>Please be advised that our picnic pavilion is currently under repairs. However, we do offer our club house meeting room which has a full kitchen area available for use by the visiting group during their activity.<br><br>
After reading the information above and if you are still interested in using the RSME facility for hosting your activity, then please fill out the form below. Once your contact information has been received our picnic coordinator will get in touch with you to setup final details and book your date.<BR><BR>
      </td>
   </tr>
<form name="xcoords" action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
   <tr>
      <td valign="top">I have read and understand the information above.</td><td><input type="checkbox" name="liability" value="Yes" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Name: </td><td><input type="text" name="yname" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">E-Mail: </td><td><input type="text" name="email" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Telephone Number with area code: </td><td><input type="text" name="phone" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Best time to call you: (hh:mm am/pm) </td><td><input type="text" name="btime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Date Requested: (mm/dd/yy) </td><td><input type="text" name="dater" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Approximate Start Time: (hh:mm am/pm) </td><td><input type="text" name="stime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Approximate End Time: (hh:mm am/pm) </td><td><input type="text" name="etime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Approximate Number of guests: </td><td><input type="text" name="guests" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
      </td>
   </tr>
   <tr>
      <td valign="top">Comments: </td><td><textarea name="message" cols="30" rows="7" style="border: 1px solid <?=$bordercolor;?>; background: #F5F5F5"></textarea>
<input type="hidden" name="x" /> </td>
</table>
<table>
   </tr>
<tr><td colspan=2 style="font: 11px Arial; color: <?=$bordercolor;?>; border-color: <?=$bordercolor;?>; border-style: solid; border-width: 1px; background: #F8F8FF; height: 30px; width: 310px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; position: relative; font-weight: normal;">To submit this form to the Reading Society of Model Engineers. Please click the number that is presented to you on the right side of the word "click".</td>
</table></form><p><div id="coord" onclick="submitform(xcoord(event))" class="cd"></div></div><p></div>
</body></html><?php ob_end_flush(); ?>
 
  1. <?php
  2. ob_start('ob_gzhandler');
  3. session_start();
  4. include 'picnic3_inc.php';
  5. // if submit
  6. if (($_POST[x])&&(substr($_SESSION[igif], 17) === $_SESSION['afloat'])){
  7.  
  8. // posted
  9. $x = $_POST[x];
  10.  
  11. // decode, strip string and round numbers
  12. $a = base64_decode($_SESSION['afloat']);
  13. $b = 0 + $a;
  14. $a = explode(" ", $a);
  15. $a = $a[3];
  16. $bb = round($b);
  17. $aa = round($a);
  18.  
  19. // x coords
  20. $gc = explode(" ", '0 19 40 60 82 104 79 100 121 142 163 185');
  21.  
  22. // check if correct number has been clicked
  23. $ac = $aa + 6;
  24. if ($bb <= $aa){ $ac = $bb + 1; }
  25.  
  26. //wrong number clicked error message below
  27. $mess = "ERROR: Sorry " . $_POST[yname] . " the wrong number was clicked so please try again!";
  28. // if correct number clicked success
  29. if (($x >= $gc[$ac-1]) && ($x <= $gc[$ac])){
  30.  
  31. // submit your form
  32. $to  = $owner_email . ',';
  33. //$to .= email;
  34. $headers  = 'MIME-Version: 1.0' . "\r\n";
  35. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  36.  
  37. // Additional headers
  38. $headers .= 'From:<' . $_POST[email] . '>' . $_POST[yname] .  "\r\n";
  39. $headers .= 'DO NOT respond to this email. This is the RSME Picnic Inquiry Form automated responce email version 1.0.' .  "\r\n";
  40.  
  41. // Message content
  42. $messages = '<br><br>To ' . $_POST[yname] . ',' . '<p>Thank you for your inquiry about using the RSME for your groups function. For now you do not need to do anything except watch your email and your telephone for when our coordinator contacts you to go over some details and finalize plans.<br>' . '<p>Notes for the RSME coordinator: <BR>Please review the information below and contact the requestor with information about the usage of our facility.' . '<p><b>Did read rules:</b> ' . $_POST[liability] . '<p><b>Name:</b> ' . $_POST[yname] . '<p><b>E-mail:</b> ' . $_POST[email] . '<p><b>Telephonem Number:</b> ' . $_POST[phone] . '<p><b>Date Requested:</b> ' . $_POST[dater] . '<p><b>Approximate Start Time:</b> ' . $_POST[stime] . '<p><b>Approximate End Time:</b> ' . $_POST[etime] . '<p><b>Approximate Number of guests:</b> ' . $_POST[guests] . '<p><b>Comments:</b><br>' . $_POST[message];
  43.  
  44. // Mail it   
  45. mail($to, $sitename . " MAIL: Picnic Inquiry Form [BETA TEST]", $messages, $headers);
  46. $yname = $_POST[yname];
  47. ?>
  48. <script>
  49. alert("Thank you <? echo $yname; ?> for your inquiry about using out facility to host your groups function. Our coordinator will be in contact with you soon!");
  50. window.location = "<?=$redirect;?>";
  51. </script>  
  52. <?  
  53. exit; }
  54.  
  55. //demo alert message below
  56. ?>
  57. <script>  
  58. alert("<?=$mess;?>");
  59. window.location = window.location;
  60. </script>
  61. <?
  62. session_unset();
  63. session_destroy();
  64. ob_end_flush();
  65. exit;
  66. }
  67. // afloat = base64_encoded random string
  68. $afloat = base64_encode(" " . $num1 = rand(0,3) . "." . $num2 = rand(100,999) . "
  69. Float " . $num3 = rand(1,4) . "." . $num4 = rand(100,999) . "  ");
  70.  
  71. // rectangle x coord
  72.  
  73. $aler = "> 78";
  74. if(round($num1 . "." . $num2) <= round($num3 . "." . $num4)) {$aler = "< 105";}
  75.  
  76. // create random image
  77. $_SESSION[igif] = "create_gif.php?a=" . $afloat . "";
  78. $_SESSION['afloat'] = $afloat;
  79.  
  80. ?>
  81. <html>
  82. <head>
  83. <meta http-equiv="Content-Language" content="en-us">
  84. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  85. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  86. <meta name="ProgId" content="FrontPage.Editor.Document">
  87. <meta name="resource-type" content="document">
  88. <meta name="Generator" content="rsmeorga Tag Generator">
  89. <meta name="revisit-after" content="10">
  90. <meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
  91. <meta name="rating" content="Safe For Kids">
  92.  
  93. <title>Reading Society of Model Engineers</title>
  94. <base target="main">
  95.  
  96. <LINK REL=stylesheet TYPE="text/css" HREF=../../../rsme.css>
  97.  
  98. <style type="text/css">
  99. /* click image */
  100. .cd {
  101. width: 185px;
  102. height: 15px;
  103. background-image: url(<?=$_SESSION[igif];?>);
  104. background-repeat: no-repeat;
  105. position: relative;
  106. left:<?=rand(-100,100);?>px;
  107. bottom:<?=rand(-5,20);?>px;
  108. z-index: 2;
  109. }
  110. </style>
  111.  
  112. <!--        START TO VALIDATE ALL FIELDS ARE FILLED IN      -->
  113.  
  114. <script language="JavaScript">
  115.  
  116.  
  117.  
  118.  
  119. // submit form func val i date
  120. function submitform() {
  121.  
  122.  
  123. /*if($_POST['liability'] == 'YES'){
  124. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  125. return false; }*/
  126.  
  127.  
  128. if (xcoords.liability.value == "false") {
  129. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  130. return false; } */
  131. if (document.xcoords.yname.value == "") {
  132. alert("Please enter your name.");
  133. return false; }
  134. if (document.xcoords.email.value == "" || document.xcoords.email.value.indexOf("@")<1|| document.xcoords.email.value.indexOf(".")<1) {
  135. alert("Please enter a valid E-mail address.");
  136. return false;}
  137. if (document.xcoords.phone.value == "") {
  138. alert("Please enter your Phone Number.");
  139. return false; }
  140. if (document.xcoords.btime.value == "") {
  141. alert("Please enter the best time to call you if needed.");
  142. return false; }
  143. if (document.xcoords.dater.value == "") {
  144. alert("Please enter the date you would like to host your function on.");
  145. return false; }
  146. if (document.xcoords.stime.value == "") {
  147. alert("Please enter the approximate time you would like to start your function at.");
  148. return false; }
  149. if (document.xcoords.etime.value == "") {
  150. alert("Please enter the approximate time your function will be over at.");
  151. return false; }
  152. if (document.xcoords.guests.value == "") {
  153. alert("Please enter the approximate number of guests you expect at your function.");
  154. return false; }
  155.  
  156.  
  157. <!--        END TO VALIDATE ALL FIELDS ARE FILLED IN     -->
  158.  
  159. // if box coord submit else rectangle coord alert
  160. // Do not edit javascript below this line. you can edit the alert message
  161.  
  162. if (document.xcoords.x.value <?=$aler;?>) {
  163. document.xcoords.submit();
  164.  
  165. } else {
  166. alert("Click number in square identicale to number in rectangle to submit.");
  167. }
  168. }
  169. // image x value
  170. function xcoord(event) {
  171. image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
  172. document.xcoords.x.value = image;
  173. }
  174. </script>
  175.  
  176.  
  177. </head>
  178. <body>
  179.  
  180. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100">
  181.   <tr>
  182.       <td align="center" height="100" width="250" valign="top"><img src="images/rsmelogo.gif" width="178" height="88" align="center"></td>
  183.       <td align="center" height="100" width="833" valign="top"><h2>Reading Society of Model Engineers</h2><p>Berks County, Pennsylvania, USA</p></td>
  184.       <td align="center" height="100" width="250" valign="top"><img border="0" src="images/LITERAIL.gif" width="216" height="112" align="center"></td>
  185.   </tr>
  186. </table>
  187.  
  188. <div align="center"> <br><div style="background: #C0C0C0; width: 720px" align="center">
  189. <table summary="" border="0">
  190.    <tr>
  191.       <td Colspan=2 style="font: bold 18px Arial; color: <?=$fontcolor;?>" align="center"><img scr="pp-2.jpg"><br>Picnic Pavilion Information and Reservation Form</td>
  192.    </tr>
  193.    <tr>
  194.       <td colspan=2><br><BR>Please read over this information carefully as there are some general information items about hosting your activity(s) at the RSME. Following these few steps will ensure that we can help you make your activity a huge success!<br><br>
  195. <font color="red"><b>*</b></font>The typical donation for the use of the RSME facility and 15" guage train is 0.00. However, if you feel that is out of your donation range, we are more than willing to work with you and your group to reach a fair donation to host your activity(s).<BR><BR>
  196. <font color="red"><b>*</b></font>Absolutely no alcohol beverages are permitted on the property, no exceptions. This is for the safety of our guests and members alike.<br><br>
  197. <font color="red"><b>*</b></font>Children that are brought onto the property are you responsability.<br><br>
  198. <font color="red"><b>*</b></font>Do not walk on the roadway.<br><br>
  199. <font color="red"><b>*</b></font>Use walkways and foot bridges provided.<BR><BR>
  200. <font color="red"><b>*</b></font>Do not get on or off of moving trains.<br><br>
  201. <font color="red"><b>*</b></font>Passangers must stay within the confines of the cars at all times.<br><br>
  202. <font color="red"><b>*</b></font>Please obey all posted signs.<br><br>
  203. <font color="red"><b>*</b></font>Please be advised that our picnic pavilion is currently under repairs. However, we do offer our club house meeting room which has a full kitchen area available for use by the visiting group during their activity.<br><br>
  204. After reading the information above and if you are still interested in using the RSME facility for hosting your activity, then please fill out the form below. Once your contact information has been received our picnic coordinator will get in touch with you to setup final details and book your date.<BR><BR>
  205.       </td>
  206.    </tr>
  207. <form name="xcoords" action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
  208.    <tr>
  209.       <td valign="top">I have read and understand the information above.</td><td><input type="checkbox" name="liability" value="Yes" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  210.       </td>
  211.    </tr>
  212.    <tr>
  213.       <td valign="top">Name: </td><td><input type="text" name="yname" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  214.       </td>
  215.    </tr>
  216.    <tr>
  217.       <td valign="top">E-Mail: </td><td><input type="text" name="email" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  218.       </td>
  219.    </tr>
  220.    <tr>
  221.       <td valign="top">Telephone Number with area code: </td><td><input type="text" name="phone" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  222.       </td>
  223.    </tr>
  224.    <tr>
  225.       <td valign="top">Best time to call you: (hh:mm am/pm) </td><td><input type="text" name="btime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  226.       </td>
  227.    </tr>
  228.    <tr>
  229.       <td valign="top">Date Requested: (mm/dd/yy) </td><td><input type="text" name="dater" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  230.       </td>
  231.    </tr>
  232.    <tr>
  233.       <td valign="top">Approximate Start Time: (hh:mm am/pm) </td><td><input type="text" name="stime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  234.       </td>
  235.    </tr>
  236.    <tr>
  237.       <td valign="top">Approximate End Time: (hh:mm am/pm) </td><td><input type="text" name="etime" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  238.       </td>
  239.    </tr>
  240.    <tr>
  241.       <td valign="top">Approximate Number of guests: </td><td><input type="text" name="guests" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
  242.       </td>
  243.    </tr>
  244.    <tr>
  245.       <td valign="top">Comments: </td><td><textarea name="message" cols="30" rows="7" style="border: 1px solid <?=$bordercolor;?>; background: #F5F5F5"></textarea>
  246. <input type="hidden" name="x" /> </td>
  247. </table>
  248. <table>
  249.    </tr>
  250. <tr><td colspan=2 style="font: 11px Arial; color: <?=$bordercolor;?>; border-color: <?=$bordercolor;?>; border-style: solid; border-width: 1px; background: #F8F8FF; height: 30px; width: 310px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; position: relative; font-weight: normal;">To submit this form to the Reading Society of Model Engineers. Please click the number that is presented to you on the right side of the word "click".</td>
  251. </table></form><p><div id="coord" onclick="submitform(xcoord(event))" class="cd"></div></div><p></div>
  252. </body></html><?php ob_end_flush(); ?>
  253.  


Gracias,
James
Moderator Remark: Changed [quote] bbcode to [php] bbcode to read easier
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Septiembre 20th, 2011, 12:24 am

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • Avatar de Usuario
  • Registrado: Dic 20, 2002
  • Mensajes: 8922
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Nota Septiembre 20th, 2011, 8:57 pm

¿Suena como que esto es algo que desea hacer en el lado cliente versus en el lado del servidor, correcto? Si es así sólo podría usar JavaScript puro versus PHP.

Por lo tanto para este artículo:

JAVASCRIPT Código: [ Select ]
if (xcoords.liability.value == "false") {
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; }
  1. if (xcoords.liability.value == "false") {
  2. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  3. return false; }


Creo que algo como esto funcionaría en su lugar:

JAVASCRIPT Código: [ Select ]
if (document.xcoords.liability..checked == false) {
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; }
  1. if (document.xcoords.liability..checked == false) {
  2. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  3. return false; }
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • RSMEDUDE
  • Novice
  • Novice
  • Avatar de Usuario
  • Registrado: Jul 10, 2004
  • Mensajes: 33
  • Status: Offline

Nota Septiembre 20th, 2011, 11:12 pm

Gracias por la ayuda en esta Bigwebmaster. Su sugerencia funcionó a la perfección. Ahora puedo seguir adelante con otros planes en lugar de spinning mis ruedas en este proyecto. Lamentablemente para mí este sitio algo quitó en mi regazo. Me siento más cómodo con ASP debe y allí porque estoy aprendiendo como ir obtener algunos de estos "avanzada" función funcionando en el sitio Web de clubes.

Podría pedir un otro favor pequeña y hacerlo sólo para tener un general "plantilla" para volver a. Yo también no significa ser un dolor pero, ¿cómo podría lograr lo mismo con un grupo de secciones de botón de radio. Por ejemplo si tengo Elemento1 punto2 item3 y asegúrese de que uno de ellos es seleccionado. ¿Cómo podría hacerlo?

Supongo que es una frase si muy similar, pero no estoy seguro de lo que necesito para editar a mano. Mientras espero una respuesta lío con esto así y ver lo que yo puedo llegar a en mi propia. Sin embargo podría apreciar de escuchar lo que usted o alguien más recomienda como respuesta así!

Respetuosamente,
James

Bigwebmaster escribió:
¿Suena como que esto es algo que desea hacer en el lado cliente versus en el lado del servidor, correcto? Si es así sólo podría usar JavaScript puro versus PHP.

Por lo tanto para este artículo:

JAVASCRIPT Código: [ Select ]
if (xcoords.liability.value == "false") {
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; }
  1. if (xcoords.liability.value == "false") {
  2. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  3. return false; }


Creo que algo como esto funcionaría en su lugar:

JAVASCRIPT Código: [ Select ]
if (document.xcoords.liability..checked == false) {
alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
return false; }
  1. if (document.xcoords.liability..checked == false) {
  2. alert("Please put a check in the box noting that you have read over and understand all the information presented on this page.");
  3. return false; }

Publicar Información

  • Total de mensajes en este tema: 3 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 201 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC