?
Solved

html form submit

Posted on 2014-01-28
7
Medium Priority
?
256 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
[X]
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
  • 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

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 2000 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

752 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