Hold List Box Value
i have a dynamic drop list, i need to hold the value if the seesion matches the current item, but its not quite working.
Code:
<select name="ByUser" style="width=150px">
<option value="0">Return All</option>
<% rs.Open sqlA, conn
do until rs.EOF
%>
<option value="<%= rs("R_ID") %>" <% If rs("R_ID") = Session("ByUser") Then Response.Write("selected")%>><%= rs("R_Name") %></option>
<%
rs.MoveNext
loop
rs.close
%>
</select>
View Replies
ADVERTISEMENT
I can extract var from db OK for one page but I need to store var to compare about 5 pages later. I have tried dim but only works on second page. I do not close the record set. I suspect I need to declare var global but how and where?
View Replies
View Related
Is there a limit to the length of the url? Is it browser dependent?
View Replies
View Related
We have a page that loads a long list of things. Each row has an onclick where you can open a window for more information. When you do that the parent page refreshes to the top of the page....so if you were near the bottom, you would have to scroll back down to get back to where you were. I would like the parent page to hold its position when the child opens.
View Replies
View Related
You may or may not be aware of $data = <STDIN>; in Perl which basically takes all the data posted from a HTML form and puts it in to one string variable so that you can manipulate it. What's the equivalent/how would you do this in ASP?
View Replies
View Related
i have managed to get my paypal ipn script to login my webhost to sandbox, however i have had to do this via httppost.
now my problem is, the script moves on, when still loggin in how can i get my script to wait a moment, chill and then proceed as normal like it would if i was live.
View Replies
View Related
I want to use an array to either refer to a recordset or hold the recordset. For example, I have this:
dim rows(5)
rows(0)= rs_manager_0.recordcount
rows(1)=rs_manager_1.recordcount
rows(2)=rs_manager_2.recordcount
rows(3)=rs_manager_3.recordcount
rows(4)=rs_manager_4.recordcount
Can I change it to this:
recordset_names(5)
recordset_names(0)=rs_manager_0
recordset_names(1)=rs_manager_1
recordset_names(2)=rs_manager_2
recordset_names(3)=rs_manager_3
recordset_names(4)=rs_manager_4
for i = 0 to ubound(recordset_names)response.write (recordset_names(i).recordcount)next
The errors is: Object doesn't support this property or method: 'recordcount'
And if I put quotes in the array dim :
recordset_names(0)="rs_manager_0"
The error is: Object required: 'rs_manager_0'
Its not that I'm too lazy to write out the 4 recordset names each time. Th eproblem is that the number of recorsets is variable and there are a lot of tehm , hence I want to refer to the with some simple looping script.
View Replies
View Related
How can i list out all the email address into my website from the hotmail caontact list? i am successful log in into the yahoo contact list by using serverxmlhttp and list out all the email address from the page source, but i could not access to hotmail by using the serverxmlhttp. Is any other methos can list out the email address from hotmail contact list?
View Replies
View Related
I have a form with 3 list boxes, in the second list box i have created a select all button to enable users to select all items.
but when i click select all button an error message is returned stating that "Object doesn't support this propery or method"
here is my code.
<script language=javascript>
function selectall(sel) {
var len = sel.length;
for ( var i=0; i<len; i++)
{
sel.options[i].selected = true;
}
}
</script>
<input type="button" name="selectall" value"select All" onclick="javascript:selectall(listboxname)")
View Replies
View Related
i have a list box with allot of values in it. How do i submit the item that is selected in the list box? ive tried a few but i cant get it working. Here is what i tried:
Document.form.search.value = document.form.list1.value
View Replies
View Related
in select box we can select only values...can not change that value in list itself...
i wanted to give my user in edit form they can chnage the value in list itself...
any property of select box..or some codeing ? Code:
View Replies
View Related
i know how to get a listing of files in a specific directory, but i want to get a list of all files in all subdirectories of a specific directory (not virtual). on my server i have e:picturesweb.
in this folder there is male and female directories and in those directories there are also subdirectories. i want the page to create a value for each file and directory so that it can be submitted to another page that will ftp the pictures to a remote site. (yes I have the ftp script ready to go)
something like:
picname1 = john1.jpg
picdir1 = male/
picname2 = sally.jpg
picdir2 = female/
View Replies
View Related
I have a webpage with a list box. I wish to populate it with values from my database when the page loads, these values are just the primary key.
View Replies
View Related
I've created one list box and a button The query is: After clicking the button the action done on the same page with the values selected. How to solve this ?
View Replies
View Related
Does anyone know how to tell which items in a multiple-select listbox are selected?
View Replies
View Related
Im using a drop down list for user to select their option. (For example the user selected type2) All goes fine for saving, but when I retrieve the info from database to be display on the same form on the same drop down list, it display Select Heretype2
<select name="type">
<option value="<%=type%>">Select Here<%=type%></option>
<option value="type1">type1</option>
<option value="type2">type2</option>
</select>
How to overcome this?
View Replies
View Related
I want to save the value of the option in a cookies choosed by a user in a drop down list in ASP page. After OnChange"........ what should I write?
View Replies
View Related
I need to create a page which updates a products information within a record.
the tables are,
products (ID,CatID,sID)
supplier (sID,sName),
category (CatID, CatName)
The above tables supplier and category have relationships to products by using the sID and CatID
I need to update the product details by having a select/option for a supplier and category but if not changed by the user the value already within products table stays the same, therefore the list must be dynamic so that the first item in the list is the one relating to the value in the products table. Also the value must be the ID numbers but must display the names not the ID's to the users within the select/option.
View Replies
View Related
I'm sure an ASP programmer would be able to create this function within 5 minutes, but I'm just learning and I've fumbled my way through creating a little site content management system for a local community group. I'm a designer and the site looks great (so I'm told) but I just can't get this last page to work. I'm desperate for help!!!
I'm trying to call the values for a drop-down list from a seperate categories table in Access, to add/update records in a main Access table/query. The page/form is used to:
a) diplay/edit existing records; or
b) add new (if cstr = "").
I have finally managed to display the correct selection in the drop-down list for existing records (not sure if code is correct?) but I can't work out how to write changes (edit record) back to the database; or 'save' a new record? I'm also not sure if I should be trying to write data to the table or query? Code:
View Replies
View Related
how do i maintain the drop down value.. when i click on the "All" it cant be maintained... jsut that "All"... others values works fine.. Code:
View Replies
View Related
Can someone tell me why my "select2" menulist disappears??
Code:
View Replies
View Related
Is there a way to list the permissions on a directory in my web folder? Like group permissions and such
View Replies
View Related
i am selecting a field from a list .i want to show all the list after searching on the basis of that selected field from database in another list box which is on the same page.
View Replies
View Related
I have a select list which get populated from com but i option value ALL is hard coded on the pageWhen any value is selcted from the list box and form is submitted pages refreshes with the value as selected in the drop down but if All is selected the page ref but All doesnot get selected.
<LABEL for="MyList"></LABEL>
<SELECT id="MyList" name="MyList">
<%For icount=0 To intmyCount%>
<OPTION
<%if Trim(arrmyType(icount,0)) =strmytype Then%>
SELECTED
<%end if%>
VALUE="<%=Trim(arrmyType(icount,0))%>"><%=Trim(arrmyType(intCtr,1))%>
<%Next%>
View Replies
View Related
How to display sql database data to dropdown list in asp?
View Replies
View Related
I have a page which displays all the fields in a table of my dbase. One of the fields in the database was previously populated by a drop down box.
My question is, is it possible to display the same drop down box with the value that has been populated from the table so it can be updated?
View Replies
View Related
Does anyone has some sample code or know any resources for using ASP and Javascript to dynamiclly create a drop down list?
(ie. Once the user selects a drop down list, ASP gets the selected value and go to database to get another set of new values. then creates a drop down list of all the new values)
View Replies
View Related
I have a form page in ASP where the first menu/list function as a filter of
the second menu list. Once I select an item form the first combo I get the
second menu full of options. This is correct. My probem is that the first
combo gets the default value again and I do not see what I did choose.
View Replies
View Related
anyone know any homepage that might help me to list the data out in a page. i wanna do it like in 2pages that one is going to be the one who maintain data. another one is to list all the data out from server
View Replies
View Related
I have a list box, with more than 1 peice of data in each listrow. I was wondering if its possible to align the first data to the left and the 2nd data to the right inside the list?
Example:
|Firstname Age|
|Firstname Age|
If you understand.
If its not possible no problem.
View Replies
View Related
I am working on a project where people can search my database from the web. I have a drop down list on the page but I am having a hard time trying to code it so that when someone picks a title from the drop down list they only get the people with the same title as selected by user.
View Replies
View Related
I would like to display 15 items (lines) in the dropdown list, but by
default the list displays only 11 lines. How can I have all the 15 items
displayed in my dropdown list
View Replies
View Related
I have a page that calls to a DB (MS SQL) and outputs a list of providers. In the next column is a list services that each provider provides. I have a column for each service.
My issue is that all services are output even if the provider does not provide it.
View Replies
View Related