Hi All
Wondering if anyone can help or point to where I am going wrong.
I am trying to take a user submitted value from a search form (OriginalQuery), add text to it, then continue to submit the form with the updated OriginalQuery.
To do this I have created a function (SortTextOut()) that concatenates the OriginalQuery with a string and then updates OriginalQuery before submitting the form.
<script language=JavaScript>
<!--//
var UserInput
function SortTextOut() {
UserInput = "@all " + OriginalQuery + " AND NOT #filename *.doc AND NOT #filename *.xls AND NOT #filename *.css AND NOT #filename *.ppt AND NOT #filename *.dwg AND NOT #filename *.vsd AND NOT #filename *.txt AND NOT #filename *.tmp AND NOT #filename *.pdf"
OriginalQuery = UserInput
}
//-->
</script>
</head>
<body>
<form name=QueryForm action="query4.idq" method="GET">
<input type="text" name="OriginalQuery" size="10" maxlength="50" value=http://www.webdeveloper.com/forum/archive/index.php/"" OnSubmit="SortTextOut()">
</form>
As you can see I have tried...but ultimately failed - if anyone can help it would be greatly appeciated.
Thanks Loads
Bruno
Wondering if anyone can help or point to where I am going wrong.
I am trying to take a user submitted value from a search form (OriginalQuery), add text to it, then continue to submit the form with the updated OriginalQuery.
To do this I have created a function (SortTextOut()) that concatenates the OriginalQuery with a string and then updates OriginalQuery before submitting the form.
<script language=JavaScript>
<!--//
var UserInput
function SortTextOut() {
UserInput = "@all " + OriginalQuery + " AND NOT #filename *.doc AND NOT #filename *.xls AND NOT #filename *.css AND NOT #filename *.ppt AND NOT #filename *.dwg AND NOT #filename *.vsd AND NOT #filename *.txt AND NOT #filename *.tmp AND NOT #filename *.pdf"
OriginalQuery = UserInput
}
//-->
</script>
</head>
<body>
<form name=QueryForm action="query4.idq" method="GET">
<input type="text" name="OriginalQuery" size="10" maxlength="50" value=http://www.webdeveloper.com/forum/archive/index.php/"" OnSubmit="SortTextOut()">
</form>
As you can see I have tried...but ultimately failed - if anyone can help it would be greatly appeciated.
Thanks Loads
Bruno