• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

html form submit

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
ethar1
Asked:
ethar1
  • 4
  • 3
1 Solution
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
 
ethar1Author Commented:
same result
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
can you post your server side code?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ethar1Author Commented:
pExecuteSQL = Request.Form("console")         
Response.write pExecuteSQL
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
if that works for you, then there's something else with your code. It's hard to tell without seeing the whole page
0
 
ethar1Author Commented:
ohh, I am very sorry ,... it was my mistake , I handle click event on javascript file

thanks Big Monty
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now