By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,663 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,663 IT Pros & Developers. It's quick & easy.

Targetting the frameset from the address bar

P: n/a
Hello fellows,
I have a Web application using frameset and frames. When I click in a
hyperlink button I can send the selected aspx page using the "target"
attribute into the selected frame. However when the aspx page is called from
IE address bar the page is loaded into the entire browser and not into the
frame I would like to. I tried to use the target attribute of the attribute
form but it does not work.
I noticed that when the page is called from the address bar the content of
"Request.UrlReferrer" is null but I do not find how to send this page into
the desired frame programmatically.
It would be appreciated if anybody knows how to redirect the page into the
frame.
Thanks in advance
Pete
Aug 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Put this in the HEAD section of the subframe pages that people could try to
load without the main frameset page:

<SCRIPT LANGUAGE="JavaScript">
<!--

if (top.location.href.indexOf("frameset.aspx") == -1)
top.location.href = "frameset.aspx";

// -->
</SCRIPT>

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Pierre" wrote:
Hello fellows,
I have a Web application using frameset and frames. When I click in a
hyperlink button I can send the selected aspx page using the "target"
attribute into the selected frame. However when the aspx page is called from
IE address bar the page is loaded into the entire browser and not into the
frame I would like to. I tried to use the target attribute of the attribute
form but it does not work.
I noticed that when the page is called from the address bar the content of
"Request.UrlReferrer" is null but I do not find how to send this page into
the desired frame programmatically.
It would be appreciated if anybody knows how to redirect the page into the
frame.
Thanks in advance
Pete
Aug 15 '06 #2

P: n/a
Thanks a lot Peter

After a dummy test with frameset I finally got what I need with your answer.

Regards,

Pete
"Peter Bromberg [C# MVP]" wrote:
Put this in the HEAD section of the subframe pages that people could try to
load without the main frameset page:

<SCRIPT LANGUAGE="JavaScript">
<!--

if (top.location.href.indexOf("frameset.aspx") == -1)
top.location.href = "frameset.aspx";

// -->
</SCRIPT>

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Pierre" wrote:
Hello fellows,
I have a Web application using frameset and frames. When I click in a
hyperlink button I can send the selected aspx page using the "target"
attribute into the selected frame. However when the aspx page is called from
IE address bar the page is loaded into the entire browser and not into the
frame I would like to. I tried to use the target attribute of the attribute
form but it does not work.
I noticed that when the page is called from the address bar the content of
"Request.UrlReferrer" is null but I do not find how to send this page into
the desired frame programmatically.
It would be appreciated if anybody knows how to redirect the page into the
frame.
Thanks in advance
Pete
Aug 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.