Parsing QueryStrings
I can parse my querystring just fine. But one thing that I can't seem to get working is displaying some of the data in a select box. Example:
?id=1&type=yy&equip_id0=t1&mac_addr=123&mac_addr1=456
&equip_id1=t2&mac_addr3=789....
I can populate the id and type values in my form fields just fine but equip_id and mac_addr will never be consistent. Certain case will have only one equip_id and one mac_addr value and in other case I will have equip_id0 thru equip_id20 and same with mac_addr. I simply want to parse whatever response I get and display those equip_id and mac_addr values dynamically in a select box. Is that possible?
View Replies
ADVERTISEMENT
I need to read a querystring from a frameset, actually its the parent of the frameset. The page that will do the reading is not actually one of the pages on the frameset but a pop-up window spawned by a frame in the frameset.
Using javascript I would use the window.parent.parent.location.search property but how do I do this with asp? is there an equivalent of this?
View Replies
View Related
I've been building an Intranet app; and have used hidden fields exclusively to pass one or two things from one page to another.
However, now I have reached a point where I may have an email sent to a co-worker, and they want to be able to click on a link in the email to take them directly to the info about that item. While previously, I had been able to get to that item by typing an identifying number in a text box and clicking a submit button, that won't be possible with a link in an email. I guess I will have to use a querystring.
I am not sure how the querystring thing works, but it looks pretty easy on first glance. Is there a tutorial, a really basic one, showing how to use the querystring? Do I have to use the post method now?
View Replies
View Related
i made a page in asp using querystrings for get some data and when i put in one of the variables in blank in the address bar i get this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: ""]'
/history.asp, line 82
i don't know how to fix it...in my code i have sth like this:
If Request.QueryString("var1")="sth" AND Request.QueryString("var2")>0 Then
'make some process
End If
so in the "var2" when it's empty i get an error :/ should i do another if for when is it empty just for in some way "handle" it and don't let occure problems while some user does sth like that??
View Replies
View Related
I've noticed a strange problem with setting cookies in ASP when the
cookie name you're setting exists in the querystring. The company I
work for has many partner sites who link to our site like this:
www.mycompany.com/partner.asp?PartnerID=??? The partner.asp page then
sets a cookie called PartnerID containing the value from the
querystring.
We have noticed, however, that if the partner calls the partner.asp
page and alters the capitalization of 'PartnerID' then another cookie
gets set which takes the capitalization of 'PartnerID' from the
querystring. All of the other asp pages in the site then seem to read
the first cookie set and thus it appears that the 'wrong' partner
settings are being used.
Has anyone experienced this problem before? Unfortunately altering the
cookie or querystring names would be a non-trivial task so this is not
an option at the moment.
View Replies
View Related
I currently have been using something like this:
Code:
response.redirect(request.querystring("page"))
It worked fine because I didn't need to pass on any other values from the querystrings. But now, I need something that will redirect the page and pass all querystring values. I tried this:
Code:
response.redirect(request.querystring("page") & "&" & request.querystring)
But it brings me to something like this:
http://www.site.com/thepage.asp&page%3D/thepage.asp&id%3D7
instead of what I would like for it to say:
http://www.site.com/thepage.asp&page=/thepage.asp&id=7
Now.... I know that I could have written:
Code:
response.redirect(request.querystring("page") & "&id=" & request.querystring("id"))
But that won't work because I actually have many querystrings and I won't know which ones are used, etc. I want it to just transfer all the querystring data.
Oh, and if the redirect could take out the "page" querystring.. that would be great. Because I don't need it.. it is only used to know what page to go to. I just need to keep all the other querystrings.
View Replies
View Related
Can ASP use valueless or variable less QueryStrings like this:
http://yoursite.com/forum/activate.asp?985486. (Not a real link).
I would also like to know if it can use addresses like this:
http://yoursite.com/forum/activate.asp/ZeeMan48. (Not a real link either.)
I would like to know for some work I am doing.
View Replies
View Related
I want to hide all my querystrings variables and filename when they executed how can i do this.
View Replies
View Related
I want to hide all my querystrings variables and filename when they executed how can i do this?
View Replies
View Related
I am creating an "Update Record" form and I ran into a problem with QueryStrings! Please help!!!
This is my code that gets the query string and I highlighted the line that causes the error: Code:
View Replies
View Related
I need to find out how to incorporate a popup window that passes a querystring, after some quick research I found that by using JavaScript that you can pop up a window Code:
View Replies
View Related
I want to know how I can check if a querystring exists, whether it has a value or not.
Basically I would like to use test.asp?login without having to use ?Login=blah.
View Replies
View Related
I am able to create and read cookies, however, I have to *create cookies from querystrings* (I cannot do this from form values, because the response page *redirects to the page I am working on, so there is no direct way to use Request.Form("var")*
Anyway, when I create the cookie, and remove the querystrings, of course, the cookie no longer works.
How do I take querystring values and turn them into cookies, such as page.asp?name=dave
to create a cookie 'username' with value 'dave'
and when they visit just plain page.asp, it remembers the value 'dave'
What can I do to get it to work?
View Replies
View Related
Whenever I click on a link (on the shoppingcart site I'm developing) that contains a querystring with the category name and an anchor name (whatever the name of the '#' bit in the URL is), SQL retrieves the category name from the querystring, filters out the appropriate information on the products and the page jumps down to the anchor link.
Once the customer clicks on a product, the processing page is meant to redirect, via the server.redirect command, back to the products page with a querystring identical to the initial filtering one (with the anchor name attached), thus teh customer is back to the same product that he clicked on, without having to scroll down every few seconds to add more of the same product.
However, even though the querystring sent by the response.redirect command is identical, the ASP code can't seperate it again properly and thus the SQL statement shows nothing, as the ASP coding thinks that the info following (and including) the # is apart of the 'category' part of the querystring.
View Replies
View Related
how can i use querystrings in response.redirect?
i want to use the variables CHOSENDATE and PERIOD, like
"page.asp?date=<%response.write(request.querystring("ChosenDate"))%>&period=<%response.write(request.querystring("Period"))%>"
but of course that won't work!
View Replies
View Related
i want to ask is there any way that i could get the value from field (the value will be used in SQL statement) without submit the form coz if i use Request.form("name"), it need to submit the form to get the value
View Replies
View Related
I'm interested in creating an asp function that enables the general parsing of xml. The function needs to take into account the structure of the xml document, as the document(s) can be quite complex.
The use of getElementsByTagName() is not appropriate in this case as I'm trying to avoid picking up the wrong data. The function also needs to be able to test if a node has any attributes and what the attributes are. Here's an example of the document I'm trying to parse: Code:
View Replies
View Related
ASP
I have
value(0) = 1
value(1) = 2
value(2) = 3
value(3) = 4
etc...
I need to have as output
1,2,3,4 ...
Finnaly I must submit that to 2nd asp page, and use it inside the javascript. Any ideas?
View Replies
View Related
I do a regular HTML form POST to a third party server. The server processes the request and displays result in XML format. However, I need to parse this xml and display in HTML. The problem is how can I get the control from the form POST.right now, the form posts and the result is displayed but I need the control back.
View Replies
View Related
I need to use forum code for my site, and making things bold, etc, is very easy however, I cannot work out how to use the tags [*url]http://site.com[/*url], the asterix will avoid it being parsed to create links.
I want to be able to get the text between the two URL tags, and build a link, so <a href=""" & textinbetween & """>" & textinbetween & "</a>".
View Replies
View Related
How can I parse it so that I can just get:
/newthread.php?do=newthread&f=5
I can get /newthread.php with script_name, but I'm not sure how to get the whole string.
View Replies
View Related
is there any way that i could get the value from field (the value will be used in SQL statement) without submit the form coz if i use Request.form("name"), it need to submit the form to get the value.
View Replies
View Related
I need to do one SelectNodes loop inside another. anyone know how I can do this ? I'm trying the following code at the moment which doesnt work:
[VBS]'WORK EXPERIENCE
Set TheseNodes = DomDoc.SelectNodes("CLASS/Work_Experience/job")
For Each node in TheseNodes
Response.Write node.attributes(0).text & "<br/><b>Time Frame/b> " & node.attributes(1).text & " - " & node.attributes(2).text & "<br/><br/>"
Set ResponsibilitytNodes = DomDoc.SelectNodes("CLASS/Work_Experience/job[@employer='" & node.attributes(0).text & "']/Responsibility/")
For Each node in ResponsibilitytNodes
Response.Write ResponsibilitytNodes.text
Next
Next[/VBS]
View Replies
View Related
I have a script that Technicweb helped me make. However it is just short of
what I need. The players data still has the html code around it. I want to
extract the name only with the statistics. I cant seem to get my head around
it - all I have learned from picking apart Technicweb's script seem not to work for me.
Here is the latest of what I have come up with, it gives me an error:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'MID'
/scrapes/testparse.asp, line 33
am I way off track? Code:
View Replies
View Related
I think this has been asked before but I can't find the reply. I'm using the XML parser to post data to a server and receiving a reply. The reply is in XML and I want to find elements of the retrieved data. Eg. I receive a string with: Code:
<food>Love it</food>
<drink>lager</drink>
I want to get the value of the <food> tag.
View Replies
View Related
I started noticing some page errors in my web application. All
of the erroring clients where using Windows XP - MSIE 6.0. It seems these
clients were passing the bookmark (fragment identifier) portion of the URL
to the server.
For example, with the following URL:
http://testsite.com/page.aspx?myquery=test#bookmark
The browser *should* send a request for:
http://testsite.com/page.aspx?myquery=test
However, these clients were sending the entire URL as the request. Thus, my
querystring parameter "myquery" had the unexpected value of "test#bookmark".
Has anyone else noticed this behavior? Perhaps it is related to the
download.ject patch (released July 2). I have yet to recieve a response to
this message, which was posted one week ago in two other newsgroups.
View Replies
View Related
Lets say I have a string like "www.ssss.com/images/theimage.jpg"
I want to parse the string and just return the image: theimage.jpg
View Replies
View Related
I am looking for something similar to "preg_match" and "preg_match_all" in PHP.
I have searched the forum with no luck. I hope you are able to give me some pointers
Basically I want to match some text from a form and loaded it into new variables making use of regular expressions. the text comes form a textarea input type. Code:
View Replies
View Related
I have to display time in HH:MM AM/PM format. My date/time values are being pulled from a MS SQL database that is in smalldatetime field format.
I need to take a date such as "5/5/2006 7:35:00 AM" and display it as "7:35 AM". I can't seem to find how to parse this or display only the hours, minutes, and AM/PM designator.
View Replies
View Related
I am looking for code for parsing csv files. The files I am parsing can be:
-pure csv: a,b,c
-quotes: 'a','b', 'c'
-quotes or non-quotes: 'a',,'b','c'
-with or without carriage return
Can anybody help me with this one?
View Replies
View Related
I've found the MS XML parser as shown in below code. I'm just attempting to display the various ListNames in the ListStruc section of an incoming XML file (generated by the SelectLists API call). On the line with the astrik though, I'm getting the error "Object required: '[object]'. Is this because I don't have this parser installed? (I'm running XP Pro w/IE 6.0.)
Also, I'm not sure about the line xmlDoc.load(request), shouldn't it be xmlDoc.load(xml.responseText)? Code:
View Replies
View Related
I have a string problem that I would like to resolve. I am submittting multiple values to a form that is posted to query string. The string looks like this:
http://localhost/csiapp/test.asp?Submit=Submit&menu2=436%A0AbdallahFadi&menu2=430%A0AdkinsAngela&menu2=425%A0AleemAmina
So what I need to do is to take the id number of the user and put it into an array so I can later insert it into the database. So for the example above, I need an list that looks like this:
436, 430, 425
Once I have this list I can make it an array and then put it into the database.
My question is how do I make the string above look like the string below? I know that I need to use some function of asp to parse the name oout of the string, but i just don't know exactly what....
View Replies
View Related
I have searched on parsing some strings but I don't know how to apply it to my string. The string I am parsing looks like: $$1,0,0,0,0,0,7,8,0,0,0,0,13,14,0$$None
What I am looking to do is get the non-zero numbers.
I will then use these for another portion of the page where checkboxes corrosponding to those numbers will appear and the zeero numbers will not. The string after the last two $$ must be used as well for text on the page. I can change the string to look however
is easiest to parse.
View Replies
View Related