rmmarsh
asked on
Is there anyway I can make a textbox read-only?
I have a webpage that I am sending a GUID to from a desktop app (appl.com/sandbox.php?GUID =12345).
Is there anyway I can make the PayPal on0 textbox read-only so the user doesn't farkel with it?
Is there anyway I can make the PayPal on0 textbox read-only so the user doesn't farkel with it?
<script>
function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
<form id="myform_id" action="#">
<table>
<tr>
<td><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" /><td style="font-size: smaller;">
<input type="hidden" name="on0" value="GUID"> GUID:</td>
<td><input type="text" name="os0" maxlength="100"></td>
</td>
<td><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></td>
</tr>
</table>
</form><script>
var usersGUID = getParameterByName('GUID');
document.forms['myform_id'].elements["os0"].value = usersGUID;
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'disabled' is not supposed to be sent. I would have thought that 'readonly' would work. It does work in the demo on the link above. And it works on my own demo pages so I guess you need to check your code.
ASKER
Thank you...
You're welcome, glad to help.
ASKER