Dynamic Populated Dropdowns
I don't want to try and reinvent the wheel so I'm looking for an ASP 3 script that will dynamicaly populate a nubmer or dropdown boxes from an access database, read a price from the the database and write both the selection and the price to a form and total all the prices too.
View Replies
ADVERTISEMENT
I'm creating a form to update a series of records. For four of the fields, I want the options available to the user to be limited by dropdowns. One dropdown is generated from a table in the database, the other two are generated by arrays I've written.
The problem is the dropdowns aren't picking up the value stored in the database for each record. The text fields are picking up the correct values, but not the dropdowns. For one set of records the dropdowns are only picking up the first (default) option; with another set of records, the first record's dropdowns are correct, but then the subsequent records' dropdowns repeat the values of the first one. Code:
View Replies
View Related
Code:
' then set up a query
' -----------------------------------------------
sQuery = "SELECT DISTINCT * from tablename Order By columnA, columnB " ' << insert your own sql here
could someone give an example so I could follow it?
View Replies
View Related
I am trying to generate a querystring to a URL from a DB Value. Is this the right way of adding a querystring?Code:
<a href="Organization_UL_Revised2.asp?ID="<%=aTopManagers(c_Owner_Payee, 0)%> class="a_style" onclick="s_Hide('<%=aTopManagers(c_Owner_Payee, 0)%>'); return false;"><%=aTopManagers(c_Mgr_Name, 0)%></a><font size=1>(<%=aTopManagers(c_Mgr_EmpID, 0)%>)</font>
View Replies
View Related
I have a drop down list that is populated by a database, all the items are pure text.
I am using this line of code:
msgbox(listAccom.Items(listAccom.SelectedIndex).text)
but no matter what item is selected it always returns the very first value. However Identical code works on a different page I have created. Can anyone offer suggestions as to why this might be.
View Replies
View Related
A starting price grabbed from querystring is shown to begin with. Then the options are shown(prices next to them) with checkbox(populated with over 90 options) and the user selects the options and a new total comes up upon submit. So the total of the options is a subtotal and the home and options together is the grand total. Code:
View Replies
View Related
I have a simple form on my site with a drop down list for users to search for a specific category. The search works fine and populates my results page with the correct responses.
Alongside the results I have included the search form again so that users can modify their search, however I am unable to pre-populate the drop down menu with the previously selected category.
I have tried an IF statement but this only works when I hard code the variables in. Please can you cast your expert eyes over my code, I have a feeling I am suffering from fatigue as I have been trying to solve this for some time now. Code:
View Replies
View Related
I have an ASP page. On that ASP page I have three columns. Each column contains one dropdown box. I wanted to make them dependant of each other and I think I did it.
When the user clicks on the submit button after making his selection in the first dropdown, I have an sql for the second dropdown which will automaticly not show the first selection as a option in the second dropdown. So far, it's allright.
When the user makes his second selection and hits the second submit button below the second dropdown, same thing should happen with the third dropdown box and its SQL query. I use SQL to extract records from an MS Access database.
However, in the third dropdown I don't get the value selected already in the second dropdown, but the value already selected in the first dropdown now shows up????
View Replies
View Related
My ASP page contains around 35 dropdown controls. If I try to open this page
from a Win98 OS , the dropdowns appear jumbled up. They overlap on each
other. However, this problem is not reported on any other Windows OS.
View Replies
View Related
i have a form and i need the selection from the first dropdown to influence the results on the second dropdown.The first dropdown will have a list of guesthouses and based on the guesthouse chosen, the second dropdown will give the rooms available in that chosen guesthouse.
View Replies
View Related
I am hoping a mixed ASP- Javascript programmer could help me with this scenario:
I have a list box populated with randomized records (NewID()) from a Broker (Salesperson) sql server table.
Each time the user selects one of the broker items I need to display a Image of the broker in the table cell next to it.
I have found a number of online js scripts that use the image selector route but I am unable to work out to populate the list item from the database AND at the same time utilize the JS...
Are there any coders who come across a solution like this. Here is an example of my ASP code populating the List box: .....
View Replies
View Related
I'm using a piece of javascript in my asp page that splits the date into 3 dropdown boxes, one for day, month and year.
This works fine. The problem I'm having is that when a user first enters the system there is no date selected, therefore I want the current date to be selected in these dropdowns based on the system dates Day(Now), Month(Now), Year(Now).
I can't seem to get the correct month selected, I can only get it to write the current month at the end of the dropdown which is no good cos then it's in there twice. Code:
View Replies
View Related
I''ve 3 to 4 or more combo boxes. On the change event of the combo boxes I want to fill the values.
Suppose I change the value in combobox1 the second combo box should get filled basing on the first combo box, in the same way the third combo should get filled basing on the second combo criteria and the fourth combo should get the values basing the selection made in the 3rd combo.
All the combo boxes are fired in the change event of the combo box. And please no Javascript only VBSCRIPT.
View Replies
View Related
I'm using .getRows() with a local var array instead of doing a recursive
loop so that I'm being a good ASP newvbie and closing my object i/o's (the
recordset in this case) as quick as possible.
My problem is that I can't seem to use this to complete good effect because
the IsArray statement doesn't seem to work with a local var array that has
or has not been populated with the .getRows() property.
To explain, I used to do the following recursive loop (simplified to show a
concise example): Code:
View Replies
View Related
Creating a form that allows people to search a ticket database. One criteria I would like to add is to give the people the option to sort the results by selecting criteria for a dropdown.
My first thought was to create 3 dropdowns with the same name, get the data and add it to the SQL string. It worked great except for when someone decided to leave anything blank.
Here are my dropdowns here: Code:
View Replies
View Related
I code that creates a calendar for each month and then it displays events from that month that are stored in a db. I need to loop through my recordset and display all the events, but I can't quite figure out how to do it. I am thinking I need to do an array. But I am not really sure.... any ideas. Here is where you can view the calendar. Code:
View Replies
View Related
Ok, I have a Javascript ASP and in it I have a dynamic repeating table with certain attributes to people. If one of these attributes is old or invalid, i want to change the color of the text (and maybe make it flash, blink, change size, something) so that it's easy to read.
View Replies
View Related
I want to create textboxes dynamically but with dynamic names also.
i am retrieveing a load of values from a table in SQL into a DataReader.
Then i want to create textboxes from those variables. I want to dim various
textboxes with different names depending on what I retrieve from SQL. I
tried the following:
dim dtrcondet.item("contact_detail_description") as new textbox()
but this does not work
View Replies
View Related
I am trying to create a site that has dynamic page generated based on if a value is present.
PROBLEM
I want to be able to show a certain dynamic page if a certain value equals to true. The page should be able to generate values from a db
e.g. <%=aspscript%>
And if the value equals to false, then the page should not appear at all.
I tried using SSI (Server side inlcudes) but cant append variable names to it or use them with if then statements
View Replies
View Related
I would like to have some text appear in a different color if it matches a result in a database. I am not sure how the syntax would work, this is what I have come up with so far. Not sure how to insert it.
If <%=(Picks.Fields.Item("Pick1").Value)%> = <%=(Results.Fields.Item("Pick1").Value)%> then class="style1"
Is this possible? and if it is does it have to be entered for each occurance of the dynamic text or can it be added to css?
View Replies
View Related
i want o make the images on my website depending on who is logged in. I have all of the Images names stored into my database, which i have uploaded there using the Pure ASP upload 2.09 add on for dreamweaver, and that all works fine and my image is stored in the correct folder and the name of that image is stored into the database as imagename.gif which is exactly what i want, but i dont know how i need to declare that value from the database into my style sheet. Code:
View Replies
View Related
I need to create a bunch of sites with slightly dynamic CSS. Basically,
all the image paths in the CSS need to be dynamic, depending on the
values of certain ASP variables.
I can think of 3 ways to do this:
1. Write a script to create a semi-dynamic CSS file, which will be run
whenever we need to make changes to the ASP variables controlling the
image paths.
2. Have an ASP script generate the CSS on the fly:
<link href="dynamiccss.asp" rel="stylesheet" type="text/css">
3. Put all static CSS in a normal CSS file, and have a special dynamic
style sheet for only those rules that require variability. We could
either use method 2 above to generate a second style sheet, or place
dynamic rules directly in the actual asp pages.
View Replies
View Related
I have a form element and the name is dynamic
name="<%=cnum%>"
i now need to do this but it's telling me that it needs an to be a string.
JobsToUpdate = Split(request.QueryString(cnum),",")
and what would be ideal is the value of Jobstoupdate will be
This Cnum ->cnum=Split(request.QueryString("staticcnum"),",")
Hopefully I explained it well enough.
View Replies
View Related
is there a way to make a dynamic dim, or am i looking at this all wrong
<%
Dim A & request.form("") & B
A & request.form("") & B = Request.form("")
%>
View Replies
View Related
how to dynamically build an XML document with IIS6 and 404 error custom handler?
At the moment if I dinamically create an XML page with Response.Write(xml code here) I cannot remove header "404 errorpagepath" that IIS adds automatically. How to remove that header from Response object?
View Replies
View Related
i think my code is correct.but it still can't work when i run in the nokia mobile browser,i had run my wap gateway and internet service server(ISS) also.
can anyone help me to solve this problem? The attaches file is the wml,asp and database for this program.
View Replies
View Related
i want to have a dynamic navigation that will look at a database and then fill the navigation side. I want to have a category, then a sub- category also. Can this be done?
View Replies
View Related
I would like to build a dynamic link based upon a value returned from a db
There is data in the db because objRS("Description") returns a value.
something like
Code:
if objRS.EOF then
%>
<a href="/somepage.asp?id="<% objRS("Id") %> "><%response.write(objRS("Description"))%></a>
<%
else
end if
I get
http://localhost/somepage.asp?id=
Nothing else at the end.
What am i doing wrong?
View Replies
View Related
it's a dynamic form which should show which option is selected. I've made zillions of these before, and this should work no problem, but there's a bug that I just can't see somewhere... Can anyone see what in god's name I'm missing? Code:
View Replies
View Related
I have been searching for tutorials everywhere on how I could make a menu that is multi levels but that can be updated dynamically through asp...so basically when I add a link in the database it will update the menu...now I know how to pretty much pull links from the database for a basic menu...but lets say there is a link called about us and under about us there is more options to choose from.
How would i code this so the menu would know which ones were parents and which ones where childs? And does anyone know of a good tutorial, or of an example. and basically I want this because I would like to create a content manager...but I don't understand how the menu would work when pulling data from a database.
View Replies
View Related
Is there any way to dynamically generate an include file based on a variable passed to the asp page via a url ?- so for example:
Person x clicks on a url - that ur directs them to template.asp (template.asp has no code in it other than page title etc and <!--#include file="<%variable%>" --> )
Once in template.asp the page loads the include file that is relevant to the companies website that the link was clicked from.
In that include file will be the correct form and stylesheet setting for that company.
What we are trying to do is achieve a global template file which multiple customers can direct peo[ple through and all the data is therefore stored in one central repository.
The file displayed when they reach template.asp will depend on the url they clicked. Basically how can i get the url to pass the variable which the include file will then load??
View Replies
View Related
I have a table in ASP page which displays records and it has a checkbox whose name is ChkBox<%= intRecID %>
<%= intRecID %> is the ID of that record. Now how should I chck whether check box is not checked.
View Replies
View Related
I am having to make sites accessible where images are dynamically generated.
'Display the graphical hit count
Response.Write("<img src=""counter_images/")
Response.Write(Mid(lngVisitorNumber, intWriteDigitLoopCount, 1) & ".gif""")
Response.Write("alt=""" & Mid(lngVisitorNumber, intWriteDigitLoopCount, 1) & """>")
How do I include the width and height attributes in this code?
View Replies
View Related