Jump to content

mikalchristian

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by mikalchristian

  1. Hello, I have an email form here for patients to set appointments. It has a built in clickable calendar that displays the date you choose in a text box to be submitted with the email. It works great except when I click on the calendar it submits the form. How can I get it to only submit when the"submi" button is clicked? Thanks Heres the code. <body><form name="contactform" method="post" action="send_form_email.php"> <table width="509"> <td width="183"></tr> <tr> <td valign="top"> <label for="first_name">First Name *</label> </td> <td width="314" valign="top"> <input type="text" name="first_name" maxlength="50" size="40"> </td> </tr> <tr> <td valign="top""> <label for="last_name">Last Name *</label> </td> <td valign="top"> <input type="text" name="last_name" maxlength="50" size="40"> </td> </tr> <tr> <td valign="top"> <label for="email">Email Address *</label> </td> <td valign="top"> <input type="text" name="email" maxlength="80" size="40"> </td> </tr> <tr> <td valign="top"> <label for="telephone">Telephone Number</label> </td> <td valign="top"> <input type="text" name="telephone" maxlength="30" size="40"> </td> </tr> <tr> <td valign="top"> <label for="comments">Comments *</label> </td> <td valign="top"> <textarea name="comments" cols="40" rows="6"></textarea> </td> </tr> <tr> <td colspan="2" style="text-align:center"> </td> </tr> </table> <table width="497" border="0"> <tr> <td width="184"> </td> <td width="303"> </td> </tr> <tr> <td><table width="179" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="179" height="22">1st Choice</td> </tr> <tr> <tr> <td height="5"></td> </tr> <td height="22">2nd Choice</td> </tr> <tr> <tr> <td height="5"></td> </tr> <tr> <td height="22">3rd Choice</td> </tr> </table></td> <td> <input size="30" id="f_date1" /><button id="f_btn1">...</button><br /> <input size="30" id="f_date2" /><button id="f_btn2">...</button><br /> <input size="30" id="f_date3" /><button id="f_btn3">...</button><br /> </td> </tr> </table> <p> </p> <script type="text/javascript">//<![CDATA[ var cal = Calendar.setup({ onSelect: function(cal) { cal.hide() }, showTime: true }); cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d %I:%M %p"); cal.manageFields("f_btn2", "f_date2", "%b %e, %Y %I:%M %p"); cal.manageFields("f_btn3", "f_date3", "%e %B %Y %I:%M %p"); cal.manageFields("f_btn4", "f_date4", "%A, %e %B, %Y %I:%M %p"); //]]></script> <input type="submit" value="Submit"> </form>
  2. Hey Guys, thanks for all your help! I got theanswer I needed. Thanks
  3. Hello, I am new to the board and PHP. I created a simple store locator app with PHP. It pulls the info from a database. I want to take the website field from the table, once it is returned from the query, and have it print out a a hyperlink. Please help. Thanks, I have posted most of the relevant code. <?php if (isset ($stores)) { if (!empty ($stores)) { echo '<p><strong>' . count ($stores) . ' results were found.</strong></p>'; foreach ($stores as $value) { echo '<p><strong>' . $value['name'] . '</strong><br />'; echo $value['address'] . '<br />'; echo $value['town'] . ', ' . $value['state'] . ' ' . $value['postal']; echo ' <a target="_blank" href="http://maps.google.com/maps?q=', $value['address'], ' ', $value['town'], ', ', $value['state'], ' ', $value['postal'],'">Map this location</a><br />'; echo 'Phone: ' . $value['phone'] . '<br />'; echo 'Website: ' . $value['website'] . '<br />'; echo 'Email: ' . $value['email'] . '<br />'; echo 'Hours: ' . $value['hours'] ; echo '</p>'; } } else { echo '<p><strong>No results found</strong></p>'; } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.