Using PHP script to replace a field in HTML form -
Using PHP script to replace a field in HTML form -
i need utilize php script replace 7th character of html form input field.
eg.
a234591q
to become
a23459iq
replacing number1 letter.
the problem don’t have acess php script file, need in html page client types data, or @ submit time.
moises
if have jquery library linked on page, can seek following.
first should give input id e.g <input type="text" id="useranswer"> set onsubmit property of html form to:
<form action="" onsubmit="replaceat(7,$('#useranswer').val())"> then define replaceat function.
function replaceat(index,word){ newword=word.substr(0,index) + 'l' + word.substr(index+1); $('#useranser').val(newword); } i have given reply question not clear how plan implement without access source
php
Comments
Post a Comment