SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question redirect to the parent frame

    hi all,

    i have this code to redirect the browser to the parent frame page incase a child frame page is being accessed.

    Code:
    <script language="javascript">
    	if(self.location==top.location)self.location="index.htm?page005.htm";
    </script>
    in the index/parent frame, the code is:
    Code:
    <script language="javascript">
    	var fname="MyFrm";     //MAIN CONTENT AREA FRAME **NAME**
    
    	window.onload=function(){
    	var d=document.location.search;
    	if(d!='')top.frames[fname].document.location.href=d.substring(d.lastIndexOf('?')+1,d.length);
    	}
    </script>
    It works fine in Opera browser, but in IE and Firefox, it just displays the main/default frame in index, but it doesn't displays a specific/or other child/page.

    anyone has the idea?
    thanks!
    happy is the man that finds wisdom....wisdom in {PHP}.


  2. #2
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any one? please...
    happy is the man that finds wisdom....wisdom in {PHP}.


  3. #3
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im waiting for an answer..

    any javascript gurus here?...

    thanks!
    happy is the man that finds wisdom....wisdom in {PHP}.


  4. #4
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hellooo...is there anyone can help me?...

    thanks!
    happy is the man that finds wisdom....wisdom in {PHP}.


  5. #5
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there's no javascript guru here?? anyway, thanks, i already solved it.
    happy is the man that finds wisdom....wisdom in {PHP}.



Bookmarks

Posting Permissions

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