473,503 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get an element in ASP

16 New Member
Hey all.

Lets say I want to make an element (ex. an HTML select element) invisible when the user clicks a certain button.

How do I access that element in an ASP page, using VBscript (I will be using a database)?

Thanks
Mar 25 '07 #1
2 1352
hini
23 New Member
if you do not want to pass any value to the server you can do it from javascript by encapsulating the select in a DIV tag. check this example:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. function toggleSelect()
  5. {
  6.     if (document.getElementById("divSelect").style.display != '')
  7.     {
  8.         document.getElementById("divSelect").style.display = '';
  9.         document.getElementById("btnToggleInt").value ='Hide Select';
  10.     }
  11.     else
  12.     {
  13.         document.getElementById("divSelect").style.display = 'none';
  14.         document.getElementById("btnToggleInt").value ='Show Select';
  15.     }
  16. }
  17.  
  18. </script>
  19. <body>
  20. <input id ="btnToggleInt" type="button" onclick="toggleSelect()" value= "Hide Select">
  21. </br>
  22. <div id="divSelect">
  23.     <select>
  24.         <option>1</option>
  25.         <option>2</option>
  26.     </select>
  27. </div>
  28. </body>
  29. </html>
  30.  
Mar 26 '07 #2
jhardman
3,406 Recognized Expert Specialist
How do I access that element in an ASP page, using VBscript (I will be using a database)?
On the page where the data is sent (form action="myHandler.asp" then myHandler.asp is sent the data) the data will be called 'request.form("nameOfInput")'
Expand|Select|Wrap|Line Numbers
  1. query = "SELECT * FROM userTable WHERE userName = '" & request.form("userName") & "'"
Let me know if this helps.

Jared
Mar 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3358
by: Igor | last post by:
Is there any way to resort and xml document using xslt based on element position. For example if I have xml like this: <root> <element> 1st thing </element> <element> 2nd thing </element>...
4
2370
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
6
2430
by: Wole Ogunremi | last post by:
I guess this is a well asked question but it is tripping me up! I'm putting a forum together allowing xhtml markup content. I am validating against a schema but getting "Could not find schema...
5
3100
by: Patient Guy | last post by:
In my reading of the Strict and Transitional DTD for HTML 4.0, the table row (TR) elements are contained within table section elements: THEAD, TFOOT, and TBODY. The table section elements are...
6
13334
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... ...
1
1755
by: jrmsmo | last post by:
Hi there, I have an interesting problem that maybe you pros can suggest how I solve. I'm working with a third party program that serializes an XML document (it was obviously not designed with schema...
4
2896
by: patrizio.trinchini | last post by:
Hi all, I'm new to XSLT and maybe my problem have a very trivial answer, but I need an expert that point me in the right direction. What I would obtain is to remove all the elements that have a...
3
11669
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works...
8
1926
by: VK | last post by:
Can be multiple instances of element used as the root element? That's a curly way of asking, but I did not come up with a better sentence, sorry. What I mean is with a document like: <?xml...
2
18131
by: mlb5000 | last post by:
I seem to be having issues validating an XML document using my schema. Both are below: The Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.