Ensuring that a page loads in a particular frame a

Results 1 to 2 of 2

Thread: Ensuring that a page loads in a particular frame a

  1. #1
    Anuj Seth <anuj@sasi Guest

    Default Ensuring that a page loads in a particular frame a

    Hi,<BR><BR>How do I ensure that a particular web page(html/asp) is opened from within a particular frame only. <BR><BR>Basically, I have a site which has all ASP pages created dynamically from a database. I don&#039t want anyone to bookmark any page except the main page. So, the starting page has 2 frames -- 1 of 0 size and the other 100%. So it seems as if the page takes the entire window, but I get the advantage that the address location does not change as the user browses through the site. *BUT*, the user can simply take the main page from the starting frame window to avoid running the site in a frame. SO, how do I make sure that when a particular page is being accessed it is running in a particular frame. If it isn&#039t it loading the frame page and loads itself in the appropriate frame?<BR><BR>I hope I&#039ve expressed the scenario properly?<BR><BR>Awaiting an early reply...<BR><BR>Thanks in advance....<BR><BR>With Regards,<BR>Anuj<BR>

  2. #2
    Simhan Guest

    Default RE: Ensuring that a page loads in a particular fra

    One of the workarounds that I use commonly to tackle this problem is to use a small JavaScript code in every page which looks like<BR><BR>&#060;script Language="JavaScript"&#062;<BR>if (top.location == window.location)<BR>{<BR>// redirect to error page or to the home page which contains<BR>// frames<BR>}<BR>&#060;/script&#062;<BR><BR>This code neither allows the user to use the "open frame in new window" option in the right-click menu nor allows the user to type the exact url of the page directly into the location bar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts