Updating php echo variable text on page using form value

ctecha 15 Sep, 2010
Hi everyone,

I have a form input text field that people can type a number into. Say they type in 2. I need to be able to update a string on the page so it reflects that without reloading the page. For example, here is the input:

<input class="cf_inputbox required" maxlength="150" size="30" id="text_1" name="followup_package" type="text" />

When a user types 2 into there, I need some text below it to update to say:

Price: 1

or if they typed in 4 into the input field it would display

Price: 4

without the page refreshing. I'm assuming I'll have to use ajax or something so it will update automatically but I'm not sure how to do it. I'm trying to make it autoupdate after someone types into the box without having to click an update button. Anybody know how to do this?

thanks for your help
This topic is locked and no more replies can be posted.