Solved

html form submit

Posted on 2014-01-28
7
246 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

911 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

27 Experts available now in Live!

Get 1:1 Help Now