SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2002
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to load a frameset and set frame content using 'top.location.href' ??

    Hi All

    I have a drop down list box that enables users to jump to different pages on my site. Problem is some of the list box options loads a frameset in which the frame content is different depending on what list option was selected. I am using 'top.location.href' to load the frameset. For example 'top.location.href = ./test/test_set.html'.

    How can I load 'content1.html' inside a frame called 'mainFrame' within this frame set using the 'top.location.href' property? If not, any suggestion on how I could achieve the effect I am after?

    Regards, Ben
    Experience is that thing which lets you know you've made the same mistake yet again.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This what you're after?

    top.frames['mainFrame'].location.href = 'content1.html';
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    why use frames?

    I have just spent the last month renewing my website as it used to use frames.
    If you use frames Google, and many other search engines, have trouble finding your pages.

    I used to use frames so that I can play 2 sounds simultaneously, but now most browsers allow that to happen.

    I suggest using dhtml with an external .js file with the common content of your pages. This .js will be called every time a file requests it, and will place the common content.

    use...
    x=a number, y=another number, z=layer number
    document.write('<html>','<img id="name" style="position:absolute; top:'+y+'; left:'+x+'; z-index:'+z+'" src="bannerbackground.gif" width=800 heigth=150 onmouseover="javascript:jsfunction">')

    Content can be placed by javascript, multiple sounds can be played simultaneously, so if you are putting effort learning to program, I would advise you not to put that effort into using frames.

    If you have IE(currently being made cross browser), check my website UnitingRhythms .this will show what I mean.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's wrong with frames? There are pros and cons to using them and not using them, but non-frame sites aren't empiricially better. Besides, I consider a bigger no-no to rely on javascript for content delivery
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: why use frames?

    Originally posted by Markdidj
    I have just spent the last month renewing my website as it used to use frames.
    If you use frames Google, and many other search engines, have trouble finding your pages.
    Yes, but don't forget that the googlebot ignores javascript too - so google will not index any content that is generated by your javascript.

  6. #6
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: why use frames?

    Originally posted by Markdidj
    I have just spent the last month renewing my website as it used to use frames.
    If you use frames Google, and many other search engines, have trouble finding your pages.
    Fallacy, Urban Legend, Old Wive's Tale. Whatever title you'd prefer, that just isn't true.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  7. #7
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    cheers freaky...i didn't know that....

    No going back now!! the frames are long gone(bit of a shame as it was easier to hold info) Learnt alot in the process.

    Will google still index a page if the info is in the metadescription? Even when most of the page is written in js.

    also, my links are created using js arrays and loops as well, is there a away of adding URL's included in site in the meta-data.

    Thanks
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  8. #8
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Nope, Doesn't look like it

    Looks like its more 'payed for' advertising for me!!
    My program is relying on javascript heavily.

    With one word and another descriptive sentance I set up with javascript....

    button.gif,
    buttonOver.gif,
    buttonOut.gif,
    area map,
    area shape,
    area size,
    mouseover,
    mouseout,
    newdescription,
    page to goto,

    It works for any number of buttons up to 10

    If I don't use javascript, that's a hell of alot of programming.

    Thanks for your help anyway guys.....
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  9. #9
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    cross browser image blur...

    I make didjeridoo's and I want to offer a page to the user in which he/she can design an image to go on the didj using an animated blowtorch.

    When you burn bamboo it burns with a fuzzy edge, so I want to imitate this on an image of a black dot 7x7 pixels, which can be moved around the screen. I could do it for IE, but not cross browser.

    Anyone know of a blur filter that works cross browser
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •