I have some similar code that moves text from one box to another. To check if something already exists I use:
//check to see if item is already in list
//where tbox is to box and fbox is from box
j = 0;
while ((j < tbox.options.length) && (!(itemexists))) {
if (tbox.options[j].value ==...
Tracy,
Thanks for the quick reply. I am using "document.forms[0].elements[i]" in a later statement so wanted to assign the object to a variable to make it easier. I liked your suggestion of using document.forms[0].elements[FieldName] instead of the eval statement I was trying to use...
I have a function that pulls the form element names on submit to validate the fields. The form is built dynamically so I don't know which of the 58 element names might be on the form. I'm looping through the element array to pull the name, then checking if the value has data. This works like a...
I have an ASP page that calls a javascript function and passes a variable to the function at the same time. The variable is used to update a hidden field in the form. After the hidden field is updated, the form is submitted.
It works like a charm in IE, but Netscape does not submit the form...
However, it is possible to create an instance of excel in the user's browser (provided it is installed on their computer) using:
Response.ContentType = "application/vnd.ms-excel"
as the first line in the page. You cannot use include files on this page. The excel file is built in...
You probably should use a CASE statement in either SQL or in your ASP code.
http://www.sqlindex.com/books/sample_chapter/3.asp for SQL Case information and http://learnasp.com/learn/case.asp for ASP case syntax.
Regards,
Joli
Check to see which radio button is checked, then set a variable for destination.value. Check to see if the variable has data, if not, pop-up an alert.
//after checking radio button
Dest = document.FormGroupName.Destination.value;
//add alert if name is blank
if (Dest == ""){...
Looked like you had an extra quote after the comma. Do you need the comma in your SQL statement?
sqlupdinvacct = "Update tbl set flag = '" & vacctflag & "' , where id = to_number('" & vid &"')"
Joli
Sorry, I jumped to an assumption that you were talking about Javascript on the client side. We use a mixture of Javascript (for client side) and VBScript (for server side) which is where the example came from. I'm not familiar with javascript on the server side.
Joli
Since the list now resides only client side and in Javascript, you need to send it back to ASP. Here is an example of one we've used:
//create the list as comma delimited
var listtext = "";
var i;
var j = document.FormList.list1.options.length;
for(var i=0; i<j; i++) {...
Another way you can do this is by using a CASE statement. Send a variable to the page either hidden or set as the name of a button. We name our buttons Action and set the value as the text of the button. So:
<%
SELECT CASE Request("Action")
Case ""%>
<form...
Since Javascript is client-side, and ASP pages are created server-side, you have to be creative in how the two scripts interact. For example, to get data from a database or datafile into Javascript, the .ASP page will need to write out the information into a Javascript function. For example...
There is an eval function for ASP, but I think it is in ASP scripting version 5.0. See http://www.4guysfromrolla.com/webtech/030300-1.shtml for more details.
To get by without using eval, if you name all the checkboxes the same, the value will be passed to the next page delimited with commas...
I would not advise doing these updates using an ASP page. It would be better if you have direct access to the database because with over 1 million records, your session through the browser may time out and then you would have to find out what did not get updated, or where the query stopped.
To...
You probably need to get a good SQL reference book to help you learn SQL. In the meantime, for a tutorial online go to http://www.1keydata.com/sql/sql9.html
Displaying data on a single page from different tables is not any different than displaying data from one table. What is different is the...
You need to set up a loop to extract the data you want. You could do it something like:
'get the number of items in your array
CounterStop = ubound(aryQueryString)
for i = 0 to CounterStop
'split the array value on &
aryTemp = split(aryQueryString(i),"&")
'Looking at the...
Nick,
Are you trying to do this from the database, or from an ASP page? Sounds like you need to do this in multiple steps. First select your information based on whether or not .Code is empty.
SELECT
TCustomer.Name,
TCustomer.Zip,
TCustomer.Cust_ID,
Count(TCustomer.Name) AS...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.