unemployment Posted April 15, 2011 Share Posted April 15, 2011 How can I get this form to execute? Do I need to use a hidden input or something? <form action="partnerRequest.php" method="post"> <a href="" title="Become Associates" id="becomeassoc" class="mll"> <span class="f_right">Become Associates</span><img src="../assets/img/becomeassoc.jpg" class="mrs vmiddle" alt="Become Associates" /> </a> </form> Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/ Share on other sites More sharing options...
Pikachu2000 Posted April 15, 2011 Share Posted April 15, 2011 What do you mean 'execute'? The form has no <input> fields, including no submit button. Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201872 Share on other sites More sharing options...
kenrbnsn Posted April 15, 2011 Share Posted April 15, 2011 You don't have any form tags in the form like "<input>" or "<textarea>". What are you trying to do? This is more of a general HTML question, since there is no PHP in the code at all. Ken Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201874 Share on other sites More sharing options...
unemployment Posted April 15, 2011 Author Share Posted April 15, 2011 basically I just want to have the form submit / post when the link is clicked. Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201880 Share on other sites More sharing options...
kenrbnsn Posted April 15, 2011 Share Posted April 15, 2011 You can either make your image in to a submit button or use Javascript/AJAX to submit the for when the link is clicked. Ken Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201886 Share on other sites More sharing options...
unemployment Posted April 15, 2011 Author Share Posted April 15, 2011 The image method doesn't really seem to work for my need since the image is only a small icon next to the text, in which case many people will click on the text, not the icon. I have no idea how to do this via ajax? Is that really the best alternative? Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201888 Share on other sites More sharing options...
TapeGun007 Posted April 15, 2011 Share Posted April 15, 2011 This what you're looking for? <form action="partnerRequest.php" method="post"> <input type="radio" name="becomeassoc" onClick="this.form.submit()"><span class="f_right">Become Associates</span><img src="../assets/img/becomeassoc.jpg" class="mrs vmiddle" alt="Become Associates" /> </form> Doesn't have to be a radio button, could be a checkbox or whatever. Quote Link to comment https://forums.phpfreaks.com/topic/233779-execute-form/#findComment-1201895 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.