views:

354

answers:

1

I have a legacy web page made with frames (yah, I know). One frame (letFrame) is trying to update another frame (rightFrame) with the following anchor:

<a href="foo.asp?myVar=BAR" target=rightFrame>

foo.asp is already loaded in rightFrame and looks something like this

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="MYNAME" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form target="_self">
<SCRIPT LANGUAGE=vbscript>

    Option Explicit

    dim myURL

    myURL = parent.location.href

<...blahblablah...>

When I print out the value of myURL or parent.location.href I find that the parameter portion ?myVar=BAR has already been stripped off. It just reads foo.asp.

Is there some setting in IIS that would be doing this; or is there another way to get the parameter portion?

+4  A: 

Looks like you're grabbing the url of the parent. Try window.location.href.

Also.. In ASP, you should be using.. Request.Querystring("param").

madcolor
Interesting, when I switch to "window.location.href" in includes "PAGE="after the "?" and before the parameter. The remaining coded doesn't expect that piece. I can cut that piece out, but now I'm curious how it ever worked on the original server.
S Ennis
I'd switch over to `Request.Querystring("param").` however the original developer was treating the parameters section of the URL as a single parameter (no ?YADDAH=BAR); so I'm still stuck with the suboptimal windows.location.href (unless I recode the rest of the site).
S Ennis