westman Posted April 18, 2012 Report Share Posted April 18, 2012 to post a form i have been using...<input name="formSubmit" type="submit" value="Send" />as normel and it works good but can i submit a form from a link...<a href="#">submit</a> is this posible? if so how? Link to comment Share on other sites More sharing options...
eTianbun Posted April 19, 2012 Report Share Posted April 19, 2012 (edited) YES, with javascript.EXAMPLE:NORMAL HTML FORM <form id='sub' action='reg.php' method='post'><input type='text' id='email'/></form> LINK TO CLICK <a href="javascript:document.getElementById('sub').submit()">Submit</a> Note that when javascript is disabled in the browser, you® form will not submit! Edited April 19, 2012 by eTianbun Link to comment Share on other sites More sharing options...
westman Posted April 19, 2012 Author Report Share Posted April 19, 2012 thank you this works well but if you have "required" in the form like.. <input type="text" name="name1" id="name1" size="30" maxlength="50" required /> it dose not work. is they a way around it? Link to comment Share on other sites More sharing options...
eTianbun Posted April 19, 2012 Report Share Posted April 19, 2012 HTML5 attribute right?Well, i think you should remove it then, since it is a new attribute, because browsers like safari/IE do not support it, so you still have to validate it with script(s). Link to comment Share on other sites More sharing options...
westman Posted April 19, 2012 Author Report Share Posted April 19, 2012 ok thank you for your help very helpfill Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now