Hi Mike, I have been told at work that I cannot install AIM so I will have
to rely on this list for now. I have managed to get my data loaded but I can
only get 2 of my four select boxes to populate. This is really starting to
frustrate me, I was wondering if you post a code snipet on how you managed
to implement this?
Here is a little of what I have been trying to do.
<script src="/lib/qforms.js"></script>
</cfstoredproc>
<SCRIPT LANGUAGE="JavaScript">
<!--//
// set the path to the qForms directory
qFormAPI.setLibraryPath("/lib/");
// this loads all the default libraries
qFormAPI.include("*");
// this is the default struct to use for the blank options to prefix
// when populating a select box
stcBlank = new Object();
stcBlank[""] = " ";
// create a structure to store all the team information in
stcTeams = new Object();
stcTeams = new Object();
stcTeams["5"] = new Object();
stcTeams["5"]["34"] = "Albania";
stcTeams["5, 34"] = new Object();
stcTeams["5, 34"]["203"] = "International";
stcTeams["5, 34, 203"] = new Object();
stcTeams["5, 34, 203"]["1814"] = "Senior";
stcTeams["5, 34, 203"]["1954"] = "U21";
stcTeams["5, 34, 203"]["1815"] = "U19";
stcTeams["5, 34, 203"]["2844"] = "U17";
stcTeams["5, 34"]["101"] = "Kategoria Superiore";
stcTeams["5, 34, 101"] = new Object();
stcTeams["5, 34, 101"]["2205"] = "Dinamo Tiranë";
stcTeams["5, 34, 101"]["4583"] = "Egnatia Rrogozhinë";
stcTeams["5, 34, 101"]["4584"] = "Elbasani";
stcTeams["5, 34, 101"]["4585"] = "Laçi";
stcTeams["5, 34, 101"]["2443"] = "Lushnja";
stcTeams["5, 34, 101"]["1029"] = "Partizani Tiranë";
stcTeams["5, 34, 101"]["2444"] = "Shkumbini Peqin";
stcTeams["5, 34, 101"]["2445"] = "Teuta Durrës";
stcTeams["5, 34, 101"]["2446"] = "Tirana";
stcTeams["5, 34, 101"]["2448"] = "Vllaznia Shkodër";
stcTeams["5"]["138"] = "Armenia";
stcTeams["5, 138"] = new Object();
stcTeams["5, 138"]["302"] = "International";
stcTeams["5, 138, 302"] = new Object();
stcTeams["5, 138, 302"]["2096"] = "Senior";
stcTeams["5, 138, 302"]["2577"] = "U21";
stcTeams["5, 138, 302"]["2733"] = "U19";
stcTeams["5, 138, 302"]["2794"] = "U17";
// this example shows how you could pre-populate the form
function setDefault(){
objForm.Region.setValue("1");
objForm.Country.setValue("1");
objForm.Division.setValue("1");
}
//-->
</SCRIPT>
<FORM ACTION="##" METHOD="POST" NAME="frmExample">
<P><B>Select a Region</B><BR>
<SELECT NAME="Region" STYLE="width: 200px;"
onChange="objForm.Country.populate(stcTeams[objForm.Region.getValue()],
null, null, stcBlank);">
<OPTION VALUE=""></OPTION>
<OPTION VALUE="5">Europe Non-EU</OPTION>
</SELECT></P>
<P><B>Select a country</B><BR>
<SELECT NAME="Country" STYLE="width: 200px;"
onChange="objForm.Division.populate(stcTeams[objForm.Region.getValue() + ','
+ objForm.Country.getValue()], null, null, stcBlank);">
<!----<SELECT NAME="Country" STYLE="width: 200px;"
onChange="alert([objForm.Region.getValue() + ',' +
objForm.Country.getValue()]);">---->
<OPTION VALUE=""> </OPTION>
</SELECT></P>
<P><B>Select a Division:</B><BR>
<SELECT NAME="Division" STYLE="width: 200px;"
onChange="objForm.Division.populate(stcTeams[objForm.Region.getValue() + ','
+ objForm.Country.getValue() + ',' + objForm.Division.getValue()], null,
null, stcBlank);">
<!---// insert blank entries for Netscape //--->
<OPTION VALUE=""> </OPTION>
</SELECT></P>
<P><B>Select a Club:</B><BR>
<SELECT NAME="Club" STYLE="width: 200px;">
<!---// insert blank entries for Netscape //--->
<OPTION VALUE=""> </OPTION>
</SELECT></P>
<P>
<INPUT TYPE="Submit" VALUE="Submit">
<INPUT TYPE="Reset">
<INPUT TYPE="Button" VALUE="Set Default" onClick="setDefault()">
</P>
</FORM>
<SCRIPT LANGUAGE="JavaScript1.1">
// initialize the qForm object
objForm = new qForm("frmExample");
// make these fields required
objForm.required("Region,Country,Division");
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:33:1776
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/33
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:33
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.33
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54