wizerm Posted August 30, 2006 Share Posted August 30, 2006 I know this is a PHP forum but wasn't sure where else to turn for help. And since this forum helped out alot last time I figured someone may know what I am looking for hopefully. I am needing to know what I am missing to make this code for my submit button for my php contact form work. I just need to know if I am needing smoe javascript to make the following code work. Thanks for any help.<a href="javascript:document.mailer.send.value='yes';document.mailer.submit();"><img src="images/send_btn.gif" alt="Send" name="SendBtn" border="0" /></a> Quote Link to comment Share on other sites More sharing options...
obsidian Posted August 30, 2006 Share Posted August 30, 2006 what are you trying to do with it? it looks as though you're simply changing the value of the submit button and then submitting the form when someone clicks on the image... is that all you're after? Quote Link to comment Share on other sites More sharing options...
wizerm Posted August 30, 2006 Author Share Posted August 30, 2006 Yes it is all I am after. I don't know alot about javascript so I didn't know if I was needing some extra javascript to make it work. Quote Link to comment Share on other sites More sharing options...
obsidian Posted August 30, 2006 Share Posted August 30, 2006 you should be fine as long as the form you want submitted is named "mailer" and your submit button is named "send".good luck! Quote Link to comment Share on other sites More sharing options...
wizerm Posted August 30, 2006 Author Share Posted August 30, 2006 Here is what I have as far as code....<form action="contacts.php" method="post" name="mailer"> <INPUT type="hidden" name="send" value="no"> <div> <label for="sender_name">Your Name:</label> </div> <div class="contacts-form-input"> <input type="text" name="sender_name" id="sender_name" onfocus="if(this.value=='Please enter a name'){this.value=''; this.style.color='#94969C';}" value="" /> </div> <div> <label for="sender_email">Your E-mail:</label> </div> <div class="contacts-form-input"> <input type="text" name="sender_email" id="sender_email" onfocus="if(this.value=='Invalid email'){this.value=''; this.style.color='#94969C';}" value="" /> </div> <div> <label for="mail_body">Message Body:</label> </div> <div class="contacts-form-textarea"> <textarea name="mail_body" rows="9" cols="16" id="mail_body"></textarea> </div> <div style="padding-top: 15px;"><a href="javascript:document.mailer.send.value='yes';document.mailer.submit();"><img src="images/send_btn.gif" alt="Send" name="SendBtn" border="0" /></a></div> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.