SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot simplyunique's Avatar
    Join Date
    Jun 2003
    Location
    Montreal
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I've got 'content' defined, how do i pass it with a window?

    This is the script I want edited
    Code:
    if (top.location == self.location) {	//if page is called out of its frameset
    	  top.location.href = "index2.htm" + "?" + window.location.href; 
    	}
    My "content" is defined and is dynamically contained within an iframe in a javascript in a js file. It has a default "content" page.

    "content" is the body of my website.

    I want to pass my "content" to index2.htm along with window.location.href

    Please modify this tag. Thanks
    Fonkuscious say: Sink a foot in into my code and stub your toe

  2. #2
    SitePoint Zealot simplyunique's Avatar
    Join Date
    Jun 2003
    Location
    Montreal
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fonkuscious say: Sink a foot in into my code and stub your toe

  3. #3
    SitePoint Zealot simplyunique's Avatar
    Join Date
    Jun 2003
    Location
    Montreal
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's a sad thing the number of questons ive asked here and didnt get any help with..
    Fonkuscious say: Sink a foot in into my code and stub your toe

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    1) your first post is somewhat confusing -- you want to append somefile.js to an iframe within index2.html?


    2) why don't you simply include the *.js file (<script language=...src="somename.js"> in index2.html so that you don't need to change the redirection script?

    3) are both files within the same domain? if not, you will probably need to get signatures/permission

    To paraphrase:
    'tis a sad thing the number of questons i've answered here and didnt get paid for..

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  5. #5
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think you can use this with your original script, which must go in index2.htm;
    Code:
    framePage=top.location.href.split("?" )[1];
    document.myFrame.href=""framePage
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  6. #6
    SitePoint Zealot simplyunique's Avatar
    Join Date
    Jun 2003
    Location
    Montreal
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, I've got a frameset and in the mainframe ive got an iframe.

    My pages all sit in the iframe and have an iframe stuffer script to keep them from becoming orphans.

    That looks kinda like it will work.. wanna explain it a bit more:
    framePage=top.location.href.split("?" )[1];document.myFrame.href=""framePage
    Fonkuscious say: Sink a foot in into my code and stub your toe


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
  •