M
millw0rm
I got a textbox 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 adds '+' and tries for second keyword [ j ]
javascript splits the keyword which is '+' delimited (ie. mysql + j)
and [ j ] is sent to the script, script look for ne word start with the
word [ j ] n returns the results, with the function newValue(JScript)
same as above...
now the problem coms.. on clicking on [ JScript ] the value in the
textbox (ie. mysql + J) gets replaced with [JScript]...
What i want is, it shld remove the letter [ j ] and add 'JScript'
instead of that! Final result shld look like [mysql + JScript]
u try 'http://del.icio.us/ => post to del.icio.us' n see how the tags
field works! Then u wil understand wat i mean!
Codes:
function newValue(str) {
document.form1.action.value = str;
}
App URL : http://aquaciti.com/example/index.php
Try searching for 1 keyword [a] when found click on it, it will be
added to textbox then put '+' and look for other keyword [h] when found
click on the second keyword!
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 adds '+' and tries for second keyword [ j ]
javascript splits the keyword which is '+' delimited (ie. mysql + j)
and [ j ] is sent to the script, script look for ne word start with the
word [ j ] n returns the results, with the function newValue(JScript)
same as above...
now the problem coms.. on clicking on [ JScript ] the value in the
textbox (ie. mysql + J) gets replaced with [JScript]...
What i want is, it shld remove the letter [ j ] and add 'JScript'
instead of that! Final result shld look like [mysql + JScript]
u try 'http://del.icio.us/ => post to del.icio.us' n see how the tags
field works! Then u wil understand wat i mean!
Codes:
function newValue(str) {
document.form1.action.value = str;
}
App URL : http://aquaciti.com/example/index.php
Try searching for 1 keyword [a] when found click on it, it will be
added to textbox then put '+' and look for other keyword [h] when found
click on the second keyword!