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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -