0
<input type="button" 
               value="Register" 
               onclick="return regformhash(this.form,
                               this.form.username,
                               this.form.email,
                               this.form.password,
                               this.form.confirmpwd);" /> 

When i try to click on that its like no reaction. Just trying to add informations from form, to my php script.

12
  • Have you check in browser debug mode if the regformhash function is called? Commented Nov 17, 2017 at 12:14
  • how to do that? im using Chrome, and checked this form on Safari and Firefox. Commented Nov 17, 2017 at 12:14
  • any errors in the dev console ? Commented Nov 17, 2017 at 12:17
  • Learn to use the Chrome developer tools. They'll make your life much easier: developer.chrome.com/devtools Commented Nov 17, 2017 at 12:17
  • Press F12 and go to the Sources tab. Look for your code page and use breakpoints where you have the function defined. Commented Nov 17, 2017 at 12:17

1 Answer 1

1

The following is working snippet with your example for username field, add your other input fields and pass those to function.

function regformhash(form, username){
            alert("username:  "+username);

           }
          
<form>
  <input type="text" value= "myUserName" name ="username"/>
  <input type="button" value="Register" onclick=" regformhash(this.form,this.form.username.value);"/> 
          
</form>
          
          
  
          

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.