swap html code...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Monopole

    swap html code...

    we are all familiar with the swap image trick of dhtml...what if I want to
    swap html code?
    say I have a <span></span>
    and I want its content to change whenever user click on something...wit hout
    refreshing...ho w do I do that?


  • Jacqui or (maybe) Pete

    #2
    Re: swap html code...

    In article <rgxMa.21573$C8 3.2048425@newsr ead1.prod.itd.e arthlink.net>,
    mathfield@hotma il.com says...[color=blue]
    > we are all familiar with the swap image trick of dhtml...what if I want to
    > swap html code?
    > say I have a <span></span>
    > and I want its content to change whenever user click on something...wit hout
    > refreshing...ho w do I do that?
    >[/color]
    Here's a simple approach: http://porjes.com/hide3.html


    Comment

    • Stan Brown

      #3
      Re: swap html code...

      In article <MPG.196d0e3cf6 3c7d71989bd0@ne ws.CIS.DFN.DE> in
      comp.infosystem s.www.authoring.html, Jacqui or (maybe) Pete
      <porjes@spamcop .net> wrote:[color=blue]
      >In article <rgxMa.21573$C8 3.2048425@newsr ead1.prod.itd.e arthlink.net>,
      >mathfield@hotm ail.com says...[color=green]
      >> we are all familiar with the swap image trick of dhtml...what if I want to
      >> swap html code?
      >> say I have a <span></span>
      >> and I want its content to change whenever user click on something...wit hout
      >> refreshing...ho w do I do that?
      >>[/color]
      >Here's a simple approach: http://porjes.com/hide3.html[/color]

      ???

      Maybe I'm missing something, but to me in Mozilla 1.2 it looks like
      all static text. All that happens when I click on any of the four
      links is that the page moves so that the referenced section is at
      the top of the window.

      --
      Stan Brown, Oak Road Systems, Cortland County, New York, USA

      HTML 4.01 spec: http://www.w3.org/TR/html401/
      validator: http://validator.w3.org/
      CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
      validator: http://jigsaw.w3.org/css-validator/

      Comment

      • Jacqui or (maybe) Pete

        #4
        Re: swap html code...

        In article <MPG.196cd4faa4 bcc64598ae9a@ne ws.odyssey.net> ,
        the_stan_brown@ fastmail.fm says...[color=blue]
        > In article <MPG.196d0e3cf6 3c7d71989bd0@ne ws.CIS.DFN.DE> in
        > comp.infosystem s.www.authoring.html, Jacqui or (maybe) Pete
        > <porjes@spamcop .net> wrote:[color=green]
        > >In article <rgxMa.21573$C8 3.2048425@newsr ead1.prod.itd.e arthlink.net>,
        > >mathfield@hotm ail.com says...[color=darkred]
        > >> we are all familiar with the swap image trick of dhtml...what if I want to
        > >> swap html code?
        > >> say I have a <span></span>
        > >> and I want its content to change whenever user click on something...wit hout
        > >> refreshing...ho w do I do that?
        > >>[/color]
        > >Here's a simple approach: http://porjes.com/hide3.html[/color]
        >[/color]
        ....[color=blue]
        > Maybe I'm missing something, but to me in Mozilla 1.2 it looks like
        > all static text. All that happens when I click on any of the four
        > links is that the page moves so that the referenced section is at
        > the top of the window.
        >[/color]
        That's the design behaviour when javascript's turned off, or where the
        browser doesn't support the js I've used.

        I'd be interested to know which is happening with you.

        It should also degrade nicely without css, and/or in a text-only
        browser.

        Comment

        • Mark Parnell

          #5
          Re: swap html code...

          Matthew Monopole wrote:[color=blue]
          > we are all familiar with the swap image trick of dhtml...what if I
          > want to swap html code?
          > say I have a <span></span>
          > and I want its content to change whenever user click on
          > something...wit hout refreshing...ho w do I do that?[/color]

          brucie created this for someone in alt.html:


          Source code:


          It is designed for images, but could probably be modified to suit. And no
          JavaScript in sight!

          --

          Mark Parnell



          Comment

          Working...