onblur no longer works right

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Boofo
    Senior Member
    • Apr 2002
    • 2033
    • 4.1.x

    onblur no longer works right

    What changed in 4.1.0 from 4.0.6 that caused my onblur to not work anymore?
    vBulletin - Sometimes, I'm just like, Wow, and then I'm like, Whoa, and then I'm like, Damn.

    vBulletin.org's ol' Moderator

    I have a lifetime terrorist hunting permit - #091101

    chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73464
    • 6.0.X

    #2
    What is your onblur event and what is the error shown in your Javascript console?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • Boofo
      Senior Member
      • Apr 2002
      • 2033
      • 4.1.x

      #3
      It doesn't show an error, it just doesn't work in 4.1.0 PL2, but it did in 4.0.6. When you click outside the box/text area, it should put the original value back if the box is blank. It worked fine until I upgraded. Did some javascript change somewhere that would affect things like this?

      Here is what I am using:

      <input type="text" name="amount" size="6" value="{vb:raw vboptions.bppl_defaultamount}" onblur="if (this.value == '') { this.value='{vb:raw vboptions.bppl_defaultamount}'}" onfocus="if (this.value == '{vb:raw vboptions.bppl_defaultamount}') {this.value=''}" />
      vBulletin - Sometimes, I'm just like, Wow, and then I'm like, Whoa, and then I'm like, Damn.

      vBulletin.org's ol' Moderator

      I have a lifetime terrorist hunting permit - #091101

      chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 73464
        • 6.0.X

        #4
        I don't know of anything that would cause this to stop working specifically. There is nothing wrong with your code either. For the mobile API, the scope of some variables were changed but $vboptions should still be available to the templates. What is the code after it is rendered and shown in the browser?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Boofo
          Senior Member
          • Apr 2002
          • 2033
          • 4.1.x

          #5
          Originally posted by Wayne Luke
          I don't know of anything that would cause this to stop working specifically. There is nothing wrong with your code either. For the mobile API, the scope of some variables were changed but $vboptions should still be available to the templates. What is the code after it is rendered and shown in the browser?
          My bad, Wayne. It seems Opera 11 is the culprit. It works in Opera 10, IE, etc. I should have checked all the browser first before posting this. My apologies. Here is the rendered code, which is what led me to test the other browsers.

          Code:
          <input type="text" name="amount" size="6" value="25.00" onblur="if (this.value == '') this.value='25.00';" onfocus="if (this.value == '25.00') this.value='';" />
          vBulletin - Sometimes, I'm just like, Wow, and then I'm like, Whoa, and then I'm like, Damn.

          vBulletin.org's ol' Moderator

          I have a lifetime terrorist hunting permit - #091101

          chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

          Comment

          Related Topics

          Collapse

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎