Safari (Mac) issue

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

    Safari (Mac) issue

    document.getEle mentById("TextB ox1").setAttrib ute("value","mm/dd/yyyy")

    works in Internet Explorer (Windows) but not in Safari (Mac). How can I
    insert a string into a textbox in the Safari browser?

  • Martin Honnen

    #2
    Re: Safari (Mac) issue



    Marcia Gulesian wrote:
    [color=blue]
    > document.getEle mentById("TextB ox1").setAttrib ute("value","mm/dd/yyyy")
    >
    > works in Internet Explorer (Windows) but not in Safari (Mac). How can I
    > insert a string into a textbox in the Safari browser?[/color]

    You should set the value property and not change the attribute:
    document.getEle mentById("TextB ox1").value = ...
    see


    --

    Martin Honnen


    Comment

    • Marcia Gulesian

      #3
      Re: Safari (Mac) issue

      That did it. Thanks!

      Martin Honnen wrote:
      [color=blue]
      > Marcia Gulesian wrote:
      >[color=green]
      > > document.getEle mentById("TextB ox1").setAttrib ute("value","mm/dd/yyyy")
      > >
      > > works in Internet Explorer (Windows) but not in Safari (Mac). How can I
      > > insert a string into a textbox in the Safari browser?[/color]
      >
      > You should set the value property and not change the attribute:
      > document.getEle mentById("TextB ox1").value = ...
      > see
      > http://www.w3.org/TR/DOM-Level-2-HTM...ml#ID-49531485
      >
      > --
      >
      > Martin Honnen
      > http://JavaScript.FAQTs.com/[/color]

      Comment

      • Lāʻie Techie

        #4
        Re: Safari (Mac) issue

        On Sat, 17 Jul 2004 09:57:01 -0400, Marcia Gulesian wrote:
        [color=blue]
        > document.getEle mentById("TextB ox1").setAttrib ute("value","mm/dd/yyyy")
        >
        > works in Internet Explorer (Windows) but not in Safari (Mac). How can I
        > insert a string into a textbox in the Safari browser?[/color]

        document.getEle mentById("TextB ox1").value="m m/dd/yyyy";

        HTH,
        La'ie Techie

        Comment

        Working...