Rick-
  Whenever you declare a method such as click="someMethod()"...you cannot have double quotes between the wrapping double-quotes of the click. The compiler always assumes the second quote is the end of the method name. If you changed your code to --> click="callMethod()" and then above it within a <mx:Script> tag had....
 
private function callMethod() : void
{
  navigateToURL(new
URLRequest("_javascript_:popup_ultraslim('/tools/entityLookup3/entity_details.cfm?ENTITYID="
+ this.label + "',750,550)"), '_self');
}
 
Then it work.  Your LinkButton example does not have a double quote b/w the quotes around the click method. I'm guessing you don't have a function named "launchDetailsWindow()" defined which is causing your compiler error.

Rick Root <[EMAIL PROTECTED]> wrote:
I've got an itemRenderer in a datagrid that's rendering a linkbutton
with a script.

The following doesn't work because it's not valid XML, with the "
symbols in the click value...

<mx:DataGridColumn headerText="Entity ID" width="100" dataField="ENTITYID">
<mx:itemRenderer>
<mx:Component>
<mx:LinkButton label="{data.ENTITYID}" click="navigateToURL(new
URLRequest("_javascript_:popup_ultraslim('/tools/entityLookup3/entity_details.cfm?ENTITYID="
+ this.label + "',750,550)"), '_self');"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>

I originally had a function defined in the same file that did that and I
called like like this:

<mx:LinkButton label="{data.ENTITYID}"
click="launchDetailsWindow(this.label);"/>

But it kept telling me that launchDetailsWindow was a "possibly
undefined function", leading me to believe that I don't understand
scoping in itemrenders :)

Rick


Stay in the know. Pulse on the new Yahoo.com. Check it out. __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to