Results 1 to 14 of 14

Thread: [RESOLVED] Trouble getting "get" vars from URL

Threaded View

  1. #1
    Join Date
    May 2006
    North of the South Pole

    resolved [RESOLVED] Trouble getting "get" vars from URL

    Does anyone know what's the problem with this javascript code here:

    function a() {
    var origionalurl = window.location
    var arraywithurl = origionalurl[1].split("=")
    var finalurl = arraywithurl[1]
    window.location = finalurl

    I'm a begginer, so it's probably something very basic.

    What I'm trying to do is redirect someone to a URL in a variable called "loc" in the address bar. So, I get the starting URL (It would look something like "myURL?loc=another_URL") and split it into two parts ("myURL?loc" and "another_URL") and then tell the person a message and then redirect them to "another_URL". What's my problem?
    Last edited by shane.carr; 05-31-2006 at 07:36 PM. Reason: changed "java" to "javascript"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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