Loading ...
Sorry, an error occurred while loading the content.

forms and textareas

Expand Messages
  • Henny Shafiq
    Hello, I hope someone can give me a pointer what I can do with this idea: I have a form, title is what is your favorite food , on it are 5 radiobuttons, which
    Message 1 of 3 , Jul 9, 2000
    • 0 Attachment
      Hello, I hope someone can give me a pointer what I can do with this
      idea:
      I have a form, title is 'what is your favorite food', on it are 5
      radiobuttons, which are 4 choices and a fifth is 'other...', now I
      want to
      make it like so that when a user clicks on 'other', a textarea will
      spring
      up under it in which the user can give his/her preferences.... but
      originally when the page loads the textarea will not be there....
      hope I
      made myself clear with this;-) and that anyone can tell me what to
      do, have
      tried many things and didn't work
      Thanks
      Henny
    • Henny Shafiq
      Hello, I hope someone can give me a pointer what I can do with this idea: I have a form, title is what is your favorite food , on it are 5 radiobuttons, which
      Message 2 of 3 , Jul 9, 2000
      • 0 Attachment
        Hello, I hope someone can give me a pointer what I can do with this
        idea:
        I have a form, title is 'what is your favorite food', on it are 5
        radiobuttons, which are 4 choices and a fifth is 'other...', now I
        want to
        make it like so that when a user clicks on 'other', a textarea will
        spring
        up under it in which the user can give his/her preferences.... but
        originally when the page loads the textarea will not be there....
        hope I
        made myself clear with this;-) and that anyone can tell me what to
        do, have
        tried many things and didn't work
        Thanks
        Henny
      • Don Arnett
        Sorry for such a late reply, but just got back from vacation. I suspect that this cannot be done. Although I m far from a JavaScript expert, I haven t seen
        Message 3 of 3 , Jul 21, 2000
        • 0 Attachment
          Sorry for such a late reply, but just got back from vacation.

          I suspect that this cannot be done. Although I'm far from a JavaScript
          expert, I haven't seen anything that works the way you describe.

          I have a similiar situation and I handle it by always displaying the text
          area and turning it's 'writability' on and off. Basically, when the select
          box is changed, if it changes to "other", then make the text area writable,
          if not "other" then make it not writeable.

          In IE, the text area contains a "readonly" attribute. I'd guess that you'd
          just set it to "true" or "false".

          In Netscape, there is no "readonly" attribute. I handle this using the
          'onfocus' event. When someone tries to set focus to my text area and I
          don't want them to, I immediately shift the focus somewhere else. I can
          give some code for this if you'd like.

          I know that this isn't what you were looking for, but it's the way I handle
          a similiar situation.
          Hopefully this makes sense also, as I'm still feeling groggy from my trip.


          -----Original Message-----
          From: Henny Shafiq [mailto:mshafiq@...]
          Sent: Sunday, July 09, 2000 5:25 AM
          To: 123javascripts@egroups.com
          Subject: [123javascripts] forms and textareas


          Hello, I hope someone can give me a pointer what I can do with this
          idea:
          I have a form, title is 'what is your favorite food', on it are 5
          radiobuttons, which are 4 choices and a fifth is 'other...', now I
          want to
          make it like so that when a user clicks on 'other', a textarea will
          spring
          up under it in which the user can give his/her preferences.... but
          originally when the page loads the textarea will not be there....
          hope I
          made myself clear with this;-) and that anyone can tell me what to
          do, have
          tried many things and didn't work
          Thanks
          Henny



          ------------------------------------------------------------------------
          Find long lost high school friends:
          http://click.egroups.com/1/5535/6/_/686322/_/963139204/
          ------------------------------------------------------------------------

          ~~~~~~~~~~~~~~~~~ Java Script Site ~~~~~~~~~~~~~~~~~
          http://www.javascriptsite.com/
          ~~~~~~~~~~~~~~~~~ Java Script Site ~~~~~~~~~~~~~~~~~

          Thanks for being subscribed to our community mailing
          list. Help make this mailing list active, by sending
          your questions, comments, tips, and tricks to
          123javascripts@onelist.com

          ~~~~~~~~~~~~~~~~~ Java Script Site ~~~~~~~~~~~~~~~~~
          http://www.javascriptsite.com/
          ~~~~~~~~~~~~~~~~~ Java Script Site ~~~~~~~~~~~~~~~~~
        Your message has been successfully submitted and would be delivered to recipients shortly.