Solved

html form submit

Posted on 2014-01-28
7
245 Views
Last Modified: 2014-01-28
hi.
I can get the value of "console" textbox if I remove id="console"
why? and how I solved, I use id="console" for complicated jquery

<form method="POST" action="xxxx.asp" name="executeform">
<textarea name="console"  id="console" rows=10 cols=80  ></textarea>
<button type=submit id="xxxSQL" onclick="document.getElementById('executesqlform').submit();">Execute SQL</button>
</form>

Open in new window


thanks
0
Comment
Question by:ethar1
  • 4
  • 3
7 Comments
 
LVL 32

Expert Comment

by:Big Monty
ID: 39815566
all of your attribute values should be surrounded by quotes:

<textarea name="console"  id="console" rows="10" cols="80"  ></textarea>

also, you do not need the onclick event on your button if it's a submit button:

<button type=submit id="xxxSQL" onclick="document.getElementById('executesqlform').submit();">Execute SQL</button>

should be

<button type="submit" id="xxxSQL" >Execute SQL</button>
0
 

Author Comment

by:ethar1
ID: 39815632
same result
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 39815785
can you post your server side code?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:ethar1
ID: 39816015
pExecuteSQL = Request.Form("console")         
Response.write pExecuteSQL
0
 
LVL 32

Expert Comment

by:Big Monty
ID: 39816088
what do you get written out to the screen if you run this code on its own:

<%
if Request.Form("btnSubmit") = "1" then
     Response.Write "console: " & Request.Form("console")
end if 
%>
<html>
<head></head>
<body>
<form method="POST" action="test.asp" name="executeform">
<textarea name="console"  id="console" rows="10" cols="80"  ></textarea>
<button type=submit id="xxxSQL" name="btnSubmit" value="1">Execute SQL</button>
</form>
</body>
</html>

Open in new window

0
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39816089
if that works for you, then there's something else with your code. It's hard to tell without seeing the whole page
0
 

Author Closing Comment

by:ethar1
ID: 39816186
ohh, I am very sorry ,... it was my mistake , I handle click event on javascript file

thanks Big Monty
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now