The following code is based on an example from Forta's "Advanced" book.

The idea is to take a query and convert it to JavaScript for some dynamic
selects of the details.

The book example doesn't quite fit my needs, so I've tried modifying it, but
I'm not getting the results expected ... what should happen is that after a
user clicks the pull down menu for a category, the three SPAN tags below
populate the space on the page.

No errors on the page, but not the expect dynamic output after the select
either.

Any suggestions on things to fix would be appreciated:



<script src="/cfide/scripts/wddx.js" language="JavaScript"></script>

<script language="JavaScript">


<cfwddx
        action="cfml2js"
        input="#FindCategoryCounts#"
        toplevelvariable="categories">
        
        // function populated input elements when option in select menu is
picked
        function FillControls(RowNum) {
                with (document.form1) {
                        RowNum = RowNum - 1;
                        
        // populate textboxes with data in that row
        totalcount.innerText = Categories.totalcount[RowNum];
        westcount.innerText = Categories.westcount[RowNum];
        eastcount.innerText = Categories.eastcount[RowNum];
        
        }
        }
        // end script


</script>


<!--- define styles for CSS --->
<style type="text/css">

span {width: 12px; padding-left: 3px; font:smaller Arial;}


</style>
<CENTER><B>
<H3>Advertiser Shopping Cart</H3></B></CENTER>
<table width="475" border="0" cellspacing="0" cellpadding="1" align="center"
bgcolor="#000000"><tr><td>

<TABLE cellSpacing=0 cellPadding=10 width=475 bgColor=#eaeaea border=0
align=center class="textblack">
<TBODY>
<TR>
<TD>
<cfFORM name="form1" action="hub.cfm?#client.urltoken#" method="post">

<TABLE align=center class="textblack" border=0>
<TBODY>
<TR>

<TD colspan=5>
<b>Select Category</b>:
<br>
<select name="categories_id">
<option value=""></option>
<cfoutput query="FindCategoryCounts">
<option value="#categories_id#"  onclick="this.classname = 'choiceSel';
FillControls(#FindCategoryCounts.currentrow#);">#category#</option>
</cfoutput>
</select>
<br>
Availble Resumes: All: <span class="choice" id="totalcount"></span>&nbsp;
West County: <span class="choice" id="westcount"></span>&nbsp; East County:
<div class="choice" id="eastcount"></span>

</TD>
<TD><INPUT type="submit" value="GO" name="submit" class=textblackbold></TD>
<TD></TD></TR>






</TBODY></TABLE>
</cfFORM>
</TD></TR></TBODY></TABLE>
</TD></TR></TBODY></TABLE>










______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to