Buttons To Determine Variable Values

I have a page with 10 buttons. I want to control the content of two variables (say vari1 and vari2) based on which button a user clicks. So if I click button1, vari1="1" and vari2="2"; If I click button2, vari1="3" and vari2="4", etc.

The variable contents are actually going to be text strings, not numeric values, I was just trying to keep the example simple. I've only ever used buttons to submit, reset, or call a javascript, so I'm just not familiar with how I would do this.

View Replies


ADVERTISEMENT

Using Radio Buttons To Determine The Value Of A Field In A Form

not sure the best way to achieve this but basically i would like to have two sets of radio buttons. The first set determines whether the field DateFrom is todays date or a date entered

and the second set determines whether the field DateTo is todays date or an entered date
So far this is what i have got and its not working Code:

View Replies View Related

Multiple Values For Radio Buttons

I have a form on a web page with a number of radio buttons bound to
the same field. Is it possible to set up the form so that users can
select more than one radio button to submit multiple values to a field
in the way that you can, for example, in a drop down field?

View Replies View Related

Assign Values To Repeated Radio Buttons

I am bringing in a repeated field from a database and I would like to assign values to radio buttons to be associated with each record. The number of repeated fields will be different for each person, so I cannot enter values for each repeated record. I need a way to assign a variable as well as a value to each record that is being brought in from the database. For instance:

Radio Button Value 3 4 5

Repeated Record 1 O O O
Repeated Record 2 O O O
Repeated Record 3 O O O

I had received some great code from Memnoch, but it created one group for the entire Repeated field, so I was only able to select one radio button for all of the repeated fields. I need to select them seperately and I then need to Request the variable so that i can add, multiply and divide that variable with other repeated variables.

View Replies View Related

Variable Values

I am trying to compare the value of a number in a session variable to a value of a number in a querystring. The code works well until I reach double digits in the querystring. example. if my session variable = 7 and the value in the querystring = 64 and I ask which one is > (greater than) the other, the code returns the session variable (7) as being greater? I realize that only the 6 & 7 are being compared but how do I get it to view the querystring as 64 and not just 6??? The code looks like this...


if session("page") >= Request.QueryString("RC") then
session("page") = 1
else
session("page") = session("page") + 1

end if ..

View Replies View Related

Problem Passing Variable Values To Subroutine

I'm using a database table to create forms on our intranet. If the record is 'text', an input is printed, if it's 'dropdown', a dropdown is printed etc. In the case of dropdowns, the next field in the recordset is 'options' (eg Mr, Mrs etc.) and this works fine by splitting the options array and creating a separate <option> for each one.

My problem is that I've written a subroutine that creates dynamic dropdowns and it looks like this: Code:

View Replies View Related

Combine The Two Variable Values And Show The Result

I have two variables:

UserLastName = request.cookies("UserLastName")
UserFirstName = request.cookies("UserFirstName")

and I'm trying to create a third variable that would strip the first letter of each of the above variables and combine them to create initials. Eg. if FirstName is John and LastName is Doe, the UserInitial variable would be "JD".

View Replies View Related

Clearing Values From Variable When Form Proccesses ??

I have a form that on clicking of the Update button first updates
the specific record in the db, then Inserts if the vMemo field is not
empty. The problem that I'm having is that After updating if you hit
the [F5] key (refresh) it inserts another record ...

I have tried:

1. Clearing the vMemo field after the insert is done (vMemo = "")
2. Setting the value on the form for this field to ""

Neither of these are working. It's not displaying it on the screen
but it is holding it in memory (I guess). Any way to clear this out
after update/insert?

View Replies View Related

How Do I Retrieve Values Of An Array Variable From A Form To An Asp Page?

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

Determine Id

here is some background on the page I made. It's a calendar page with events listed. No database, just used id="" to display certain months depending on the option chosen from the jump down menu.

The question I have is this: I would like to display the current month's events when they land on the page. I used

<%
id=request.querystring("id")
%>

and created an <%elseif id="1" then%> and so on for each month. Is there a way can request the month and display that id? Thanks for you help. I have the code for the page if need be

View Replies View Related

Determine Images

Is there a way to determine the actual width and height of a image file ?
I'm using aspsmartupload to upload the image, how can determine and save the
width and height value ?
seems that aspsmartupload doesn't have this property.
If so, is there any method to determine it in asp in the simpliest way? I
will prefer to maintain the aspsmartupload method.

View Replies View Related

How To Determine Other Servers OS?

I have many servers which will be reghosted everyday with different OS
(Win2000, Win2003, WinXP...). How could I write the ASP code to get the
information of other servers' OS?

Let say the asp page is hosted on Server A, how can I check the OS version
of Server B and Server C?

View Replies View Related

How To Determine What Day A Date Is In ASP?

How do you determine if a given date is a weekday (Mon-Thurs) or weekend (Fri - Sun)? Is there a built in function?

View Replies View Related

Determine A Website

Somewhere in my program I ask users to provide their website URL. I would like to determine if the given website exists or not.How can I determine a website with given URL exists?

View Replies View Related

Determine Recordset

I am creating an ASP page for members of my team to add and delete records from specified tables. This table is choose by the user and I am dynamically creating text boxes. I also wish to include the type of the attribute to assist the user.

<%
for s_intCounter=0 to objRs.Fields.Count -1
%><tr>
<td width="34%"><% objRs.Fields.Item(s_intCounter) %>: <input type="text" id = <% objRs.Fields.Item(s_intCounter) %> > </td>

<td width="66%">Type: <% INSERT ASP FOR RETRIVING TYPE</td>
</tr>
<%next%>

View Replies View Related

Determine CSS Style

I want to use asp to assign a css class to <td> tag. I was thinking an If statement, but i've not come across trying to assign a class to a table cell before! I want the cell background to be highlighted red determined by a database table with - yes or null. (null remains white, yes - red) At the moment it simple like this: Code:

<td><%=strAddress%>&nbsp;</td>

View Replies View Related

Determine ASP Version

My web hosting account lets me use ASP and so I thought I'd try to learn and use some.
There is only one thing that I would like to know, and that is how to find out what version of ASP is running. Preferably, what I am looking for is something similar to the PHP php_info() function. Is there anything like this for ASP?

View Replies View Related

Determine If More Than One Row Returned

I have an ASP/ADO application querying an SQL Server DB. I want know the most efficient way to determine if more than one row is returned from a query. If more than one row is returned, the user will be presented with a choice of which row to process. If only one row is returned, I want to skip this stage, and process that single row immediately.

I can think of a number of ways of acheiving this (eg. .recordcount) but I'm looking for the slickest and most efficient method.

View Replies View Related

Determine Type Of Value

This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't determine what type it is.

View Replies View Related

How To Determine If Time Slot Is Available

I built a simple scheduling application using an access db.

The relevent fields are eventRoom, startDate, startTime and endTime.

When I go to add a new event, what method can I use to make sure the
eventRoom is available for the selected date and time slot? Id like to just
display an alert with the conflicting times and suggest the next available
startTime.

View Replies View Related

Determine File Date

I need to figure out if this file is over a day (or however many hours) and if it is, i need to delete it. If its not i redirect the user to it
Code:


If (fs.FileExists(workFile))=true Then
set f=fs.GetFile(workFile)
If (f.DateLastModified > Date-1)
Response.Redirect "/" & tFileName & "/" & reqString & ".html"
Else
f.Delete
End If
set f=nothing
End If

obviosuly the date-1 is wrong, i can't fid the appropriate syntax to save my life.

View Replies View Related

Determine An Image Dimension - ASP

Anyone knows how to determine an image's dimension using Classic ASP?

Like How do I know the width, Height of this image using ASP?

View Replies View Related

Determine Connection Speed

Just wondering if anyone knows how to determine someones connection speed in asp the reason for this being so i can redirect the user to a different media file depending on their connection speed.

View Replies View Related

Determine If Field Is Autonumber

I have a recordset with two three fields. One is an autonumber field called ID , one is a text field called Name and the last is a date/time field called DateEntered. How can I programatically determine the autonumber field ? Code:

View Replies View Related

Determine Pagerank With Asp Code

is there anyone here who can help me to determine google's pagerank with asp code. Just like pagerank tools are doing, where do they request data from, how do they get it, etc..

View Replies View Related

Need To Determine Operating System

Is there a way to determine the user operation system in vbscript and javascript?

View Replies View Related

Determine Today's Date

How can I use the date() function in ASP with SQL statement.

I want to retrieve the records with today's date:
"SELECT * FROM Table WHERE [Date]=" & Date

where [Date] is an SQL Server datetime.
How do I separate the date from datetime so this statement can work properly.

View Replies View Related

Determine If Page Refreshed

First I would question why you want to do this. If they get to the page by any means it should respond appropriately, whether refresh or by link. This is a stateless environment after all.

That being said...

I would take the approach of setting a session variable that gets set the first time they hit the page:

<%
if session("NotTheFirstTime") = "" then
'write the onload
session("NotTheFirstTime") = true
end if
%>

then based on that variable write or don't write the onload.

Of course, if the user can access the page from multiple links and the onload is valid for each link, regardless of how many times they hit the page, this won't work....

View Replies View Related

Determine A Empty Folder

I still don't know how to determine a empty folder....

View Replies View Related

Determine Items In Array

how do i determine how many items are in an array? the following code creates an array of values each time a space is found in a name field. the problem is that sometimes names have middle initials and sometimes they do not. so i want to determine how many items exist in this array created bythe split BEFORE assigning values:

name_of_customer = Split(customer_name," ", -1, 1)

first_name = name_of_customer(0)
middle_initial = name_of_customer(1)

View Replies View Related

Determine Database Size

I have a database i want to be able to determine its size from an asp page, Also is it possible to list tables and column names list what tables are in the database and column names of each table contained?

View Replies View Related

Determine Number Of Files

I have an asp script that lists the files in a directory:

CurrentPATH = "c: emp"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(CurrentPATH)
Set oFolderContents = oFolder.Files
For Each oFileItem in oFolder.Files
.....
next

before doing the "For..Next" loop, I want to determine the number of files
in oFolderContents. How can I do this? Is there another way to determine the number of files in a given directory?

View Replies View Related

Determine An Image Dimension

Anyone knows how to determine an image's dimension using Classic ASP? Like How do I know the width, Height of this image using ASP?

View Replies View Related







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