Results 1 to 4 of 4

Thread: Redirect with variables?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    I have a code that redirect to another ASP page but i don't
    know how to pass a variable to that next form.

    Someone can help me with that?

    I use this javascript for the redirection

    Code:
    HtmlContent = "<SCRIPT language='JavaScript'>" & VbCrLf & _ 
    "window.parent.parent.location.href='Gestion.asp';" & VbCrLf & _ 
    "</SCRIPT>" & VbCrLf
    Response.Write HtmlContent
    If possible please provide codes.
    Process by example is the best way to learn.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Code:
    HtmlContent = "<SCRIPT language='JavaScript'>" & VbCrLf & _ 
    "window.parent.parent.location.href='Gestion.asp?MyVariable=" & MyVariable & "';" & VbCrLf & "</SCRIPT>" & VbCrLf
    Response.Write HtmlContent
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post Unable to get it

    I'm unable to retrieve the content of the variable.

    I've set a fiexed variable to test it as below.

    Code:
    "window.parent.parent.location.href='Gestion.asp?Var1=Var12';" & VbCrLf & "</SCRIPT>" & VbCrLf
    To retrieve i'm using Request.Form("Var1") is it ok?
    Or did i need to retrieve it another way.
    If possible please provide codes.
    Process by example is the best way to learn.

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    No.. Use Request.Querystring("Var1")

    Request.Form will only have data from a form that is submitted.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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