• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 741
  • Last Modified:

Javascript text box value with getElemendById()

I have a text box:

<input id="newAlbumName" onBlur="alert('val='+document.getElementById('newAlbumName').value)"  type=text name='newAlbumName' value="1234">

When the onBlur event is triggered, it alerts me with "val=".  Can anyone tell me how to get it to alert me with "val=1234", or whatever the value of the text box is?

Thanks.
0
burnsj2
Asked:
burnsj2
1 Solution
 
devicCommented:
<input id="newAlbumName" onBlur="alert('val=' + this.value)"  type=text name='newAlbumName' value="1234">
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now