CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 dependent listboxes in hidden pannel = JS error

Print topic Send  topic

Author Message
paulmason411


Posts: 127
Posted: 03/05/2010, 9:26 PM

Hi Guys,

Just thought I would point out that if you hide a dependent listbox in a panel you will get an error:

Error: sender.id is undefined

Basically CodeCharge needs to add an if element exists clause into the JS to be contingent for this situation.

My work around is to create a hidden div at the bottom of the page with the necessary form fields.
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
paulmason411


Posts: 127
Posted: 03/10/2010, 1:30 AM

Here is how to check for js functions:

http://forums.devx.com/showthread.php?t=150641
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
paulmason411


Posts: 127
Posted: 03/24/2010, 6:09 PM

Quote maclonghorn:
Hey I'm having the same problem. I have a State/County combination (state=master, county=child) on a Search record, Grid, and detail Record (initially hidden) on the same page. It's a typical list, then view detail scenario. When I view the detail, I get the javascript error b/c the search list boxes don't exist. Do I need to customize the javascript, or is there a way to have CCS work around it?

I put this code at the bottom of my page:

  
  <div style="DISPLAY: none">  
    <select id="rcd_fixedlst_preferred_payment_time">  
      <option selected></option>  
    </select>  
   
    <select id="rcd_fixedlst_interval_period">  
      <option selected></option>  
    </select>  
  </div>  

So you can do the same, just change the id's to name of your state and country listbox id's which you can get to by clicking the listbox in design view and then looking at format->id
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
maclonghorn

Posts: 22
Posted: 03/25/2010, 8:34 AM

Are those dropdown lists your actual, functioning lists, or are they in addition to the ones that actually work?

What I've done at this point is added this at the top of each javascript function:
 if (!sender.id) return false;
Only downside to this is it makes the javascript into custom code, instead of being maintained by the IDE.
View profile  Send private message
paulmason411


Posts: 127
Posted: 03/25/2010, 5:37 PM

They are additional lists.

Your way seems pretty good, although I always try and avoid disturbing the the ccs generated code as you mentioned.
_________________

http://paulmason.name - Web Development Blog

View profile  Send private message
maclonghorn

Posts: 22
Posted: 03/26/2010, 7:47 AM

Exactly. I may give that a shot. Thanks Paul
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.