Results 1 to 6 of 6

Thread: Help convert from VBScript to JavaScript

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Help convert from VBScript to JavaScript

    Hi everyone,

    How can I convert this statement from VBScript to JavaScript? I would appreciate any help. Thanks.

    Code:
    If Session("TEST") = False or IsNull(Session("TEST")) = True then
         Response.Redirect("http://localhost/Test Web/Default.htm")
    End If

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Um.... just so you know, ASP only runs VBScript...... unless you are converting to ZSP, in which case you'll need to look things up..... or are you trying to convert it to a client side JavaScript, which poses a problem -- you can't access Session objects from the client.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    you could still do the redirect...

    document.location.href = whatever.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by mendhak
    you could still do the redirect...

    document.location.href = whatever.
    True, but you still don't have access to the Session variables.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by techgnome
    True, but you still don't have access to the Session variables.
    ]

    True, but you can still redirect.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Help convert from VBScript to JavaScript

    Originally posted by Ace
    Hi everyone,

    How can I convert this statement from VBScript to JavaScript? I would appreciate any help. Thanks.

    Code:
    If Session("TEST") = False or IsNull(Session("TEST")) = True then
         Response.Redirect("http://localhost/Test Web/Default.htm")
    End If
    aah... you could always use cookies instead of session variables.

Posting Permissions

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



Click Here to Expand Forum to Full Width