Creating A Dynamic Variable
a way to view the contents of a variable. But That variable could be one of several variables. So, I would like to pass in the name of the variable as a string into a function, and pull out the contents of that variable.
View Replies
ADVERTISEMENT
I'm having a brain fart at the moment. Can someone tell me how to dynamically create variable names based on a loop counter?
for i = 1 to Num_Cart_Items
Item_Name & i = Request.Form("item_name" & i)
Item_Number & i = Request.Form("item_number" & i)
next
Desired result:
Item_Name1 = Test Product
Item_Number1 = 1234
Item_Name2 = Test Product 2
Item_Number2 = 2345
The problem is with the Item_Name & i..I used to know how to do this, but I can't remember or find any code that I did this with.
View Replies
View Related
I have a web page that accesses a database to pull news stories down and create a link to another page that is populated with the news stories. These stories take up enough space that the page has to scroll. I want to be able to have the links it generate go directly to an anchor on the second page where the news story begins.
Can someone point me in the right direction to a place where I can get more information about this?
View Replies
View Related
I wrote a simple code to generate a dynamic array:
Dim TestArray2()
TestArray2=array()
Redim TestArray2(43)
When I uploaded this to IIS (on Vista Basic), the following error
message was given:
"An error occurred on the server when processing the URL. Please
contact the system administrator"
May I know what is the problem?
View Replies
View Related
I am trying to write a script that will insert a commercial (randomly choosing from 3 commercials) prior to a news video clip. I need to have the page dynamically created using asp (or at least I think I do).
I have tried several different methods but nothing works. The only thing that has been successful so far is a static .asx file (but that won't cut it). there is very little documentation on this from what I can find.
View Replies
View Related
Basically, I would like to create a folder on my server for each user that comes to my site based on their last name which they enter. The code I have below is incomplete as I don't know how to incorporate the lastname into the CreateFolder method.
dim lastname, objFSO
lastname = Request.Form("lastname")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
folder = Server.mapPath("/test/")
objFSO.CreateFolder(folder)
Set objFSO = Nothing
View Replies
View Related
I asked a question earlier about creating dynamic pages.
I want to know if its possible to create dynamic form elements based on a condition equating to true.
e.g. as you could have dynamic texts when a condition is true.
Could i have dynamic form elements when a condition is true
e.g. response.write(create radio button)
or create combo box etc
or how is it done ?
View Replies
View Related
What I am trying to do would be useful to many sites that have product listings or archieved articles.
Instead of having server load and spider unfriendly dynamic asp pages, create semi-dynamic html pages by running an asp script which requests an asp page from a Local IIS server (or www server if need be) and writing the html text to a file and saving it as a filename.htm page. Code:
View Replies
View Related
I have a txt file with content similar to below I want to read in each line do a split on the = and then create a variable with the name of the first value and the value of the second. I'm fine with the splitting etc but I haven't got a clue of how to set the variable name to the value on another variable?
View Replies
View Related
I need to create a variable after the first time a page has been run.Ok this is really for flash but the need is from the asp side.When the user visitsthe site the variable will either not exist or be set to 0.When the user goes back to the same page or any page then the variable will be set to 1.I dont wish to use a cookie, but I believe this can be done using maybe a session, or even the global.asa to detect one visit.Can anyone give some light into this request.
View Replies
View Related
Working on a survey with results going into an Access (2002) database. Each survey-taker would be a new, unique entry in the survey-taker table, and the primary key is set as an autonumber.
The survey is several pages long, and I need a way for the autonumbered primary key to carry over to each page in order to keep the results together.Would creating a session variable tied to the primary key work, or am I going about this all wrong? If a session variable would work, how do I tie it to an autonumber?
View Replies
View Related
Im currently studying an HND in computing at uni and i am having a MARE of a time trying to work out my ASP as this is a major project and i tihnk i have thrown myself in at the deep end.
Basically what i want to do is Pull details up from a table in access but i want each row to be put into a seperate forms and make some of the fields that i have pulled from Access into text fields so that i can enter data into them and then save this data back into the table.
I figured that in order for me to do this i would need to firstly create a variable that i could include in the name of the form so that they are ames; Form1, form2, form 3 etc every time a new one is created. Code:
View Replies
View Related
If I have 5 variables "SUB_1, SUB_2, SUB_3, SUB_4, SUB_5" and I assign them values from a SQL2005 database..
SUB_1 =(UPDATE.Fields.Item("SUB_1").Value)
SUB_2 =(UPDATE.Fields.Item("SUB_2").Value)
SUB_3 =(UPDATE.Fields.Item("SUB_3").Value)
SUB_4 =(UPDATE.Fields.Item("SUB_4").Value)
SUB_5 =(UPDATE.Fields.Item("SUB_5").Value)
I have a WHILE LOOP generating a dynamic table from a different database table
Code: ....
View Replies
View Related
I have a spare parts database that I am working on. All that needs to be stored is the part description, what it goes to, and the quantity in stock.
Since that's all that I need, I want to be able to allow the user to edit the quantity right on the results page, through a textbox. Just change the number in the textbox for each part, press the button, and voila, it's all saved to the database (and is redisplayed for your convenience.)
However, there is no set amount of part rows. Right now, I'm creating the text boxes using the id of the item (i.e., name="quantity<%=RS("partID")%>"), but I'm not certain how to call the variables to put in an insert.
What is the syntax for dynamic/variable variables (if they even exist in ASP)?
View Replies
View Related
I would like to read the dynamic contents of an asp page and set these in a variable.
In php I can do it with the help of include, but include is not exactly the same in asp.
Any clue?
View Replies
View Related
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies
View Related
I code that creates a calendar for each month and then it displays events from that month that are stored in a db. I need to loop through my recordset and display all the events, but I can't quite figure out how to do it. I am thinking I need to do an array. But I am not really sure.... any ideas. Here is where you can view the calendar. Code:
View Replies
View Related
I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:
"Object variable or With block variable not set"
My vb code look like this.....
View Replies
View Related
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
View Replies
View Related
How do I convert an ASP variable to a Javascript variable?
View Replies
View Related
Ok, I have a Javascript ASP and in it I have a dynamic repeating table with certain attributes to people. If one of these attributes is old or invalid, i want to change the color of the text (and maybe make it flash, blink, change size, something) so that it's easy to read.
View Replies
View Related
sql = "SELECT * FROM & console &'news'"
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?
View Replies
View Related
im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message
variable math bit=
qty=request.form("oqty")-Request.form("qty")
sql =
sSQL="Update spares SET spares.location='"&request("location")&_
"',spares.machine='"&request("machine")&_
"',spares.part_desc='"&request("part_desc")&_
"',spares.part_number='"&request("part_number")&_
"',spares.qty='(" & qty & ") "&_
"',spares.min_qty='"&request("min_qty")&_
"',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id
View Replies
View Related
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:
View Replies
View Related
Environment:
Development PC: W2K Professional
WebServer: W2K Server, IIS 5.0
Peer-to-Peer network
I'd like to create a new asp.net project on a remote server (not on the
local (development) machine. I have looked for info on how to do this, but
all I can find are instructions on how to create on localhost, then deploy
later to remote machine.
View Replies
View Related
what's involved in creating an ASP? I need to create a web page where users can check their past history of the account.
View Replies
View Related
So i currently have an asp page that creates an xml document with information from a database. However I need to link to my schema when creating the Root element here,
Set objRoot = objDom.createElement("projects")
this is the link that would go into projects:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="semesters.xsd"
View Replies
View Related
Im trying to create a string from checkboxes that have been checked, but for some reason its not working
strNumbers = ""
for each key in request.form("chkFacility")
strNumbers = strNumbers + "" & key & ","
intCount = intcount + 1
next
So I want to end up with a string like this '3,12,7.' Instead Im just getting a single number. Am I doing this the right way. Any help wud be just fantastic!!
View Replies
View Related
I know how to use ASP to create and write into a .CSV file on the server, but I have a small problem. Every time I write to the file I am adding new lines each time. I don't know how to wipe the previous contents out, and I thought this is probably a no-brainer for you guys ...
So, I'm looking either to delete the file at the start of the process and start from scratch or
* open the file
* wipe all contents from file
* write to the newly cleaned file
View Replies
View Related
How can i create a ZIP file from a folder (full of files) of the server.?
View Replies
View Related
I have an asp page where i created cookies-for admin and for user. The aspx page reads these cookies. Everything seems to work fine but now i have to create a new cookie if cookie has expired or if cookie is null. Also, i am having problems with the expire because if the username belongs to the admin for example and then i want to change
the username that belongs to a normal user the cookie recognises the first (admin) cookie. How do i solve this? .....
View Replies
View Related
I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.
That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.
View Replies
View Related
I am trying to pass a form value and pull some values from an array. I am getting no errors but no values on this code. Any ideas? Code:
View Replies
View Related