Rediming An Array With Non Selected Values
I have 24 checkboxes all with the same naming convention, each box has a
value ranging from 1 to 23, what I need to do is fill in the gaps with a
0 value where the user doesn't select a value.
So lets say that the user selects:
1,2,3,4,5,6,7,15,18,19,20
what I want to do is use the split function on the next page to convert
into an array but then I want to redim the array and fill in the missing
values, so I would end up with:
1,2,3,4,5,6,7,0,0,0,0,0,0,0,15,0,0,18,19,20,0,0,0
is it possible to do this and if so how?
View Replies
ADVERTISEMENT
I have a Multi select box which I have populated with a list of choices. Is it possible to have a second Multi select box which is initially empty, yet when the user selects values from the first Multi Select box, they appear in the second multi select box?
I'm sure I can easily do this by just posting the selection to a new page but I'd like to dynamically display the selected values on the same page.
View Replies
View Related
if I create a dynamic selectbox from the table tblRewardsDetail - I can submit what is selected to tblLineItems BUT not the corresponding values.
For example if I select Item2 the corresponding value associated with that Item 50points does not write to the tblLine Items but ItemIden2 does. Code:
View Replies
View Related
i m designing a online test application. my reqt is on pressing next button my selected value gets stored in the database and next ques ll appear and on pressing prev button it should display me previous question with already selected value.
how can i do this?
how can i pass selected value of radio button through query string as my radiobuttons are getting cerated dynamically.so every time its name will be different. Code:
View Replies
View Related
for i = 2 to NOD
newdate = DateAdd("d", 1, newdate)
strdate = strdate & newdate & ", "
next
MyArray = split(strdate, ", ")
I have the above code written in one of my asp pages, the date array is splitted, but how do I get the first and last date assign to a variable.....
int min = MyArray(MyArray.Length-1)
int max = MyArray(0)
I got this code from the web, however it gives me an error:
Code:
Microsoft VBScript runtime error '800a01a8'
Object required: 'MyArray'
View Replies
View Related
i have my database in MS Access. a table name products contains fields:
pro_name
no_of_comp
inserting data from form where products field is mutiline text box. split this and store in array then insert records.
now i want to facilitate let user edit their data.
during editing new products are entered with no_of_comp = 1 and already exisiting products gets no_of_comp= no_of_comp + 1.
if user delete product then no_of_company = no_of_comp - 1.
what i want to do is: Code:
View Replies
View Related
How can I remove a value from an array. Like: remove from array where value=bla-bla?
View Replies
View Related
I have an array which has days of the month stored in it. For example at one
time it might have the values
1,2,3,6,7,8,9
at another time it might have the value
4,5,12,14,19,25
These are days of the month that have been selected and read into an array.
What i would like to do is to write them out and put a "X" where the days
were selected Code:
View Replies
View Related
i m getting these value from a query n stored it in an array:
FY2005 P1 (8/1/2005 - 8/31/2005),
FY2005 P2 (9/1/2005 - 9/31/2005) and so on.
i need to use eg
8/1/2005 as startdate and 8/31/2005 as enddate
similarly
9/1/2005 as startdate and ,9/31/2005 as enddate.
and so on
we can split FY2005 P1 (8/1/2005 - 8/31/2005),
FY2005 P2 (9/1/2005 - 9/31/2005) by using split func in vbscript. But how can we use its subparts.i mean 8/1/2005 etc ...
View Replies
View Related
some ready-made code that will loop through the values in an array and sort them in ascending or descending order? I'm about to start building some new functionality that will need to sort the values in an array and then present them in ascending order. My initial thoughts are to loop through the initial array, find the lowest value and then load that value (and all associated values) into a new array.
View Replies
View Related
I am wondering if its possible to load two array ad use one as item title and the other as value, ex:
array1 = "Sally, Jason, Jackson, Marie"
array2 = "24, 54, 21, 33"
For ....
TempSally(Sally) = 24
TempJason(Jason) = 54
....
Next....
View Replies
View Related
I have the following code to check if a field number matches a specific value. here is the code:
View Replies
View Related
I first retrieve the values stored in a session variable (where I have stored an array). Then I assign the session variable to a local array called "myarray".
Assume that "myarray" now contains 5 records. What would the code look like if I want to create a loop that transfers the 5 values from "myarray" into a select box/dropdown list?
How is that done?
View Replies
View Related
I know that cookies can store an array of values, which can be accessed like this:
tempid = Request("cookiename")(i)
Is it possible to use session variables in the same way? Store a array of values in the same session variable and access them on another page by indexing?
I've looked around alot and I've not found anything suggesting that this is possible.
Right now I'm using a single set of cookies to store info on a series of purchaces of the same type of item. I'm hoping to use session variables to replace the cookies.
Does anyone know for certain if this is not possible?
View Replies
View Related
I have part of a keyword search function that is acting supernatural - I have a bubble-sort function that sorts the content of an array, then returns an array containing the item numbers of the original array, arranged in order according to their content. Code:
View Replies
View Related
how to create an array of checkboxes that were selected from a form on one page and pass them into hidden fields in a form on the next page? I have this massive project I've been working on and am having trouble with this.
View Replies
View Related
I am trying to filter a table of users to select only those records
whose roleID matches a value in an array. There could be any number of
IDs held in the array from one to a few hundred. The array is
generated by splitting a comma delimited memo field from a second
table in an Access DB. I can split the memo field OK, I can
response.write its values, but what I now want to do is add a value
from another table to my reponse write loop. Code:
View Replies
View Related
I have this dynamic array(shown below) that I need to match to values (1 - 10) that I am returning from the database via DSN connection object.
The values I need to match are on the same page (in their own table) but I am not sure how to match up the array indexes to these values. I want to be able to display the array result as part of or nested in another table. Code:
View Replies
View Related
if i have a vbscript function on a certain form and I assigned some values on an array variable on that function, is there a way for me to retrieve the values of that array on another asp page once i submitted the form?
View Replies
View Related
I dump the entire recordset into an array:
If not rs.EOF Then
aEmp = rs.GetRows()
Contents of the array are in this order:
EmpID,EmpName,Indent,Sub_ID,Lft,Rgt,MgrID, LastName
This query sort on the basis of Lft and Rgt columns.
The name of the array is: aEmp.
My question here is how can I get only the LastName from the aEmp array into another array so that I can sort the names alphabetically and then display the employees in the alphabetical order.
Or is there is another way I could this by using the same array while keeping the lft and rgt sort of the query? If I sort based at the SQL query level, I can see the names sorted by the lft, rgt and lastname, but since the lastname is at the end of the sort list - it does not appear alphabetically.
View Replies
View Related
In working with arrays, I have found that I am unable to dimension and array
with a variable that has an integer value but I can redimension one this
way. I haven't see any information that tells me if this is a requirement,
although it appears to be because I get an error if I try it.
Ex.
Dim b
b = 10
Dim a(b) ' this errors out but
Dim a() ' this
Redim a(b) ' works
Code:
View Replies
View Related
Drop down value is selected and a query is performed on that value - I want the selected value to stay in the drop down field. Right now it goes back to the first value in the list once the submit button is clicked (it queries correctly).
When I come into the page there should be no value in the drop down list and when a value is selected it should stay in the field.
View Replies
View Related
I want to call a recordset so you can edit the details and then obviously pass the parameters onwards into the db. However, the user guide just says this:
To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include: Code:
View Replies
View Related
i need to convert the escape values which are by mistake updated in DB.
example:
this is a sample text string
is updated in DB as
this%20is%20a%20sample%20text%20string
here %20 is the space.
like wise there are many entries for :,'
is there way that i can update all this in a update statement?
or use asp to to update the records?
View Replies
View Related
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
I have 2 drop down lists here. Supposingly, upon the selection of the 2nd drop down list, I should be able to see textbox entry allowing user to update data being displayed at the bottom. But in my case here, i see no response upon the selection of "selType" which is my second drop down list.
But both also don't work. So any suggestion on how can I retrieve the 2nd drop down list' selected value
View Replies
View Related
I have combobox that those value is based on my database. So i want to get the selected value in order to do another matching for the SQL statement. May i know how to get it? Is it just use for example WHERE column=' "&combobox&" '? use the combobox name.
View Replies
View Related
I have an aspx file where i've put a placeholder element. On load i create
dynamically a table which contains a checkbox and a radiobuttonlist in each
tablerow . The radiobuttonlist contains two items (yes,no). Both the
checkboxes and the radiobuttonlist are NOT autopostbacked ( .autopostback =
false).
When i press the submit button a sub is run. My problem is that i can
not get the selected items in the radiobuttonlists.This is caused cos in the
page_load i call the sub that dinamically recreates the table described above
and so all values are reset (there is a rdb.item(0).selected=true line in my
code.
If i try to remove it, the radiobuttons keep their values or not,after
each submit, without a pattern!). I've also tried to keep the values in a
collection, instasiated in the page_load but i couldn't do so cos the table
(that contains the checkboxes and radiobuttonlists) is not recognized at the
beggining of the page_load (i guess it's not an object yet cos the sub that
creates all that is at the end of page_load)....
View Replies
View Related
By ASP
How can I get the dropdown(control'name)'s selected value?
What is it's property'name
View Replies
View Related
sourinsen is correct. that's the way to split values in your combobox.
View Replies
View Related
I have a drop down select box that gets filled from database. I have to add "All" to this list which does not come from database. Also the default selected value should be the second value that is stored in array. For ex I have array of Countries names as America, Indonesia,china, Canada. My array gives me the value Myarray(intcount,0)(intcount,1) as America and so on (two dimensional array).
I want Indonesia as the default selected value when the page loads. Also I need to hardcode All at the end. Upn submitting the form the selected value fromthe drop down should get selected.
View Replies
View Related
I've got this listbox and this text field on an ASP page. Now I want the item I click on in the listbox to appear in the text field and I can't find the code nowhere for what seems to me such an easy thing to do.
View Replies
View Related
i need to get the selected value of dropdown from one page and i want it to be displayed in another page.
For that i used the below cade:
<%= request.Form("country") %>
country - drpdown name
But its not getting displayed.
View Replies
View Related