Results 1 to 2 of 2

Thread: A simple one....

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    7

    Unhappy A simple one....

    Hi all,


    I'm stock trying to request a frame name with vbScript to get the servervariable("http_referer") in the second frame by clicking in the menu which is in the first frame.

    I know that this is not the place for this question but I've been looking and i'm really desperate.

    thanks!

  2. #2
    Fanatic Member HaxSoft's Avatar
    Join Date
    May 2000
    Location
    Ohio
    Posts
    593
    Make sure the link in the menu frame obtains the referrer variable and passes that in a call to load the target frame (second frame). The link in the menu should be something like
    Code:
    <a href='pagetoload.asp?strref=referrer' target="second_frame_name">Menu Text</a>
    , where strRef is the value of the referrer and second_frame_name is the name of the target frame.

    The pagetoload.asp script must then make sure to examine the parameters passed to it. For example:

    VB Code:
    1. <%
    2. ' pagetoload.asp file
    3.  
    4. ' Find the value of the strRef (referrer), if any given.
    5. strRef = Request("strref")
    6.  
    7. ' Now set up a template string.
    8. If Trim(strRef) <> "" Then
    9.     strOutput = "You came from <b>%ref%</b>."
    10. Else
    11.     strOutput = "You came from nowhere."
    12. End If
    13.  
    14. ' Here we replace the %ref% placeholder
    15. ' with the real referrer.
    16. strOutput = Replace(strOutput, "%ref%", strRef)
    17.  
    18. ' If you want to out put the text:
    19. Response.Write strOutput
    20. %>

    Hope this helps ya. (I am not a lean-mean ASP-coder, but I think this code would work).

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