well you cannot pass javascript variables to coldfusion directly you have to take a round about way to get javascript vars back into coldfusion.
possible way of doing this is the way pravinasar explained through the URL. (requires submit of page)
Another way is through iFrames. Although you're not directly passing the javascript variables back to CF, you're using javascript to process. and the iFrame to get values using javascript to refence the iFrame.
And the last way is through passing javascript vars to a hidden field, having a submit (can be in the background with a hidden iFrame), and then referencing the form variable in coldfusion.
~trail
Main Topics
Browse All Topics





by: pravinasarPosted on 2005-10-21 at 13:27:07ID: 15135394
You can pass urlquery string
myValue; 00,scrollb ars=yes'); "
value);">
e.g.
<script language="javascript">
function OpenWindow(myValue) {
var urlStr ='insurance.htm?myValue='+
open(unescape (urlStr), 'prevWin', 'status,width=640,height=5
}
</script>
<cfinput name="myinput" type="text" onchange="OpenWindow(this.
Then you can access as
SELECT * From searchtable
WHERE searchterm like #URL.myValue#