Splitting String

Results 1 to 2 of 2

Thread: Splitting String

  1. #1
    Martha Guest

    Default Splitting String

    Hi Everyone,<BR><BR>I&#039;m wondering if of of you guys can help me out with something. Im passing the current page name to another page and I need to split the string to get the last part of the querystring from it somehow.<BR><BR>In page 1, I use client side javascript to get the page location by using &#039;+location+&#039; (straight html page)<BR><BR>This then goes to page 2(ASP/VBscript). Page 2 picks it up as follows and I need to split the page address and the "Type=2" from the end of it.<BR><BR>http://localhost/query.asp?Page=file:///C:/Documents%20and%20Settings/Martha/Desktop/inject.html?Type=2 <BR><BR>As you can see, there are 2 question marks in there. The first is .asp?Page=... and the second is on the name of the page, ie inject.html?Type=...<BR><BR>Can anyone give me some advise on how I can achieve this? I&#039;m new to VBScript BTW :)<BR><BR>Ideally, I&#039;d like to be left with two variables, something like this:<BR>======<BR>PageLocation=file:///C:/Documents%20and%20Settings/Martha/Desktop/inject.html<BR>======<BR>Type=2 <BR>======<BR><BR><BR>Many thanks to any who apply.<BR><BR>Best Wishes,<BR>Martha<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Splitting String

    Not sure what you want, but if you are looking for the end of the URL you could use<BR>right(UrlVariable,6)<BR>also have a look at instr() and left()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts