Using Option Explicit necessitates that any variable used has to be
declared (Dimmed) explicitly but it DOESN'T necessitate that the
variable HAS TO BE DECLARED BEFORE the variable is used. For e.g. the
code below, which first uses the variable "str" & then declares it,
works fine:
I am calling Server.Execute("2.asp") from "1.asp" and expect to have application variables declared in "1.asp" available to the script code in "2.asp", at least this is what the documentations says, but it doesn't work. I am declaring the variables in "1.asp" as public (VBScript). Does anyone have an idea if this is supposed to work?
I am calling function of vb dll from asp. How do i declare the arguments to be passed of string datatype. I tried using Dim but its giving me error. I want to explicitly declare three variable as string.
Anyone has done declaring temp table in ASP code, and then populate the temp table, and then inner join with other table and so on? I encounter some sql error it seems indicate asp can't do such operations..
how to declare session variables and use it in insert and update sql statements... the scenario is I have:
2 html forms 2 ASP FILES
I am able to trap data from the first form into the acces table..but my second form(which is continuation of first form) has a update query....(ie...it shld update the same record the one inserted from the 1st form )..both the forms work on table in access db
its an annonymus...questionnaite...therefore i am not trapping any user name or login id...but the requirement is the survey made shld be unique....as in no user shld be able to answer the questions twice.
I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?
I need to assign a value to a variable, but this variable name is dependant upon another variable!! I am including the code below so you can see it, cos if not I am sure you are thinking whattt?? Code:
I have many buttons that mapping many textbox, when I click button, I want to show a string that contains button number( and the mapping string ), but it failed.
Here is the code: ///////////////////////////////////////////////////////////////////// <%response.write"<input type='button' name="'btUS95resone"&" a &"' value='Save' onclick='resone("&a&")'>"%>
function resone(cnt) { alert("document.all.txt_note"+cnt) }
////////////////////////////////////////////////
It seems that the component I called is not there...
Artist Name: Kiss Song Title: Rock and Roll All Night Running Time: 04:38
And I need to be able to get the artist name and song title in asp and display it on a website. The thing is, the text file changes with the song being played on the radio. How can I do this?
I've been given an ASP app written with server side javascript. This app needs to get the username of the person currently logged in to windows (Request.ServerVariables("AUTH_USER") in vbscript). I found a way to get this variable in javascript, but then it wouldn't let me split it (server kept saying method not supported). So I've gave up on getting the username with javascript, and have set variables in VBscript at the top of my page. How do I access those variables within the javascript portion?
i have a textbix name "building" inside my system where the user might input one or several building name in it seperated by a comma. How can i extract each of the value in it? For example, "PG2, PG7, PG6", i want to extract each of them.
I am having difficulty in displaying Response.Write rsVacancies("Title") variable more than once. If I remove it from the page title it displays within the description tag but does not display in both. Code:
I am tring to search a database with an SQL statement via a web page. I am using Dreamweaver to build my page. The search works great when I hard code the table field into the Recordset. However, I would like to implement a variable on the field in the table to do the search on.
For Instance, a user can make a selection in a drop down box and then enter the text in a text field. I am having trouble implementing the drop down box variable into the code. I suspect I need the WHERE to be a variable just as the LIKE parameter but I keep getting errors. Code:
I have one condition for getting the image in an included file. If the file which is including the included file is from parent folder if should pull the image directly from Image folder, otherwise it should change the path like Code:
if c.fields("id")=request.cookies("id") then response.write "This is you" else response.write "This is " & c.fields("name") end if
c.movenext loop
the request.cookies("id") does not work! no variable will work in its position, either. the 'if...then' statement above will only work with c.fields("id")="something", not a variable, like i want. how can i get around this?
I have a HTML-only file, and asp file that do a databasequery.How can I do a query in the html file, like this: DBLookup("2").The asp file execute the query and respond with the result. Send it back to the htmlfile and put it were the "DBLookup("2")" is. I can not have any asp code in the html page.I have a php file that works like this, but how can I do the same with asp?
how can I name a variablewith the value of another variable to make the first more dynamic.Code:
<% sql = "SELECT * FROM table" set rs = cnn.execute(sql)
submodule = rs("ID_submodule")
counter_"submodule" = 0 %>
The idea is where it says "submodule" is the value of the submodule, because this part of the code is a loop that checks all the table registries. Then the 0 would be 1, 2, 3.. depending of the quantity of registries associated with the ID_submodule related.
I have a variable in an app called GenericTitle which contains text, a persons job title funnily enough. I want to check whether this variable contains the word "director" and if it does, then redirect to another page for example. Can somebody post some code that would let me check this?
I've got a form in my website where the users has to type a message. Is any code in ASP where I can get the last word of the message? Ex If I user types "Active Server Pages" is any code to get the word Pages and put it in a variable?
Is there any kind of variables (i think session vars?) that stores the data in it for ever.. I mean i have a project with textbox and button, every time some enter a data to this textbox I want it to store "var=var+1" number of times people done inputing.. then I can show this value in a page.