Displaying Results From A Drop Down Option

I am still trying to get my feet wet with ASP, VBScript, and MS SQL here and I am trying to create a very useful page where I can eaisly view my SQL tables and the columns within those tables.

I have two SQL scripts that work well, one to display the tables within my database and one that shows me the column names in that table.

I created a form, added a drop down selection and coded it so the table names appear in the drop down, then added a "Submit" button.

What I am trying to do is get the page to display the column names below based on the table name I select from the drop down list.

ISSUE #1: I cannot seem to get the table name when chosen from the drop down to pass it's value to the second query so it can display the results.

ISSUE #2: How do I display these results from the chosen table name based on the column script below? Code:

View Replies


ADVERTISEMENT

Drop Down Menu Select An Option

Is there a way to have a drop down menu where u can select an option from the menu or type in ur own??? I am using ASP and SQL

View Replies View Related

Insert Selected Drop Down Option

I have page 1, that has a drop down box with codes. The user could either select a code or click a link that opens a page with a drop down consisting of descriptions.this is what I am trying to do.When user selects an option in page 2 drop down, the page 2 should be closed and the selected value should be inserted in page 1 drop down. How could I do this in asp?

View Replies View Related

Option Selected In Drop Down List

What is the way to make an option in a drop down box selected if dependant upon a variable.eg have list of states and once a customer has been selected the state reflects the customers state in say an edit customer form.

View Replies View Related

Posting A Selected Option (drop Down List)

I cannot get the selected option to be POSTed (it does not appear in the
QueryString when using GET neither)

I construct the drop down list from an array, I select an element in the
list, I POST using a submit button. When I use Request.Form("NAME") it's
always empty. Is the selected item is Posted? How to retreive it?

Response.Write "<SELECT NAME>"
for i = LBound(aRessource, 1) to UBound(aRessource, 1)
Response.Write "<OPTION VALUE=" & i & ">"
Response.Write aRessource(i, 0)
next
Response.Write "<OPTION SELECTED>"
Response.Write "</SELECT>"

View Replies View Related

Dynamically Populate Drop Down Menu Option Value Problem

I have dynamcally populated a drop down menu with data from an access
database using ASP. The values seem fine, however when i pass them to
the next page (using form get method) the whitespaces in the values
are ignored.

For example with <option value=jim jones> then only "jim"
gets passed to the next page not "jim jones". I have viewed the source
created on the dynamic page and the values are populated fine, but
passing to the next page seems to be problematic...

View Replies View Related

How To Post A Page Automatically When An Option Is Chosen From A Drop Down List

what I want to do is - the user is presented with a form with a drop down box at the top with two options - Yes or No, If No is selected then the form stays as is and the user can complete the other text boxes.

However, if the user selects yes I want the page to refresh with a different set of input boxes.

View Replies View Related

Displaying Results

I am reading information from a sql db and would like for the information to display, which i had working, until i tried making it so that if there was no information in the db field, that it would not display any results. Here is a snippet of the code. Any thoughts.

if name <> "" then
Response.Write("Name: " & recordset("name")& "<br>")
end if

if company <> "" then
Response.Write("Company: " & recordset("company")& "<br>")
end if

if title <> "" then
Response.Write("Title: " & recordset("title")& "<br>")
end if

View Replies View Related

Displaying Results From SQL Query

I'm stuck on trying to display a single row from a query I'm executing.. it was fairly easy in PHP and I'm sure it is in ASP too, I'm just not sure what to code.. I couldn't find anything on the web that was simple.

If anybody has some suggestions on how to display just the one row that is returned from the query that would be great for now. I'm looking to eventually add 'LIKE' to the query to allow for similar names/passwords to be displayed.. but for now this should do. Here's the code:

View Replies View Related

Sorting By Two Fields From Drop Down Menu - No Results

I am trying to create a page where someone can search an Association directoy by category. The results page should then pull up all the companies that fall under that category and sort the company names alphabetically. The search & results pages are loading, but show no results under all categories. Code:

View Replies View Related

Displaying ASP Search Results Issue

Well I was able to build a simple search page, that would search a database and give the results on the restuls page from the criteria on the search page....

However I am having a issue with the data that's shows in the results. I'm getting the ID Column of the table in stead of the Column with the names. Eg:

<%=(births.Fields.Item("DName").Value)%>

Is there a way to change the data to be displayed to another column?

View Replies View Related

Displaying Query Results Per Where Clause

I am trying to design a page that displays data from a query in groups of a field in the where clause and then displays a 'total' per each group. Code:

View Replies View Related

Adding To Tables Together And Displaying The Results

i run a classified ads site that allows people to post ads, and stores the results in a ms access database.

2 of the imput fields are: price and quantity

What i am trying to do is the following:

To add all the prices and and quantities together and be able to display the results on my site for example my database has the following:

Price | Quantity
2.00 | 300
1,50 | 1
10.00 | 10
140,00 | 7

and on the website i can display the results like so:

Current ads worth: 1681.50

I need the script to ignore letters as in the quantity field people have also added word such as packs and VE ETC so i need it to ignore letters, however in the price field some people have placed the ( , ) sign in there price so the code must recognize ( , and . )

View Replies View Related

Displaying CrossTab Query Results

Has anyone experience with rendering CrossTab Query results with ASP?

For example, using this SQL:
TRANSFORM Count(threads.threadid) AS CountOfthreadid
SELECT threads.threadSeverity, Count(threads.threadid) AS [Total Of threadid]
FROM threads
GROUP BY threads.threadSeverity
PIVOT threads.threadStatus;

This returns the following in Access:
[threads_Crosstab] [threadSeverity] [Total Of threadid] [Analyzing] [Closed] [Coding] [Open] [Re-Testing]
[Medium ] [1] [1]
[Not Set] [160] [1] [122] [1] [35] [1]

I want to create a HTML table to display the results in my webpage. However, I don't belive the output from a "Transform" is a true recordset. When I request the names of the fields in the recordset, I am getting data from the "rows".

Is there standard way to display these types of queries? How does one access the data in a crosstab query? Are there ojbect classes to handle this?

View Replies View Related

Displaying Quiz/test Results On Same Page

I have created a quiz with 14 questions that the user can click a yes radiobutton or no radiobutton. In the code-behind I have set a varable to store the selected items.

What I have taking place is if yesRadiobutton is selected the variable is incremented by 1. then after all the radiobuttons have been added up. i check the variable using an if statement. Code:

View Replies View Related

Displaying A Drop Down Selection With ASP

I have the following drop down menu on a html page and when submitting
i would like to call out on asp what someone has selected.

<select size="1" name="type">
<option value="Prospect">Prospect</option>
<option value="Suspect">Suspect</option>
<option value="Qualified">Qualified</option>
<option value="Proposed">Proposed</option>
<option value="Closed">Closed</option>
<option value="Lost">Lost</option>
</select></b></p>

I also have regular fields on the html page which works great when
submitting but for some reason i can't get the dropdown selection to
display Code:

View Replies View Related

Display Drop Down Options Based On The Selected Item From Another Drop Down

The code that I have has 2 drop down boxes dd1 (visible) and dd2 (hidden). Based on the option selected in dd1, dd2 should be visible and populate options. I think I can have OnChange script but how could I return the value and put it in the SQL query (see variable in red in thecode)? Code:

View Replies View Related

Option Tag

how can i create an option tag whith the onpick event?

View Replies View Related

Option Value

if the default value of my my option value i want to retrieve it from the record if it's not empty. how can i do it? for example Code:

View Replies View Related

OPTION Value

Is there a way I can iterate an option value using ASP so I can pass in multiple values on submit to the Federated item? Here's an example of pseudocode of what I'm trying to do:

<SELECT name="grpNm" style="LEFT: 8px; WIDTH: 213px; TOP: 1px">
<OPTION value="XXXXXXXXXXXXXXX">Federated
</OPTION>
</SELECT>&nbsp;&nbsp;

View Replies View Related

Option Value Tag

Below is an extract from a form that i am writing. I need the user to be able to have a drop down menu of languages. How do I use the 'option value' command in ASP like you can do in HTML.If someone could amend my code to give me a couple of language options so I can get an idea of how it is down.

<tr id="r_Lang">
<td class="ewTableHeader"><span>Language<span class='ewmsg'>&nbsp;*</span></span></td>
<td class="ewTableAltRow"><span id="cb_x_Lang">
<input type="text" name="x_Lang" id="x_Lang" size="30" maxlength="25" value="<%= Server.HTMLEncode(x_Lang&"") %>">
</span></td>
</tr>

View Replies View Related

Option Value

i have a dynamically created drop down menu where the values are pulled from our database. i've been trying with no success to pass those values to the page but it never works.

how do you pass the values from the <option value="<%=...%></option>? i thought you recalled it in the sql statement like:
Code:

" WHERE Something = '" & Request.Form("optionvalue") & "' "

View Replies View Related

Vb 6 Option Button

I am trying to get a font of a label to change to times new roman when an option button is clicked, i have tried this:

Private Sub optHigh_Click()
lblHeading.FontName=Times New Roman

End Sub

This is wrong but i cant work out how to get the font to change,

View Replies View Related

Option Disable Value

how extract previews option value disable from script.

View Replies View Related

Option Selected?

I have a form named: 'formhandheld' and a select with the name: 'pricing_option'.

I'm trying to make the select <option> thats based on 'axDD3current' selected.

what's the code ? Probably more of a JavaScript question than ASP

document.formhandheld.pricing_option.options[<%=axDD3current%>].selected;
the above doesn't work

View Replies View Related

ASP Dropdown Option Value

Here is my page:

<form name=myForm>
<select onChange="myForm.forename.value = this.options[this.selectedIndex].value;">
<option value="Arnold">Pam
<option value="Mokoena">Joe
<option value="Seth">Pat
</select>

<input type=text name=forename disabled>
</form>

when inserting on the database,the value of the dropdown option is the same as the value of the textbox which is wrong.they must not have the same values example
when Pan is selected,then the value inserted to the database must be "pam" not Arnold.

View Replies View Related

Tooltip For Each Option In DDL

I have a dropdown list on my page. It is populated with values from database ;some values are unsually long that the DDL extends to the right of the screen where i need to scroll to find the arrow.

if i dont i wudn be able to read the values fully[i.e only half the length can be read]. Hence i wud like to provide a toottip for each <option> in the DDL whch will help me read the values onmouseover event. Hope I am clear abt it.Thus me scrolling to the right can be avioded.

View Replies View Related

How To Get The Value From Option Button

I created one ASP page for Online Test. i get all the questions from database. In home page if user select the topic and no. of questions then its displayed in second page.

My trouble in Second Page, becs I show the questions like:

Ques No. Ques Name
====== =========
1. XXXXXXXXX

(1) ans1(Option Button)
(2) ans2
(3) ans3
(4) ans4

untill the users selection of question numbers. all this are created dynamically. if user submit the answers next page shows the result. How can i get the User answer(Option button) in Text Box or other ways.

View Replies View Related

Passing 2 IDs Through An Option To Db

I need to pass an Cat_ID and Category from an option field on a form, but can't figure it out. the code on my form:

<select name="Cat" >
<% Do Until rscat.EOF %>
<option value="<% response.write rscat("Category") %>">
<% response.write rscat("Category") %>
</option>
<%
rscat.MoveNext
Loop
%>
</select>

In the database, I have two fields which need to be filled in. The Category field and the Cat_ID field. How do I assign two values to the one field to pass this along?

View Replies View Related

Option On A Page

I want to know if you can write a print this page option to a page. I want to write this function in asp or vbscript. I know you can do this in javascript but I don't want tot use this. I also know there is a print fuinction in the browser this is also not what I'm looking for.

I want a piece of tekst which say something like "print this page" When you click on it a asp or vbscript will print the page to your own printer.

I need to know if this is possible and what the code is.

View Replies View Related

Option Select

i have a list of provinces in an option select right, so when i click one province i want it to chance the header of my page according to the provinces, and i have no idea on how to do that.

View Replies View Related

Select/Option

I have loaded a combobox (select) with a recordset from SQL Server. I am trying to accomplish two things, so I will break them up.1) Is there a way to allow the user to enter as many characters in the dropdown menu. For example, if you have serveral options in the dropdown menu that start with A, they can key in app.. to got to apples, instead of entering A and then having to keydown or click on the dropdown menu.

Granted there is a solution to #1, could you also allow the user to key information and if it is not apart of the dropdown menu, insert the value back into SQL (kind of like an notonlist event in Access).I have googled this and can't find anything, probably wrong keywords used.

View Replies View Related

Getting Option's Text Value

I have a select list that gets populated from the DB. When the user makes a selection I am able to retrieve this value via Request.Form(...) However, I am wondering if you can retrieve the text value using ASP? I know this can be done in JavaScript using the options text attribute, but it is possible in ASP?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved