• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WOPopupButton element is not accessible from JavaScript for some reason
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WOPopupButton element is not accessible from JavaScript for some reason


  • Subject: WOPopupButton element is not accessible from JavaScript for some reason
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Tue, 31 Jan 2006 09:08:42 -0800

I have a WOPopupButton, inside a WOConditional, inside a WORepetition, in a middle sub-component WOForm, named <transactionForm>, with the bindings:

CategoryPopUp: WOPopUpButton {
	displayString = aCategory.catName;
	escapeHTML = false;
	name = "getCat";
	item = aCategory;
	list = categories.displayedObjects;
	onChange = "updateSubCats()";
	selection = curCategory;
}
transactionForm: WOForm {
	multipleSubmit = true;
	name = "transactionForm";
}

I have some JavaScript that needs to get to the WOPopupButton element and needs the <name> of the element to do so, but JS is failing when it does the 1st line of code:
var catSelect=document.forms['transactionForm'].elements['getCat'];
any suggestions? Is the problem the multiple WOForm's on the page?


function updateSubCats()
{
var catSelect=document.forms['transactionForm'].elements['getCat'];
var subCatSelect=document.forms['transactionForm'].elements ['getSubCat'];
var catNumber = catSelect.selectedIndex;
var k;
for ( k = subCatSelect.options.length; k > 1; k-- ) {
subCatSelect.options[k-1] = null;
}
var j;
for ( j=0; j < cats[catNumber].length; j++ ) {
var objOption = new Option( cats[catNumber][j], j );
subCatSelect.options[j] = objOption;
}
setpagefocus();
}


TIA,
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: WOPopupButton element is not accessible from JavaScript for some reason
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: XCode EO modeling
  • Next by Date: Re: EnterpriseObjects in a regular Java application
  • Previous by thread: Re: XCode EO modeling
  • Next by thread: Re: WOPopupButton element is not accessible from JavaScript for some reason
  • Index(es):
    • Date
    • Thread