Ask a Question related to Macromedia ColdFusion, Design and Development.
-
skooter #1
ColdFusion and JavaScript???
I have this javascript that works well...
[url]http://www.hotarea.com/fast/display.exe?show+javascript&form_elements&formsDro pD[/url]
own2D.html
It's a combo box where the second dropdown is based on the first selected
dropdown box. Again, no problems, all works well. Here's the javascript......
<script language="Javascript">
var arrayData = new Array();
arrayData[0] = 'SALES|[SAL] User 01|'
arrayData[1] = 'SALES|[SAL] User 02|'
arrayData[2] = 'SALES|[SAL] User 03|'
arrayData[3] = 'MARKETING|[MAR] User 01|'
arrayData[4] = 'MARKETING|[MAR] User 02|'
arrayData[5] = 'MARKETING|[MAR] User 03|'
arrayData[6] = 'TECHNOLOGY|[TEC] User 01|'
arrayData[7] = 'TECHNOLOGY|[TEC] User 02|'
arrayData[8] = 'TECHNOLOGY|[TEC] User 03|'
function populateData( name ) {
select = window.document.form.SubCategory;
string = "";
// 0 - will display the new options only
// 1 - will display the first existing option plus the new options
count = 0;
// Clear the old list (above element 0)
select.options.length = count;
// Place all matching categories into Options.
for( i = 0; i < arrayData.length; i++ ) {
string = arrayData.split( "|" );
if( string[0] == name ) {
select.options[count++] = new Option( string[1] );
}
}
// Set which option from subcategory is to be selected
// select.options.selectedIndex = 2;
// Give subcategory focus and select it
// select.focus();
}
</script>
SO...........
I was wanting to have my ColdFusion query results be in the array instead of
hard coding the array. Is there any way to do this? I think I'm getting
confused about the server-side vs the client-side.
Thanks a lot
skooter Guest
-
using javascript variable in coldfusion
Hi, how can i use a javascript varaible in coldfsuon tags?i dont want to passthose variables via hyperlink cause i need tovalues in current page. ... -
Javascript in a Coldfusion Flash for - HOW????
Trying to figure this out. Any Ideas or examples. thanks -
Javascript and Coldfusion
Can you have CF tags within javascript tags? thanks, Mike -
javascript, coldfusion expression
hi guys! is there a way to embed a expression using javascript and coldfusion values? this variable is getting nut... <a... -
Help with Javascript/Coldfusion Scroller
Im working on a news ticker or scroller for a hockey website that displays the scores from last nights games. I already have it basically working... -
gwgiswebmaster #2
Re: ColdFusion and JavaScript???
<cfset ctr = 0>
<cfoutput query="yourqueryname">
arrayData[#ctr#] = "#yourqueryname.col1#|#yourqueryname.col2#|";
<cfset ctr = ctr + 1>
</cfoutput>
gwgiswebmaster Guest



Reply With Quote

