Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

forms submition with onClick="document.....how?

Featured Replies

How to submit forms with onClick

 

<a href="#"  onClick="document.getElementById('ContactForm').submit()">Send</a>

 

I ask you please some guidance.

As I have not found elucidative literature I made up my mind to post.

 

How to pass variables with data to my php script ??

 

<form method="POST"  name="form" id="form"  class="form-1" action="">

 

Thank you for your attention.

Edited by Renaissance-Design
Please use the code button or tags to format your code.

Inline event handlers are not good practice. Give your form a RESTful target and prevent default handling with a Javascript event listener.

 

If the method is POST, the variables will be available in the $_POST superglobal.

  • Author

So how to keep the neat aspect of the button and submit the form ;

If I can´t format with css the <input name="send" type="submit" class="button" id="send" value="" /> to appear exactly as a <a href...... class=""....

So how to keep the neat aspect of the button and submit the form ;

If I can´t format with css the <input name="send" type="submit" class="button" id="send" value="" /> to appear exactly as a <a href...... class=""....

 

You can. Either use the attribute selector:

 

input[type=submit] {

}

 

or just give it a class.

  • Author

You can. Either use the attribute selector:

input[type=submit] {
}

or just give it a class.

It works fine.

If I want to add hover function then I will need a js script I suppose ?

Thank you for your help.

input[type=reset] {

}

 

 

is there a way to make it work with <input type="reset" name="reset" ...... ?

input[name="reset"] {
}

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.