how to submit form without a submit button in PHP ?

hoangvu

New member
Joined
Jun 6, 2012
Messages
1,835
Points
0
I am using DHTMLXslider in a form and I want form to submit slider value to php file whenever slider value change. I tried using onchange and onclick event but it doesn't work. Here is my code. Is there any solution?

Code:
<form method="POST" target="content" action="here.php" id="myform">
<input class="dhtmlxSlider" skin="ball" min="10" max="20" step="1" type="text" name="slider2" id="slider" style="width:200px" value="20" onclick="this.form.submit()"/>  
<br>

</form>
Please help.
 
Last edited by a moderator:

Jack London

New member
Joined
Jul 9, 2012
Messages
386
Points
0
with your code

Code:
<input  class="dhtmlxSlider" skin="ball" min="10" max="20" step="1" type="text" name="slider2" id="slider" style="width:200px" value="20" onclick="this.form.submit()"/>  
<br>
</form>
Add it to it

Code:
<script type="text/javascript">
  document.getElementById('slider').submit();
</script>
Ok.
 
Newer threads
Replies
17
Views
23,280
Replies
0
Views
3,614
Replies
4
Views
5,422
Replies
15
Views
13,802
Replies
0
Views
3,380
Latest threads
Replies
1
Views
34
Replies
0
Views
42
Replies
0
Views
41
Replies
1
Views
54
Replies
3
Views
122
Recommended threads
Replies
6
Views
7,919
Replies
19
Views
7,265
S
  • Locked
Replies
2
Views
4,409

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top