First, I didn't post this in javascript because that is not what I'm having a problem with, though it is a piece of js in a php file.
Its a simple little add-in where if you check the box a password appears in plain text.
I tested it both in a plain html page and a php page. It works fine but when I put it in my script it fails. The code is (values have been changed).
<input type="password"name="pwd7"id="pwd7"autocomplete="off"size="20"maxlength="35"value="<?=$pwd7;?>">
<br>
<input type="checkbox"onChange=
"document.getElementById('pwd7').type=this.checked ? 'text' : 'password'">
Show password
When I run a php page containing this it does what it is supposed to do but in the middle of my script it doesn't show the checkbox. I even tried placing it in different areas of the page just to see what would happen but always the same.
What, in a script could cause the fail? There is much validation ahead of this area of the page and mysql inserts but everything is in good working order, that is until I decided to give this a shot. Also, if this should be posted under js I apologize.