Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

html form submit

Posted on 2014-01-28
7
251 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 33

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 33

Expert Comment

by:Big Monty
ID: 39815785
can you post your server side code?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

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

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 33

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML - Color not displaying correctly in EMAIL. 6 49
How to use question mark (?) in filename with html 25 73
multiple selects 23 49
send email part1 9 28
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

828 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