Forum Moderators: open

Message Too Old, No Replies

Append text to a textbox!

ajax html mysql php

         

WiseOne

6:31 am on Nov 29, 2005 (gmt 0)

10+ Year Member



I got a input box with name = action, whn a key is press (eg. 'm') it sends a query to database grabs data from server n send data back keywords found, each keyword got a function called newValue(found_keyword), when clicked it replaces the text in the textbox...

function newValue(mysql) => textbox => action = > value => from 'm' is replaced with the word 'mysql'

Then the user tried for second ketword [mysql + j]

its works fine till the keyword it is a single word but when my user tries for the second 1 (eg 'j') n when he click on the new found keyword (jscript)

function newValue(jscript) => textbox => action = > value => from 'mysql + j' it shld become [mysql + jscript] which is not happening, it simply becomes 'jscript'

u try "http://del.icio.us/" u wil understand wat i mean!

Codes:
function newValue(str) {
document.form1.action.value = str;
}

WiseOne

8:13 am on Nov 29, 2005 (gmt 0)

10+ Year Member



sample:-

[aquaciti.com...]