Re: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-10 Thread Ramu p



Hi Manish,

I guess the below works out for U!!!
Try it out!!


Code for Mxml:

?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.macromedia.com/2003/mxmlmx:Script
![CDATA[import mx.controls.Alertfunction callJS(){Alert.show(Clicked on Btn)var someText = SomeText from FLex;getURL(_javascript_:jsFun('+someText+'));
}]]/mx:Scriptmx:Canvasmx:Button label=click click=callJS()//mx:Canvas/mx:Application

Code for embedding mxml in HTML and call JS

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtdhtmlhead
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1titleFlex n HTML/titlescript language=_javascript_function jsFun(txt){alert(txt)
}/script/headbodyobject classid="" codebase="" href="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width=200 height=200 param name=movie value=imageClick.mxml.swf
 param name=quality value=high embed src="" quality=high pluginspage=http://www.macromedia.com/go/getflashplayer
 type=application/x-shockwave-flash width=200 height=200/embed/object/body/html
The first block gives you the structure of Mxml code, a button that calls an AS function which uses to getURL() to call Js function.

The sec block is just html page that has mxml embedded in it and js function (jsFun) that is being referred by AS.
On 10/8/05, Manish Jethani [EMAIL PROTECTED] wrote:
On 10/7/05, djok_fb [EMAIL PROTECTED] wrote: 1-Embed the mxml file in a HTML page:
 html head script type=_javascript_ function launchSpellChecker(someText) { alert(someText); } /script
 /head body[snip] 2- Write a AS function using getURL: function doSpellCheck( textToCheck ) { getURL(_javascript_:launchSpellChecker(' + textToCheck +
 ');void(0);); } 3- Link the function to a button The AS function is called but IE tells me Object not found. I tried with Firefox (w/ _javascript_ debugger) and it tells me:
 launchSpellChecker function not found.I don't see anything obviously wrong.What version of IE are you using? Yahoo! Groups Sponsor ~--
Most low income households are not online. Help bridge the digital divide today!http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM~-
--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/






--
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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-10 Thread Stephane De Jonckheere
I found what was the problem, it comes from my HTML script tag: it's not
type but langage.
Sorry for bothering everybody.

-Original Message-
From: Manish Jethani [mailto:[EMAIL PROTECTED]
Sent: vendredi, 7. octobre 2005 20:39
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] [Flex/Javascript] Javascript function not
found when called from Flex


On 10/7/05, djok_fb [EMAIL PROTECTED] wrote:

 1-Embed the mxml file in a HTML page:
 html
 head
 script type=javascript
 function launchSpellChecker(someText) {
 alert(someText);
 }
 /script
 /head
 body
[snip]

 2- Write a AS function using getURL:
 function doSpellCheck( textToCheck ) {
 getURL(javascript:launchSpellChecker(' + textToCheck +
 ');void(0););
 }

 3- Link the function to a button

 The AS function is called but IE tells me Object not found.
 I tried with Firefox (w/ JavaScript debugger) and it tells me:
 launchSpellChecker function not found.

I don't see anything obviously wrong.  What version of IE are you using?



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



 





***

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager to [EMAIL PROTECTED]

***



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-10 Thread Stephane De Jonckheere
I'm using IE 6.0SP1 and FireFox 1.06.
I don't understand why it's not working, all the samples I see on the
Internet are like my program.

-Original Message-
From: Manish Jethani [mailto:[EMAIL PROTECTED]
Sent: vendredi, 7. octobre 2005 20:39
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] [Flex/Javascript] Javascript function not
found when called from Flex


On 10/7/05, djok_fb [EMAIL PROTECTED] wrote:

 1-Embed the mxml file in a HTML page:
 html
 head
 script type=javascript
 function launchSpellChecker(someText) {
 alert(someText);
 }
 /script
 /head
 body
[snip]

 2- Write a AS function using getURL:
 function doSpellCheck( textToCheck ) {
 getURL(javascript:launchSpellChecker(' + textToCheck +
 ');void(0););
 }

 3- Link the function to a button

 The AS function is called but IE tells me Object not found.
 I tried with Firefox (w/ JavaScript debugger) and it tells me:
 launchSpellChecker function not found.

I don't see anything obviously wrong.  What version of IE are you using?



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



 





***

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager to [EMAIL PROTECTED]

***



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






RE: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-10 Thread Tracy Spratt
I use this regularly.  Try dropping the second parameter in the
getURL(), the ,void(0)

Also test a simpler function, one that takes no args.

Are there any script errors shown in the lower left corner of the
browser?  

Create an error to make sure you are actually calling the wrapper you
think you are.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stephane De Jonckheere
Sent: Monday, October 10, 2005 3:03 AM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] [Flex/Javascript] Javascript function not
found when called from Flex

I'm using IE 6.0SP1 and FireFox 1.06.
I don't understand why it's not working, all the samples I see on the
Internet are like my program.

-Original Message-
From: Manish Jethani [mailto:[EMAIL PROTECTED]
Sent: vendredi, 7. octobre 2005 20:39
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] [Flex/Javascript] Javascript function not
found when called from Flex


On 10/7/05, djok_fb [EMAIL PROTECTED] wrote:

 1-Embed the mxml file in a HTML page:
 html
 head
 script type=javascript
 function launchSpellChecker(someText) {
 alert(someText);
 }
 /script
 /head
 body
[snip]

 2- Write a AS function using getURL:
 function doSpellCheck( textToCheck ) {
 getURL(javascript:launchSpellChecker(' + textToCheck
+
 ');void(0););
 }

 3- Link the function to a button

 The AS function is called but IE tells me Object not found.
 I tried with Firefox (w/ JavaScript debugger) and it tells me:
 launchSpellChecker function not found.

I don't see anything obviously wrong.  What version of IE are you using?



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



 






***

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager to [EMAIL PROTECTED]


***




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



 








 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






Re: [flexcoders] [Flex/Javascript] Javascript function not found when called from Flex

2005-10-07 Thread Manish Jethani
On 10/7/05, djok_fb [EMAIL PROTECTED] wrote:

 1-Embed the mxml file in a HTML page:
 html
 head
 script type=javascript
 function launchSpellChecker(someText) {
 alert(someText);
 }
 /script
 /head
 body
[snip]

 2- Write a AS function using getURL:
 function doSpellCheck( textToCheck ) {
 getURL(javascript:launchSpellChecker(' + textToCheck +
 ');void(0););
 }

 3- Link the function to a button

 The AS function is called but IE tells me Object not found.
 I tried with Firefox (w/ JavaScript debugger) and it tells me:
 launchSpellChecker function not found.

I don't see anything obviously wrong.  What version of IE are you using?


 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/