Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 12th, 2006, 05:18 AM
Registered User
 
Join Date: Apr 2006
Location: Payyanur, Kerala, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to arunmohanmp
Default Window Resize

In my website i use Frames. But in a certain case the index.html page becomes one of the frame which is to be omitted. Is there any code/script to check whether the page is not opened in frame...?

Regards
MP

Thanks and Regards,
Arun Mohan M P
Reply With Quote
  #2 (permalink)  
Old September 20th, 2006, 03:27 AM
Registered User
 
Join Date: Mar 2006
Location: Ahmedabad, Gujarat, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the solution :

I found it in Beginning Javascript (Wrox).

-------------
| test.html |
-------------
Code:
<html>
    <head>
        <script type="text\javascript">
            function onLoad()
            {
                if(window.top != window)
                {
                    alert("Opened in frame.");
                }
            }
        </script>
    </head>
    <body onload="onLoad();">
    </body>
</html>
--------------
| test1.html |
--------------
Code:
<html>
    <head>        
    </head>
    <body>
        <iframe src="test.html" />
    </body>
</html>
Create files test.html and test1.html and put them in the same folder.
Now try to open both of them individually.
Hope your problem will be solved.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Application Window resize detection jcable Excel VBA 2 June 4th, 2008 02:48 PM
Height adjustment on window-Scroll and Resize AbrarNazeer Javascript 0 April 9th, 2008 07:15 AM
Resize and lock the Access Window dartcoach Access 5 June 23rd, 2005 10:35 AM
Resize Access main window from Access form hasseh Access VBA 2 October 24th, 2004 05:15 PM
Application Window resize Draffus VB How-To 0 September 8th, 2004 03:49 PM



All times are GMT -4. The time now is 09:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.