Loop And Querystring
I'm trying to use a database of workshops to create a menu structure. So far i've been able to cycle through the db and make a selection of Categories.
These categories are hyperlinked in the format aspwmenu.as?wid=xx where the xx is the category of workshop.
Where i'm having trouble is using the request.QueryString value to select the matching workshops from the db. I can't get it to look back into the recordset.
I'm sort of new at this as you can probably tell, but i'm having no luck being able to get lists via the querystring. Hopefully someone can see what's going wrong here. Code:
View Replies
ADVERTISEMENT
Is it possible to loop round all querystring parameters in a web page (i.e. access them without hardcoding them)?
I want to do this because I have a page that has different querystring variables passed into it depending on the content of the calling page.
View Replies
View Related
The subject sounds confusing but here is what i want to do. I have a
button on my page which says
OnClick="javascript:window.open('reportsContainer.asp?pag eURL=Report1.asp?intCurrentPage=1&blnRetrieveFlag=1&Show=1',TasksRPT');"
Now on the Conatiner.asp what i do is
if Request.QueryString("Show") = 1 then
pageURL = Request.QueryString("pageURL")
end if
And then i set the pageURL along with intCurrentPage and
blnRetrieveFlag parameters to my fram src as
<frame height=500 scrolling=auto name="pageFrame" id="pageFrame"
border=0 src="<%=pageURL%>">
Code:
View Replies
View Related
I'm trying to pass a parameter from a for loop to the nested while loop
but only the first counter is passed. Here is the code:
View Replies
View Related
I have a recordset that I loop through all of the data within a table, within the same loop, I am trying to add another loops that pulls information from the first recordset to base the second recordset off of: Code:
View Replies
View Related
is it possible to check if a variable is present in the querystring, or is that unneccesary? will it assume the variable is empty if it is not present in the querystring?
View Replies
View Related
i have a hyperlink from a results page:Code:
Response.Write "<TD>" &"<a href = JobDetails.asp?id=" & rs("JobID") &" >" & "Click Here" & "</a></TD>"
the sql statement in JobDetails.asp =
Code:
sqlstr = "select * from Jobs where JobID = '" & Request.QueryString("ID") & "'"
rs.Open sqlstr, conn
im getting this error when i click the hyper link
line 20 is the rs.Open sqlstr, conn line
this error seems to happen with dates but i dont have any dates at all.
View Replies
View Related
I want to write a page which will
load a default page for me with some links and all. lets say someone
clicks on the link, which not only points to the same page but also
passes a querystring. Looking at the querystring I will then display
data from a database.
So my question in short is... Is it possible to have a single asp page
which can return either a default page where no querystring is passed
or a result from the database when a querystring is passed?
If the answer is yes, then is it a good idea to do this or have 2
seperate pages?
View Replies
View Related
I've got a request form for samples of our product that we send out. The form is being linked from our ebay auction pages. In the link from the auction page I'd like to include the model number of the sample that they're requesting. (ie. /sampleRequest.asp?AS240)
Then, on my sampleRequest.asp page which contains the input form I'd like to include a hidden field which holds the value of that querystring. Finally, upon submitting this form I'd like that value to be placed into the sampleModel field in my Requests table in my database.
The problem I'm having is how to populate the hidden form field with the querystring form the ebay auction page. Code:
View Replies
View Related
I have a querystring like this:
checkbox1=2&checkbox2=1&checkbox3=2checkbox1=5&checkbox9=1&checkbox3=1
I would like to insert each set of checkbox1, checkbox2, checkbox3 into a table like field1(checkbox1), field2(checkbox2), field3(checkbox3). Remember each set of 3 checkboxes are 1 unit inserting into a table. Is this possible?
View Replies
View Related
I am trying to maintain some ASP code that I did not generate and the programmer who did has a very different style than I do so I am having some problems. Hopefully someone out there can help me by answering my question.
I have the following line of code:
If (isEmpty(Request("dir"))) Then.....
Now my question:
Could the Request("dir") used above be the same thing as using Request.QueryString("dir")???
View Replies
View Related
I just noticed though that when I include the file name to the folder it worked.
ie unitingrhythms.co.uk/?size=4 - no output
& unitingrhythms.co.uk/index.asp?size=4 - outputs 4
can the querystring be read when the file isn't shown?
View Replies
View Related
i have a querystring on one page where the url looks like:
delete.asp?name=test2.pdf&type=file
on delete.asp i have:
Dim name, type
name = Request.QueryString("name")
type = Request.QueryString("type")
It gives me an error for some reason.
View Replies
View Related
i am working on ASP.net in c# and i want to pass " +" in querystring but "+" is converted to space.Is thereany encoding method to show "+" in querystring.
View Replies
View Related
I have a querystring that contains the + sign as a separator, I need to read these values individually in a select statement, for example.
&text=Single+205
where single is the type of room somebody wants and 205 is the user ID in the Customer table.
View Replies
View Related
I have a banner that is clicked and the people are takin to a general information page. From the banner they are given the URL and a querystring of ?AdID=X. On that page they click and are taken to our signup page where i have a form for them to fill out.
The mentioned querystring is the referering company. How can I get the querstring information into a hidden value on my form before submitting to the database. I have tried <%=request("HTTP_REFERER")%> and it writes the whole URL into the database. I need just the querystring. Have also tried. <%=request.querystring("AdID")%> and that does not work either.
View Replies
View Related
I am using querystrings to pass URLs to be able to tell what page to go back to when an action is done on my inventory site. For example, if an order status is updated, the page that does the update knows to go back to a page to display the page that the person was looking at before the update was done.
One of the pages that displays orders filtered by search criteria uses querystrings. If I try to send that URL as a querystring, it all gets combined together. For example, I have one page that redirects to something like "emailUpdate.php?Send=True&OrderID=342&LastPage=results.asp?Item=Computer&Method=Brand&Criteria=Dell" where "results.asp?Item=Computer&Method=Brand&Criteria=Dell" is the page I want to return to.
The "Item=Computer" gets set just fine, but the rest of the URL is concidered part of the first URL. Is there some special characters that I can use to show that I want the one URL to be its own querystring?
View Replies
View Related
how do I add a querystring, with ASP? You're probably thinking, "just add it to the url"...but that's not what I want to do. Here's an example of what I do want to do,
[vbs] Dim someString
'// Here a querystring gets added, through headers or something
'// Here my code uses the newly added querystring
someString = Request.QueryString("MyAddedQueryString")
[/vbs]
this is just a simplified example. Does anyone know how to do that?
View Replies
View Related
I have a this piece of code...
<
dim ur
url="http://www.test.com?var1=1&var2=2
%
And this is a part of a flash movie..
<param name="movie" value=testez.swf?clickTAG=<%=url%>
when i click in the movie the page goes to..
http://www.test.com?var1=
But the another variable var2 doesnt appear in the url. How its possible pass all the parameters when you click in a flash movie?
View Replies
View Related
I wish to build the following statement from a table that has been dynamically built using an query against an Access database. The number of rows in the resulting table can be 0 to any number. How would I dynamically build the string of params to pass to another web page?
During the creation of the table? or after the table is built? The number of params will be equivalent to the number of rows and the values are variables containing the data stored during the table creation during thr recordset loop.
file.asp?param1=value1¶m2=value2¶m3=value3
View Replies
View Related
iam send a sending a value in URL to asp page
html page
<A href="IndustriesDetails.asp?IndustryName=Houseware & Kitchenware" target=_main>
Houseware & Kitchenware</a>
ASP page
strIndustry = Request.QueryString("IndustryName")
The problem is it is only getting "Houseware" if i remove '&' then it works fine ..can any one please tell me how can i solve this problem ... i want to get "Houseware & Kitchenware" in asp page
View Replies
View Related
I just started working for this company. They have an online form that takes the user information and then it sends it to an asp page so it can be appended to a microsoft access database. They want to have a the functionality of tracking down their web advertising campaigns through the use of their promotion field in the database.
Basically they want to track down the seach engine the user came from when he filled out the form. I don't have that much of experience in this kind of scenario although i read an article on request.querystring(key) which i believe is what i need to do although i'm not sure how to plug it in so it can start working.
The promotion code has already been inserted in the database and now the functionality is through an radio button called 'search engine' everytime it gets selected it will send a value of "internet" to the database promotion field. Does anyone have some suggestion of how to go about this?
View Replies
View Related
I have a case statment like
select case code
case "01"
ups_desc = "OPTION1."
case "02"
ups_desc = "OPTION2."
case "03"
ups_desc = "OPTION3"
case "07"
ups_desc = "OPTION4"
case "08"
ups_desc = "OPTION5 "
case "11"
ups_desc = "OPTION6"
case "12"
ups_desc = "OPTION7"
end select
I then have table called "users" which has the following
id
UserID
Code
now the trick
I want to loop through the recordset of the user tables and populate a drop down where the code from the case and the user table are the same.
Something like
do while rs("code") = code
<option> This then is populated based upon the loop(I have this code)</option>
loop
View Replies
View Related
I need to insert recordes into a db based upon a number returned in a form
Somerthing like
AddRecords = Request.Form("NumberOfRecords")
Count = 0
if Count < AddRecords Then
Do while Count.eof
SQL Code....
Count = Count + 1
Count.move next
Loop
End If
View Replies
View Related
i have 2 tables (A & B) with date records
now i loop table A and then table B, the output will be table A in the front
and table B in the back.how can i make the output show by date in both tables altogether?
do i need to combine tables before but the number of records is over 100K
which may spend a lot of processing power?
View Replies
View Related
on my classifieds site i would like to create a simple ads system. i currently have the ads site made but need some advice.
on my classifieds site i would like to display the ads down the left hand side.
however i dont want to over display ads.
if there is not many items listed i only want a small amount of adverts shown on the left hand side. however if there is lots listed
i would like quite a few adverts listed.
otherwise i would have a big list of adverts and only a small number of items listed making a big blank space on my page.
i am guessing this would have to be a loop or something.
the code i am using to show the text links is <%=adurl%>
View Replies
View Related
I am using a for loop in one of my asp page. Could someone let me know if I can do the for loop as follow:
[code]<% for i = 1 to 5 %>
my html code
my html code
my html code
<% Next i %>
instead of
[code]<%
for i = 1 to 5
Response.Write "<input name = 'id'"&i&" type='text' value = "&id& ">"
Next i
%>
View Replies
View Related
I am using ASP and need a DO LOOP to get some info back from the db. but the asp reads the first do loop but does not read the second one ......
View Replies
View Related
is there any function or statements that work the same as the 'break' statement in C++ language?
for example:
While Not rs.EOF
If rs("LoginID") = userId Then
break 'what shd i use for ASP???
Else
rs.movenext
View Replies
View Related
im writing some script to add records to my db. but if a value thats about to be added exists, then dont add that record.for example: if i want to add 7 records to my db with the values 1 - 7, but the db already has 3, 5 and 7, then it should only add 4 new records (1, 2, 4 and 6).
i have a record returning all records form my db, and an array with the values i want to add. i want to loop through my recordset of all existing entries, then for each loop, start another loop to see if the value exists, and if it doesnt , then add a new record.
View Replies
View Related
How to use the for loop or do while loop to create the age range from 10 -100 to let the user to select from the form object - list/menu by using asp? The coding below is just a concept. For example
Response.Write("<select name=""select"">")
for (a=0; a<101; a++)
(
Response.Write("<option value=""" & age & """>" & age & "</option>")
)
Response.Write("</select>")
View Replies
View Related
I'm trying to create a page where images are displayed based on an id in a sql table (basically its an unlit candle until a value in the id field exists). I'm not getting an error with my code below - but its not working right either. Code:
<% If rs("my_id")="2" Then Response.Write "<img src=""images/07.jpg"" width=""56"" height=""97"" alt="lit candle">"Else Response.Write "<img src=""images/UNLIT_07.jpg"" width=""56"" height=""97"" alt=""unlit candle"">" End If %> ...
View Replies
View Related
I have a SUB which has input variables. If I run it once its okay, but I need to include it in a for....next loop. Can this be done ?
for i=0 to 100
call mySub(arr(0,i))
next
sub mySub(var)
.....code
end sub
View Replies
View Related