How do you do this?

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

I am looking for a way to open external links from a site in a window but
have the referring site header in the window (in a header frame). I have
seen it done and can
create a single page with the target URL, but what I am looking for is the
ability to pass the URL to a single "template" page rather than having
multiple pages for each external link. For example, it done on this site:

http://www.oscommerce.com/shops/goto,17149

See how they have the header in the frame? I know how to do this in php but
I am working on a client's windows server without databases & no php so is
there a way to do this in Javascript or ASP (unfortunately I have no ASP
experience)? or a way to pass the URL through HTML?

Can anyone help? Anyone know of any reference sites that deal with this? Any
ASP boffins out there?
 
Wayne said:
I am looking for a way to open external links from a site in a window
but have the referring site header in the window (in a header frame).
I have seen it done and can
create a single page with the target URL, but what I am looking for
is the ability to pass the URL to a single "template" page rather
than having multiple pages for each external link. For example, it
done on this site:
http://www.oscommerce.com/shops/goto,17149

See how they have the header in the frame? I know how to do this in
php but I am working on a client's windows server without databases &
no php so is there a way to do this in Javascript or ASP
(unfortunately I have no ASP experience)? or a way to pass the URL
through HTML?
Can anyone help? Anyone know of any reference sites that deal with
this? Any ASP boffins out there?

You can pass parameters to another HTML page (template.html) by
<a href='template.html?param1=some name&param2=some other name'>

In the receiving page, use this in the <head>
<script type="text/javascript">
function qsobj(parm)
{
var qpairs = document.location.search.substring(1).split("&")
var qvbl = qpairs[parm].split("=")
return qvbl[1] ? unescape(qvbl[1].replace(/%20|\+/g," ")) : null
}
param1 = qsobj(0)
param2 = qsobj(1)
</script>

You can then use param1 and param2 in any other JS on the page
 
Thanks. I will give it a go.....

--
Wayne

Websites for small business
www.planethome.com.au

For Professional Designs & Custom NOF Support
* Fusion Site Templates made to order! *
http://www.gotfusion.com/services/

Trevor L. said:
Wayne said:
I am looking for a way to open external links from a site in a window
but have the referring site header in the window (in a header frame).
I have seen it done and can
create a single page with the target URL, but what I am looking for
is the ability to pass the URL to a single "template" page rather
than having multiple pages for each external link. For example, it
done on this site:
http://www.oscommerce.com/shops/goto,17149

See how they have the header in the frame? I know how to do this in
php but I am working on a client's windows server without databases &
no php so is there a way to do this in Javascript or ASP
(unfortunately I have no ASP experience)? or a way to pass the URL
through HTML?
Can anyone help? Anyone know of any reference sites that deal with
this? Any ASP boffins out there?

You can pass parameters to another HTML page (template.html) by
<a href='template.html?param1=some name&param2=some other name'>

In the receiving page, use this in the <head>
<script type="text/javascript">
function qsobj(parm)
{
var qpairs = document.location.search.substring(1).split("&")
var qvbl = qpairs[parm].split("=")
return qvbl[1] ? unescape(qvbl[1].replace(/%20|\+/g," ")) : null
}
param1 = qsobj(0)
param2 = qsobj(1)
</script>

You can then use param1 and param2 in any other JS on the page
 
Back
Top