Hello, its not a problem related to my page, its general I believe, but sure, why not. Im not able to paste a code here even within the code tags, so I hope it will enough like this. Thank you very much

I was trying your code{thank you for that}, however it is not what I have expected right now. Your code is basically just checking if the edit box is empty, when is, than the test got failed, else it goes on. Which is not bad at all, as I was looking for something like this as well, but not at this moment Or em I not getting the true purpose here?

Unfortunately, you are at the mercy of the DOM in these cases. input elements do not always contain an attribute that holds the current value of the field, nor are they required to. In my experience, the actual value can be found in a number of places, depending on the DOM:

1.) The value attribute.
2.) A child text node.
3.) Some other element that’s a near relative, like a span sibling, for example.

Every DOM is different, so you will need to take a different approach depending on your case. A couple of tips:

1.) Sometimes the value sitting in the field won’t be baked into the DOM, and thus rendered, until some other action on the page is taken, like a save, or a page refresh, etc. This is often a consequence of how the Javascript is listening for events.
2.) Try and save the HTML of the page and open in a text editor, then conduct a find for the text “demo”, to see if the value is indeed being held somewhere else in the DOM.