Re: method to use variables after the name of file

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Mon, 07 Feb 2000 00:55:17 CST
 To:  tristar(at)raex.com
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
js solution:

function Querystring(str){
  str = str.substring(1).split("&");
  for(var i=0; i<str.length; i++){
    str[i] = str[i].split("=");
    this[str[i][0]] = decode(str[i][1]);
  }
  function decode(s){
    s = s.replace(/\+/g," ");
    return unescape(s);
  }
}

qs = new Querystring(location.search);
title = qs["Title"];
filename = qs["Filename"];

and there you have the parsed filenames. i'm assuming that this search 
string is the result of a form GET submition and that is URLencoded 
properly. - Cyanide_7


>I am working on a midi jukebox that all I would have to do is have a
>link that points to something like
>"midi.html?Title=Full+name+of+MIDI&Filename=filename" and have some sort
>of code in midi.html that would replace anything with "Title" variable
>with "Full name of MIDI" and replace "Filename" with "filename.mid"  I
>thought it could be done with SSI somehow but can't find the variable.
>Is there perhaps a way of doing it with javascript?  My web host
>supports SSI, CGI, PHP3 (i think), and has MySQL installed (reason I
>assume PHP3 is supported).  But not ASP.
>
>--
>Todd Eddy
>tristar(at)raex.com
>http://www.vrillusions.com/
>
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA