Loading ...
Sorry, an error occurred while loading the content.
 

RE: [PBML] JavaScript-->Locationbar-->$PerlVariable ???

Expand Messages
  • oO_RoB_Oo
    I am a relative newbie to perl myself, but i have written some javascript code that logs the extra browser/os deatils that perl can get from the environment
    Message 1 of 2 , Jun 6, 2000
      I am a relative newbie to perl myself, but i have written some javascript
      code that logs the extra browser/os deatils that perl can get from the
      environment variables, and i pass them to a script using the "
      window.location= "directive

      goes something like this

      url = "http://www.domain-name.com/cgi-bin/script.pl?"; // first part of the
      location
      url += "browser="; // define name=value
      pair (browser=(next lines value))
      url += navigator.appName; // browser name
      url += "&x="; // n=v pair (x=(next
      lines value))
      url += screen.width; // screen width
      url += "&y="; // n=v pair (y=(next
      lines value))
      url += screen.height; // screen height
      url += "&color="; // n=v pair
      (platform=(next lines value))
      url += screen.colorDepth; // color depth
      url += "&location=/footer2.html"; // n=v pair
      (platform=(page to load after processing))
      window.location=url; // make frame/page
      go to location "url"

      http://www.domain-name.com/cgi-bin/script.pl?name1=value1&name2=value2
      in laymans terms, the "?" after the url part is for passing data to STDIN of
      the script, in the script you then split the name-value pairs at the "&",
      and then from the script you can call $FORM{'name1'} which will have the
      value of "value1"

      hope this is what you are on about, and this is only my understanding of it,
      so dont flame me if i am wrong! after all, ive only been doing perl a
      couple of weeks!

      oO_RoB_Oo
      ___________ __ __ _____ __________________
      \_ _____/ _____ ___________ _/ |_| |__ ___ __ / \\______ \_____
      \
      | __)_ / \\____ \__ \\ __\ | < | |/ \ / \| ___/ _(__
      <
      | \ Y Y \ |_> > __ \| | | Y \___ / Y \ | /
      \
      /_______ /__|_| / __(____ /__| |___| / ____\____|__ /____| /______
      /
      \/ \/|__| \/ \/\/ \/
      \/
      The EmpathyMP3 In Car MP3 Player - www.EmpathyMP3.co.uk
    Your message has been successfully submitted and would be delivered to recipients shortly.