Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: need a few scripts

  1. #1
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need a few scripts

    1. I need a script for linking images to iframe source.


    2. I need the script for links that when your mouse isnt on them the image is faded, and when you put your mouse over it, it unfades.

    3. I need a script that removes the underline from link and takes out the purple link after you have clicked it.


    I need help with 1. 2.
    the most, i looked everywhere, you guys are my last hope ! :{

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

    Default

    1. I don't understand what you mean.
    Using target="framename" in the <a...> tag will set it to go to the iframe.

    2. Use the hover state in CSS.
    a {
    color: #FFFFFF;
    }
    a.hover {
    color: #CCCCCC;
    }

    Something like that.

    3. That's "visited" links. Set that with CSS, or even in the body tag:
    <body .... visited="#FFFFFF"> [white]
    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

  3. #3
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    how to link and target an image to an iframe

    the link of the image or button needs to make it so that when u push it,that image directs the iframe to put that page/link from the button into the iframe

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    If that's the case, then the following code should work fine:

    Code:
    <a href="your_link_here.html" target="framename_here"><img src="image.png" style="border: 0px;"></a>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thankyou!
    and i still need a script on fade/unfade thing, the thing the guy posted above isnt what i exactly want, and i can't really find an example ._.

    basicly, i want my links to be "faded"
    and then when i have my mouse go over them they "unfade"

    anyone understand / have a script? >_<

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

    Default

    Yes, it is what you want. Using the hover state on a link will allow you to change the color, ie, fade it.

    When the mouse it over, it will be a different color than the normal links on the page. Using a brighter color on hover will make it "fade in".

    It's vastly simpler than doing it by javascript, though I suppose you could set the visibility to 50%, then use onMouseover to set the visibility of the element to 100%, and onMouseout back to 50%.

    However, actually having any movement (ie a change to brighter) would be much more complex and I think excessive.

    95% of the sites you have seen with something like this use the CSS method. It's easy and compatible with almost every browser, and works for all users even those with javascript disabled.
    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
    Nov 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ah, i see, but can you give me a full script, like the other guy did? and where to put it?

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    He already did in his first post. You can place it in either a css file, or in between style tags in the head of your document. Example:

    Code:
    ...
     <head>
       <style type="text/css">
          a { color: #FFFFFF; } /* change to white */
          a.hover {color: #CCCCCC; } /* change to dark gray */
       </style>
     </head>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry i kind of didn't explain myself correctly my mistake,i want the code for like this example,the same thing like the white fade or whatever,but for an image so could you give me a full script like for an image thats a link that does that?,Thanks,Sorry for all the questions i'm new.

    for instance this will be my image with the link <a href="your_link_here.html" target="framename_here"><img src="image.png" style="border: 0px;"></a>


    and i want that to have the fade thing
    but i dont want all links on the site to have the fade
    just the ones i choose

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

    Default

    Ok, an image is very different than text. It seemed you were asking two separate questions.

    There are two ways to go about this:

    1. Set the opacity of the image to 50% at the start, onMouseover switch it to 100, then back to 50 onMouseout, using javascript. [Would allow interaction with whatever is behind it on the page, but you'd need to write this yourself.]

    2. Use one of the many available rollover/mouseover image switchers, and create two images-- the bright one and the dim one, then switch accordingly. [Easy, and google will bring up many, many scripts.]

    Note that the CSS hover state is used only for links, and though it has been suggested for use in other situations, but doesn't work in all browsers like that, so it's only a nice trick with <a> tags. Won't help in this case.
    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
  •