Results 1 to 10 of 10

Thread: Two Javascript codes needed.

  1. #1
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two Javascript codes needed.

    I need a code that will keep certain bits of html at the VERY bottom of the page, even if the viewer scrolls down. Kinda like the windows xp menu bar.

    I also need a script that can drag pictures around the screen but when you drag it it doesn't click the link they go to, you have to double click to go to that link.

    Thanks alot

    If you need any more info just ask

    ~Simie

  2. #2
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    bump

    Can anyone do this?

  3. #3
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bump
    I really need this

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    If you absolutely need it at the bottom of the screen, then why not just use a frame? Make it a few pixels high, let the rest of it scroll.... yeah.
    Or you could use a <div> to hold everything else above it, and set that so that so you have it scrolling if it's bigger than the space given. (Do divs even work with height settings? Haven't tried that much, but I think it might not work well. Or maybe use a table or something if that fails.) Then just put whatever you want after the </div> tag, and that would stay at the bottom, or at least after the scrolling div... you'd just need to be sure to set the heights corrently.
    (probably use pixels for the bottom and percent for the upper one. Or, rather, set the whole thing to 100% somehow, then set the bottom to pixels, and the upper part would fill the remaining space. ...should work, anyway. Might be complex to set up like that, though.)

    You can also use layers, but that would cause it to overlap with the content under it.
    For example:
    HTML Code:
    <div style="z-index:1">put your stuff here, bottom align it in a table, div, or something, and put the rest of the content as you would normally on a page. the z index... height will put this on top of the rest. I think that 1 means above... but you might want 2... haven't done that in a while.</div>

    As for the dragging thing, look at the scripts here, find one that does what you want:
    then.. remove the stuff you don't like, such as the code that makes it clickable, or whatever.
    but, since you want it to work on double click, just replace onClick with onDblClick. look that up to be sure it's right, but I think I saw that yesterday when I was looking for something else.

    Hope this helps.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks alot I'll be testing some of these ideas.

    Thanks

    ~Simie

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Sure.

    Also, a much more complex way to code the first thing (though maybe a better result in the end) would be to code javascript that dynamically positions something at the bottom. But that would of course be hard, and come with it's own set of problems.

    Also, i just realized... for the layer thing, you coul have the content below it without an issue. Just give the upper layer (for the part on which there is content) a background, and that should cover content below it.

    Be sure to give enough white space at the bottom of your underneath page so that there isn't any content permanently hidden under the top layer.


    ...and, the more I think about it, this might not work. It would work at the start, but once you scroll, the top layer would likely scroll with the bottom one. Don't know if there's a way around that or not.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can also use layers, but that would cause it to overlap with the content under it.
    Layers are obsolete, and should never be used.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    So... frames, then, Twey?

    Or tables/divs?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Divs are the best option here.
    The <layer> tag went out with Netscape 4 or something, didn't it? Before I got into web design, anyway.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well... I didn't mean the layer tag, but using divs on top of one another... layers of divs.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •