Originally Posted by 2CODE
You are close to what I need, I don't want something like a form.
I want it pre-defined by me not by the visitor via a button, So I want to make var info always equals to xxx and it will check the body content by id and onclick if it not found the string it should appear an alert.
You are so close just the above point and it will be the same like what I want
Second paragraph above does not make sense to me.
How is this script going to be used?
If the info always equals to xxx, then why the search? You would know if you typed it into the script or not.
Also, what onclick event is to occur if the xxx is not found?
Not very clear to me what it is that you are trying to accomplish.