0

I want to set a value into this input. When I use;

document.getElementById('pppUserName').value = "My value"

does not works and gives me this error:

Uncaught TypeError: document.getElementById(...) is null

Apperantly, it is not empty but cannot fill it.

<td colspan="2">
    <input name="pppUserName" type="text" id="pppUserName" maxlength="64" style="width:100%" height="20">
</td>

Any help?

Here is the related code:

<tr>
<td>
   <script language="JavaScript" type="text/javascript">document.write(eval("gVarPassword"));</script>Pass:</td>
   <td colspan="2" name="pppPasswordTD" id="pppPasswordTD">
   <input name="pppPassword" type="password" id="pppPassword" style="width:100%;" autocomplete="off" onkeydown="fncKeyStop(event);" onpaste="return false;" oncontextmenu="return false;" height="20">
</td>
<td>&nbsp;<input type="checkbox" name="isPlainWAN" id="isPlainWAN" onclick="changeTextWAN()">
   <script language="JavaScript" type="text/javascript">document.write(eval("gVarPlain"));</script>Show the password
</td>
</tr>
osmancalisir
  • 101
  • 5

0 Answers0