• 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
[SOLVED] Re: Pulldown Menu and WOPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: Pulldown Menu and WOPopUpButton


  • Subject: [SOLVED] Re: Pulldown Menu and WOPopUpButton
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Sat, 29 Jul 2006 14:36:46 -0700

Ok, I bound <value> and <onChange> of the WOPopupButton to:

	<value>			valueStringOfPopup		// this generates the <option>'s
	<onChange>	 "MM_jumpMenu('parent',this,0)"

And then utilizing the WODisplayGroup <store> I wrote:

	public int popIndex;

	public void awake()  {
		popIndex = 0;
	}

public String valueStringOfPopup() {
if ( store.displayedObjects() == null || store.displayedObjects ().count() == 0) return "";
anItem = (StoreItem)store.displayedObjects().objectAtIndex ( popIndex );
popIndex++;
String popTitle = URLEncoder.encode( anItem.itemTitle());
return "#" + popTitle;
}



I had set the value attribute in the WOPopUpButton to emulate the standard Pulldown Menu from the JS example like:


	<option value="#link02">Product Two</option>

so that the <onchange> attribute of the WOPopUpButton will call the JS and the browser will jump the page to the anchor <#link02>.

Does anyone have a solution to this issue?
I can't just add an attribute to WOPopUpButton because the attribute has to be part of each <option> line, rather than just the <select> line.


The JS is:

function MM_jumpMenu( targ, selObj, restore ) {
eval( targ + ".location='" + selObj.options [selObj.selectedIndex].value + "'");
if ( restore )
selObj.selectedIndex = 0;
}


To re-iterate, I need a dynamic Pulldown Menu which, when activated, will use <MM_jumpMenu> to navigate the page to an anchor associated with the appropriate product on the page.

----
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
References: 
 >Pulldown Menu and WOPopUpButton (From: Baiss Eric Magnusson <email@hidden>)
 >Re: Pulldown Menu and WOPopUpButton (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Direct Action vs. Component Action...
  • Next by Date: The most strange problem with bindings...
  • Previous by thread: Re: Pulldown Menu and WOPopUpButton
  • Next by thread: Qualifiers, many-to-many and horizontal inheritance
  • Index(es):
    • Date
    • Thread