I have little experience with php & javascript hybrid pages. A friend has a webform php page that has the html form code at the bottom. The form works well but I want to take the first input text field and have it displayed in a <div> on the page the form is directed to. I have tried a few things but can't get it to work. Can anyone help please.
Mel64
0
Newbie Poster
Recommended Answers
Jump to PostI already wrote something like this.
function moveText(text, dispField, defaultText) { if (text.length < 2) { text = defaultText; } document.getElementById(dispField).innerHTML = text; }
usage:
<input type="text" name="fname" id="fname" onkeyup="moveText(this.value, 'result', 'First Name')" onblur="moveText(this.value, 'result', 'First Name')" />
the 'result' is the ide of …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.