We got this to work:

Set the ExtraHTMLText for the Combo Box to "onChange=FormName.submit();"

Define the OnBeforeDisplayEvent for the Repeated Field as follows:

{
        //[[SPIDER_EVENT<Repeated1_onBeforeDisplayEvent>
        
        public int Repeated1_onBeforeDisplayEvent(CSpDisplayEvent event)
        {
        
        if (CSpider.getWebVar("cboWineType") != null) // cboWineType = null on Page 
Load
        {
                String cboStr = (CSpider.getWebVar("cboWineType")).toString();
                int cboLen = cboStr.length();
                if (cboLen > 0) // A choice is selected from cboWineType
                {
                        //Set the criteria based on the cboWineType selection and run 
the query
                        CSpSelect thedata = (CSpSelect) 
CSpider.getDataObject("doWines");                                       
thedata.clearDynamicCriteria();
                        
thedata.addDynamicCriterion("WINES_WINETYPE",CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR,CSpider.getWebVar("cboWineType"));
                        thedata.execute();
                        return (PROCEED);  
                }
                else
                {
                        return (STOP);  //if nothing is selected, do not build the 
results grid.
                }
        }
        return (STOP); //if cboWineType is null, do not build the results grid.
}
"Jennifer DeLeon" <[EMAIL PROTECTED]> wrote:
>
>I am looking at the evaluation copy of NetDynamics and trying to mimic some logic 
>that was previously done in Visual Interdev/FrontPage.
>
>A user can choose a selection from a combo box. If something is selected in the combo 
>box, a grid is displayed showing the results of the query.
>
>It's straightfoward enough to accomplish this using two pages - a search page and
 a results page. However, we would like to have the results show up on the same page
 using the onChange event for the combo box.
>
>I've seen some posts that suggest using a hidden button. Is there another approach 
>that can be used?
>
>I have a javascript function for the onChange event and I have the logic to 
>dynamically set the criteria for the dataobject. I just don't know how to tie the two 
>together. 
>
>Any ideas on the best way to do this would be greatly appreciated.
>
>Thanks!!

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to