Calendar

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

    Calendar



    Not quite ready yet: dates from the previous month missing, and it's also in
    darn need for cosmetic improvement. But the latter is CSS.
    The buttons work alright, but I'd like to replace them with images. I tested
    it with the arrow image, which performs the same action as the "today"
    button. In Firefox the button switches smoothly between months, but when I
    click the image the div first goes blank before it is rewritten. This
    doesn't happen in IE.
    Can I make the image link work exactly like the button? (Please don't tell
    me to switch back to IE!)
    TIA

    Steven


  • Lee

    #2
    Re: Calendar

    steven said:[color=blue]
    >
    >http://www.nenya.be/41227-1/cal.htm
    >
    >Not quite ready yet: dates from the previous month missing, and it's also in
    >darn need for cosmetic improvement. But the latter is CSS.
    >The buttons work alright, but I'd like to replace them with images. I tested
    >it with the arrow image, which performs the same action as the "today"
    >button. In Firefox the button switches smoothly between months, but when I
    >click the image the div first goes blank before it is rewritten. This
    >doesn't happen in IE.
    >Can I make the image link work exactly like the button? (Please don't tell
    >me to switch back to IE!)
    >TIA[/color]

    I believe the FAQ cautions against using the "javascript :" pseudo-protocol.
    Change your link to the following:

    <a href="#" onclick="GetNow (); ChD(0); UpD(); DropCal();retur n false"><img
    src="cal_files/arrow-s.gif"></a>

    Comment

    • steven

      #3
      Re: Calendar

      "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
      news:cqrj45026h @drn.newsguy.co m...[color=blue]
      > steven said:[color=green]
      > >
      > >http://www.nenya.be/41227-1/cal.htm
      > >
      > >Not quite ready yet: dates from the previous month missing, and it's also[/color][/color]
      in[color=blue][color=green]
      > >darn need for cosmetic improvement. But the latter is CSS.
      > >The buttons work alright, but I'd like to replace them with images. I[/color][/color]
      tested[color=blue][color=green]
      > >it with the arrow image, which performs the same action as the "today"
      > >button. In Firefox the button switches smoothly between months, but when[/color][/color]
      I[color=blue][color=green]
      > >click the image the div first goes blank before it is rewritten. This
      > >doesn't happen in IE.
      > >Can I make the image link work exactly like the button? (Please don't[/color][/color]
      tell[color=blue][color=green]
      > >me to switch back to IE!)
      > >TIA[/color]
      >
      > I believe the FAQ cautions against using the "javascript :"[/color]
      pseudo-protocol.[color=blue]
      > Change your link to the following:
      >
      > <a href="#" onclick="GetNow (); ChD(0); UpD(); DropCal();retur n false"><img
      > src="cal_files/arrow-s.gif"></a>[/color]

      I'm a bit confused here: the OnClick actions are Javascript functions,
      right?
      Anyway, it solved my problem, thanks.

      Steven


      Comment

      • Lee

        #4
        Re: Calendar

        steven said:[color=blue]
        >
        >"Lee" <REM0VElbspamtr ap@cox.net> wrote in message[/color]
        [color=blue][color=green]
        >> I believe the FAQ cautions against using the "javascript :"[/color]
        >pseudo-protocol.[color=green]
        >> Change your link to the following:
        >>
        >> <a href="#" onclick="GetNow (); ChD(0); UpD(); DropCal();retur n false"><img
        >> src="cal_files/arrow-s.gif"></a>[/color]
        >
        >I'm a bit confused here: the OnClick actions are Javascript functions,
        >right?[/color]

        Yes, but that's not the same as using the javascript: pseudo-protocol as you
        were doing:

        <a href="javascrip t:GetNow(); ..."

        The primary purpose of a link is to load new content in the page (hence the
        flash) and the javascript: flavor is intended to replace the current page
        content with the *value* returned by the javascript expression.

        By moving the javascript into the onclick handler and having that handler return
        false, you cancel the "load new content" action, avoiding the flash.

        Comment

        • steven

          #5
          Re: Calendar

          "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
          news:cqroq60jfh @drn.newsguy.co m...[color=blue]
          > steven said:[color=green]
          > >
          > >"Lee" <REM0VElbspamtr ap@cox.net> wrote in message[/color]
          >[color=green][color=darkred]
          > >> I believe the FAQ cautions against using the "javascript :"[/color]
          > >pseudo-protocol.[color=darkred]
          > >> Change your link to the following:
          > >>
          > >> <a href="#" onclick="GetNow (); ChD(0); UpD(); DropCal();retur n[/color][/color][/color]
          false"><img[color=blue][color=green][color=darkred]
          > >> src="cal_files/arrow-s.gif"></a>[/color]
          > >
          > >I'm a bit confused here: the OnClick actions are Javascript functions,
          > >right?[/color]
          >
          > Yes, but that's not the same as using the javascript: pseudo-protocol as[/color]
          you[color=blue]
          > were doing:
          >
          > <a href="javascrip t:GetNow(); ..."
          >
          > The primary purpose of a link is to load new content in the page (hence[/color]
          the[color=blue]
          > flash) and the javascript: flavor is intended to replace the current page
          > content with the *value* returned by the javascript expression.
          >
          > By moving the javascript into the onclick handler and having that handler[/color]
          return[color=blue]
          > false, you cancel the "load new content" action, avoiding the flash.
          >[/color]

          OK, got it. Thanks again.
          Steven


          Comment

          Working...