changing image without scripts?

Discussion in 'HTML' started by Marc Waesche, Feb 6, 2004.

  1. Marc Waesche

    Marc Waesche Guest

    Hello!

    Is it possible to change out an image on a website with a mouse click
    without using any scripts like javascript, css or else?

    Best regards,
    Marc
    Marc Waesche, Feb 6, 2004
    #1
    1. Advertising

  2. Marc Waesche

    Chris Morris Guest

    "Marc Waesche" <> writes:
    > Is it possible to change out an image on a website with a mouse click
    > without using any scripts like javascript, css or else?


    <a href="file_with_different_image.html">Change Image</a>

    And CSS isn't a scripting language.

    --
    Chris
    Chris Morris, Feb 6, 2004
    #2
    1. Advertising

  3. Chris Morris wrote:
    > "Marc Waesche" <> writes:
    >
    >>Is it possible to change out an image on a website with a mouse click
    >>without using any scripts like javascript, css or else?

    >
    >
    > <a href="file_with_different_image.html">Change Image</a>
    >
    > And CSS isn't a scripting language.


    Perhaps he was thinking of cross-site scripting ;-)


    Matthias
    Matthias Gutfeldt, Feb 6, 2004
    #3
  4. Marc Waesche

    Marc Waesche Guest

    Hi Chris!

    You are right! CSS is no scripting language. Sorry. So a CSS solution would
    be okay too.
    Your idea is nice but I don´t want to refresh the website. The second image
    must be loaded already but invisible. It should replace the first image by a
    click on a link, button or else.

    Best regards,
    Marc


    "Chris Morris" <> schrieb im Newsbeitrag
    news:...
    > "Marc Waesche" <> writes:
    > > Is it possible to change out an image on a website with a mouse click
    > > without using any scripts like javascript, css or else?

    >
    > <a href="file_with_different_image.html">Change Image</a>
    >
    > And CSS isn't a scripting language.
    >
    > --
    > Chris
    Marc Waesche, Feb 6, 2004
    #4
  5. Marc Waesche

    Paul Furman Guest

    You could do it with frames or load an otherwise identical page.

    Marc Waesche wrote:

    > Hello!
    >
    > Is it possible to change out an image on a website with a mouse click
    > without using any scripts like javascript, css or else?
    >
    > Best regards,
    > Marc
    >
    >
    Paul Furman, Feb 6, 2004
    #5
  6. Marc Waesche

    Chris Morris Guest

    "Marc Waesche" <> writes:
    > You are right! CSS is no scripting language. Sorry. So a CSS solution would
    > be okay too.
    > Your idea is nice but I don´t want to refresh the website. The second image
    > must be loaded already but invisible. It should replace the first image by a
    > click on a link, button or else.


    Don't think that's possible without scripting of some sort. Certainly
    not if you want the second image to stay there after the click ends.

    If you just want the image to change when clicked on, then
    http://www.dur.ac.uk/c.i.morris/imagechange.html
    or
    http://www.dur.ac.uk/c.i.morris/imagechange2.html
    though I can't see many practical uses for this.

    (Only tested in Mozilla - if it doesn't work in anything else I won't
    be surprised. Especially the second one.)

    If it's essential that the second image be displayed, then even CSS is
    a risky solution, and <a href="page_of_other_image">...</a> is
    probably the best solution.

    --
    Chris
    Chris Morris, Feb 6, 2004
    #6
  7. Marc Waesche

    Marc Waesche Guest

    Hi Paul!

    Sounds cool! How would that work with frames? I know of cause what frames
    are and how they work but do you have a code or a website where I could
    check that?

    Best regards,
    Marc


    P.S.: This is a cool newsgroup! So many nice answers in so short time! :)




    "Paul Furman" <> schrieb im Newsbeitrag
    news:...
    > You could do it with frames or load an otherwise identical page.
    >
    > Marc Waesche wrote:
    >
    > > Hello!
    > >
    > > Is it possible to change out an image on a website with a mouse click
    > > without using any scripts like javascript, css or else?
    > >
    > > Best regards,
    > > Marc
    > >
    > >

    >
    Marc Waesche, Feb 6, 2004
    #7
  8. Marc Waesche

    Marc Waesche Guest

    Hi Chris!

    Thank you, I will check that out today.
    My idea was that both images are in the website after each other. But the
    size of the second is set to 0x0 pixels. Then, if the user click on a
    (css-)link the first image´s size is set to 0x0 and the size of the second
    is enlarged to the full size. For the user it looks like a real image
    changing.

    By the way: I do not want to use scripts because it is not really for a
    website. The code should be included into html mails. And some mail clients
    don´t like scripts as you know for sure.

    Best regards,
    Marc



    "Chris Morris" <> schrieb im Newsbeitrag
    news:...
    > "Marc Waesche" <> writes:
    > > You are right! CSS is no scripting language. Sorry. So a CSS solution

    would
    > > be okay too.
    > > Your idea is nice but I don´t want to refresh the website. The second

    image
    > > must be loaded already but invisible. It should replace the first image

    by a
    > > click on a link, button or else.

    >
    > Don't think that's possible without scripting of some sort. Certainly
    > not if you want the second image to stay there after the click ends.
    >
    > If you just want the image to change when clicked on, then
    > http://www.dur.ac.uk/c.i.morris/imagechange.html
    > or
    > http://www.dur.ac.uk/c.i.morris/imagechange2.html
    > though I can't see many practical uses for this.
    >
    > (Only tested in Mozilla - if it doesn't work in anything else I won't
    > be surprised. Especially the second one.)
    >
    > If it's essential that the second image be displayed, then even CSS is
    > a risky solution, and <a href="page_of_other_image">...</a> is
    > probably the best solution.
    >
    > --
    > Chris
    Marc Waesche, Feb 6, 2004
    #8
  9. Marc Waesche

    Chris Morris Guest

    "Marc Waesche" <> writes:
    > Sounds cool! How would that work with frames? I know of cause what frames
    > are and how they work but do you have a code or a website where I could
    > check that?


    Try to avoid using frames for this.
    http://www.html-faq.com/htmlframes/?framesareevil

    --
    Chris
    Chris Morris, Feb 6, 2004
    #9
  10. Marc Waesche

    Chris Morris Guest

    "Marc Waesche" <> writes:
    > By the way: I do not want to use scripts because it is not really for a
    > website. The code should be included into html mails. And some mail clients
    > don´t like scripts as you know for sure.


    Many mail clients don't like HTML or CSS either (mine copes with HTML
    [1] but not CSS).

    [1] Since well over 99% of the HTML mail I get is spam, it gets
    filtered into a folder, and then usually deleted unread. I know I'm
    not the only person to take this approach.

    --
    Chris
    Chris Morris, Feb 6, 2004
    #10
  11. Marc Waesche wrote:
    > Hello!
    >
    > Is it possible to change out an image on a website with a mouse click
    > without using any scripts like javascript, css or else?
    >
    > Best regards,
    > Marc
    >
    >



    If you use an image roll over, it would work, but that does require
    scripting. Do you mean something like the menu at www.dancingborg.co.uk?
    Weyoun the Dancing Borg, Feb 6, 2004
    #11
  12. Marc Waesche

    Marc Waesche Guest

    Ah, you promote your own website! ;-)
    Yes, that´s kind of what I am looking for. But as you said: It´s using
    scripts. :)

    Best regards,
    Marc
    Marc Waesche, Feb 6, 2004
    #12
  13. "Marc Waesche" <> skrev i melding
    news:c006cb$lqo$04$-online.com...
    > "Chris Morris" <> schrieb im Newsbeitrag
    > news:...
    > > "Marc Waesche" <> writes:
    > > > Is it possible to change out an image on a website with a mouse click
    > > > without using any scripts like javascript, css or else?

    > >
    > > <a href="file_with_different_image.html">Change Image</a>
    > >
    > > And CSS isn't a scripting language.

    >
    > You are right! CSS is no scripting language. Sorry. So a CSS solution

    would
    > be okay too.
    > Your idea is nice but I don´t want to refresh the website. The second

    image
    > must be loaded already but invisible. It should replace the first image by

    a
    > click on a link, button or else.


    <iframe>, maybe?
    http://www.w3schools.com/tags/tag_iframe.asp

    *starts twitching*

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
    Kim André Akerø, Feb 6, 2004
    #13
  14. On Fri, 06 Feb 2004 14:45:36 +0000, Chris Morris wrote:

    > "Marc Waesche" <> writes:
    >> By the way: I do not want to use scripts because it is not really for a
    >> website. The code should be included into html mails. And some mail clients
    >> don´t like scripts as you know for sure.

    >
    > Many mail clients don't like HTML or CSS either (mine copes with HTML
    > [1] but not CSS).
    >
    > [1] Since well over 99% of the HTML mail I get is spam, it gets
    > filtered into a folder, and then usually deleted unread. I know I'm
    > not the only person to take this approach.


    Aye!

    --
    -------------------------
    | Jeffrey Silverman |
    | jeffrey-AT-jhu-DOT-edu|
    -------------------------
    Jeffrey Silverman, Feb 6, 2004
    #14
  15. Marc Waesche wrote:

    > Ah, you promote your own website! ;-)
    > Yes, that´s kind of what I am looking for. But as you said: It´s using
    > scripts. :)
    >
    > Best regards,
    > Marc


    yeah the only other way would be throughsome very fancy CSS but I am
    unsure if images could be used.

    Here's an example a friend of mine made:

    http://corp.altwood.co.uk/adp/

    (the menus)

    sorry about the drug references, I cant help it lol :)
    Weyoun the Dancing Borg, Feb 17, 2004
    #15
  16. Marc Waesche

    Whitecrest Guest

    Whitecrest, Feb 17, 2004
    #16
  17. Weyoun the Dancing Borg, Feb 17, 2004
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jan Danielsson
    Replies:
    8
    Views:
    613
    Mike Meyer
    Jul 22, 2005
  2. Jp Calderone
    Replies:
    0
    Views:
    445
    Jp Calderone
    Jul 21, 2005
  3. Aaron Beall
    Replies:
    2
    Views:
    1,777
    Aaron Beall
    Sep 14, 2007
  4. davidj411
    Replies:
    0
    Views:
    483
    davidj411
    Jun 27, 2008
  5. Replies:
    13
    Views:
    516
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page