I have the below element:
<input type="text" value="" tabindex="1" size="15" onblur="UpCaseSearch(this)" name="name">
which is an empty text field.
I want to set text into that field and I can successfully do that using a command like that (when I say successfully I mean that I can see that field populated with text test
:
window.frames[1].document.getElementsByName('name')[2].value = "test"
I have 2 questions however:
- When I look at that element on the page I see that the
value
attribute is still empty""
. Why is that? Where is the actual text that I can see in that field is coming from? If I try the below command, it will actually set the
value
but then the field remains empty:window.frames[1].document.getElementsByName('name')[2].setAttribute('value', 'test')
So it looks like that's not the same value in both cases. Is that right?