How to put javascript function to AIR

Hi,
first I had Flex web application with onet javascript function in index.html file. Now I copied my code from web project mxml file to AIR project and it working properly. How can add this javascript function now. There is no html file now...
EDIT: I am trying to do (in my AIR application) copy to clipboard using roll Over the button. Maybe I can do this in another way instead of javascript function (as i did in my web application).

SET CLIPBOARD DATA:
import flash.desktop.Clipboard;
import flash.desktop.ClipboardFormats;
var textToCopy:String = "Copy to clipboard.";
Clipboard.generalClipboard.clear();
Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, textToCopy, false);
GET CLIPBOARD DATA:
import flash.desktop.Clipboard;
import flash.desktop.ClipboardFormats;
if(Clipboard.generalClipboard.hasFormat(ClipboardFormats.TEXT_FORMAT)){
    var text:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT);
(From LiveDocs: http://livedocs.adobe.com/flex/3/html/help.html?content=CopyAndPaste_1.html)

Similar Messages

  • I would like to know how do I install the brazilian keyboard into macbook air, keyboard with accents (Portuguese Language), I tried so many times how to put into it (Macbook Air). So, thanks for now! I'm waiting for it.

    I would like to know how do I install the brazilian keyboard into macbook air, keyboard with accents (Portuguese Language), I tried so many times how to put into it (Macbook Air). So, thanks for now! I'm waiting for it.

    After you go to system preferences/keyboard/input sources as suggested by sberman, click on the + button and scroll down to Portuguese and select that.  Over at the right you will see the choices Brazilian, Brazilian abnt, Portuguese.  You might want to add all three to see which you like best.
    The "Brazilian" layout is pretty useless.  It is identical to the US layout and the only way to make accents is via the option key shortcuts:  option + n, then o gives you õ.
    The Brazilian abnt and Portuguese layouts have dead keys for adding accents over at the right edge of the keyboard.  But these may not match what is printed on your keys.
    You may prefer to stay with the US layout.  On that you can get accented letters by just holding down the base letter and selecting what you want from the popup menu that appears.  Or you can use the option key shortcuts.
    Another option is the layout called US International PC, which has accent deadkeys on ~, ', etc.
    Which ever layout you want to use, you must select it in the "flag" menu at the top right of the screen.
    To see which key does what for any layout, use the Keyboard Viewer:
    http://support.apple.com/kb/PH13746

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • How to call javascript function?

    Hi,
    How to call javascript function for SAP button
    control onclick event?
    Thanks in advance.

    Hi Sundar,
      u can call java script  in design mode.
      Add this code in ur design part inside body and call the function as
    <sap:button id="a" onSelect="javascript:go();"
    Add inside body:
      <script language="javascript>
    function go(){
    alert("hai");
      </script>
    Regards,
    Vinoth.M

  • How to invoke  javascript function after business action??

    How to call javascript function(such as "window.close(), window.open(...),...") in the action method(public String doBusiness(){...}) of <h:commandButton>?If not,then,is there any alternate approach to call javascript function when the bussiness action method finished??
    Thanks a lot!

    Since your business method is called after the form is submitted, and your code is running on the server, probably the only thing you can do is this:
    Create a custom component (Maybe call it the "onLoad" component) that you always render at the top of your JSP. In the regular situation it wouldn't render anything, but in the case you mention, after your busines method, you would call a method on this new component on the server that would cause it to actually render something the next time it is rendered. When rendered this time, it could then render the "onLoad" method which has your window.close() code in it. The window would then close right away.
    The key is that you are not doing any of this on the client. The form is submitted, your business logic is executed, then the next page is rendered. When the next page is rendered, your javascript could be rendered to close the window.
    If I'm offbase here, someone please say something, I'd hate to send this guy on a wild goose chase.
    Dave

  • How to return javascript function value to jsp page

    Hi i want to retrieve values from javascript function to jsp page, how can i do that ? i am trying this but its not working
    <script language="javascript" type="text/javascript" src="/feedback/common/scripts/config.js"></script>
    <script language="javascript" type="text/javascript" src="/feedback/common/scripts/richtext.js"></script>
    <td>
    <jsp:param id="description" value= "<%=request.initRTE('', '')%>"/>
    </td>
    here this initRTE function is used for displaying rich text editor .....i want to retrieve back the contetnt written in this editor and save it to DB.
    Please help.
    Edited by: xtech on Apr 4, 2008 12:00 PM

    surely i will do that but my app is still not working.....
    here is my code
    </td>
    <td align="left">
    <script language="javascript" type="text/javascript" src="/feedback/common/scripts/config.js"></script>
    <script language="javascript" type="text/javascript" src="/feedback/common/scripts/richtext.js"></script>
    <h:inputHidden id="introtext" value= "<%=request.getParameterValues(description)%>">
    <script>
    initRTE('','');
    </script>
    </td>
    in java script function i am geeting the text content
    function initRTE(rtePreloadContent, rteCSS) {
    rtePreloadContent=document.getElementById('surveyinfo:introtext').value;
    startRTE(rtePreloadContent);
    menuBuilder();
    var description= document.getElementById(rteFormName).value;
    return description;
    basically i want to get the text written in text editor in jsp and want to send it to DB.(Here initRTE() function is calling rich text editor)
    i have downloaded this editor from this url
    http://freerichtexteditor.com/page/4.htm
    and trying to embed it in my app.

  • How to reference JavaScript functions stored in a script object on a different page?

    Hi,
    I have a form which has 2 pages. I have a bunch of JavaScript functions under script objects on page 1. How can I access these functions from page 2?
    I tried the following but none of it work:
    form1.page2.#variables[0].testScript.doThisNow();
    form1.page2.variables[0].testScript.doThisNow();
    form1.page2.variables.testScript.doThisNow();
    Please help.

    Hi,
    Simplest way would be to drag the script object to be under the root node (form1). On both pages would would then be able to reference the function by:
    testScript.doThisNow();
    If you leave the script object under page1, then from page2, the following should work:
    page1.testScript.doThisNow();
    Hope that helps,
    Niall

  • Issue with firePartialAction or how to include JavaScript Functions

    We are using the Client Action Type: firePartialAction on an element in a region of type: TABLE. When a user enters data in here and tabs away, the action fires and recalculates 2 other fields in the same region. On a object with a small number of rows, it seems to work fine. However, when you have a large number of rows (anything over 25), the page seems to hang for nearly a minute and then when it does come back, the values are sometimes not calculated properly.
    The only reason we are using firePartialAction is because the dev guide says that JavaScript is not supported by OAF. We would much rather use a client-side JavaScript function to do these simple arithemtic operations rather than do them on the server.
    My question is two-fold:
    1 - Has anyone experienced this issue and are there any other settings or coding tricks that we should be aware of.
    2 - Has anyone ever rendered a page with a custom JavaScript tag (or library)? Also, where would you add the code in JDeveloper to get a particular element to execute a particulate javascript function (ie: onchange=MCalc())?

    The firePartialAction event is not working for us, so we need to be able to at least try out javascript. We're rendering the page from an XML file, so it's not clear to us how we would even get a custom HTML tag to render into the page at all. Normally, I'd use some kind of HttpServletResponse.getWriter()...println method call to write html (as in a controller servlet), but how would you do that using the OAWebBean? I checked the OAFromattedTextBean, would that allow me to embed onchange into the field?

  • How to call javascript function in Flash

    Please help...
    I have a site that run multiple of domain for example
    Domain (A): raymond.com
    Domain (B): raymond.ca
    The problem is this.. when (B) html page load the flash file
    that locate at (A) it load but non of the buttons work which call
    javascript function using getURL("javascript:showpopup()"); But it
    work fine if all reside on the same domain,eg( (A) html page load
    flash file form (A)). Anyone know how to solve this other than
    create a set of flash files on (B).
    Regards,
    Raymond

    http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00001750.html

  • How to call javascript function with dynamic data in display tag

    Hi,
    Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
    I have a problem when calling the javascript function using ahref in attribute in display tag.
    <bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
    <display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
    <display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
    title="Number"/>                         
    <display:column property="strDate"title="Date" />
    <display:column property="orderValue"title="Order Value(INR)"/>
    <display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
    <display:column property="statusDescription" title="Status" />
    </display:table>
    The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
    When I try this with ordinary struts its working fine the code is:
    <logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
    <tr>
    <td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a>     </td>
    <td><html:hidden name="polist" property="strDate" write="true" /></td>
    <td><html:hidden name="polist" property="orderValue" write="true" /></td>
    <td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" />     </td>
    <td><html:hidden name="polist" property="statusDescription" write="true" /></td>
    </tr>
    </logic:iterate>
    Please help me how to call javascript with dynamic data.
    Thanks in advance

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to call javascript function & action method on clicking jsf  button?

    I have one jsf custom button. I am checking client side validations in mail by calling javascript function & also sending mail by calling action method of a bean which will execute at server side for onclick event of that button. Because of this when I click on that button its calling both javascript function and action method. So even though validations failed its sending mail. How can I overcome this problem?? Please help me....

    I am asking regarding commanLinks in jsf. I have the following code block in jsf. Even though mailSentMessage('true'); returns false, its calling action="#{emailObjectAction.sendEmail}" method. thats why I got that doubt. try the following code.
    <h:commandLink id="mailBtn123Send"      onclick="return mailSentMessage('true');" value="send mail"     action="#{emailObjectAction.sendEmail}">          
    </h:commandLink>

  • How to call javascript function in back bean of jsf

    hi,
    i am trying to call java script function in back bean but not done. Is there any code for call javascript function in bean file.

    Java runs at server side.
    JSF produces HTML output.
    Server sends HTML output to client.
    Java stops running.
    HTML runs at client side.
    JS starts to run in HTML.
    Clear? Java is a server side language. JS is a client side language. To run JS using JSF, simply print it out to the HTML so that it get invoked when the HTML runs.

  • How to use javascript functions in struts jsp page

    hi
    iam using struts jsp pages. here iam calling one javascript function. but iam not able to access the form in javascript.
    wat i have to give as form name to get the elements of the form.
    please reply me soon
    it is urgent
    vamsi

    your form has no name liek this one:
    <html:form action="/userRegistration.do" >so you cannot access the elements inside your form?
    accessing the elements inside the form will be like this:
    document.forms[0].propertyName.value;

  • How to call javaScript function in the form from Action:Tab buttion in workspace

    Hi,
    I want to trigger JavaScript function that I have written in form from Action: buttons in workspace user's account.
    Is there any way that if i hit a button on action bar, it fire a javascript function.
    Reason is: I dont want to place button on the form to perform any action on the form. I want to take control of the form from these buttons. Like submit, edit a form, etc, etc..
    Please let me know if i couldnt explain it properly.
    regards
    Sunil

    Sunil, you want to look at the "Customizing the LiveCycle® Workspace ES User Interface" document at http://help.adobe.com/en_US/livecycle/9.0/customizeworkspaceui.pdf.  The workspace is a Flash component.  For ES4 there's an option to run the workspace in HTML5 which might be more productive long-term.

  • How to call javascript function when form load[like onload="fun()" in html]

    I have to call javascript function at the time of iview is loading. I am not able use onload event which is not working in SAP Portal environment. Please suggest me any other alternative to call the function at the time of iview is loading. I have to set some properties when form is loading.

    I will explain my scenario correctly
    Let us take two pages
    1. Main Page (A)
    2. Child page (B)
           I have displayed records in tableview and each having checkbox and two buttons "print" and "viewDetails"  at down in page A. If I clicked "print" button the records which i have selected checkboxes details will be displayed in new window( page B). In page B i have given this following code
      <script language="javascript">
          window.opener.setTarget('Search');
      </script>
    setTarget() function is in page A.
    function setTarget(opt) {
      if(opt=='print')
         opt="";     
         document.<%=strFormControl%>.target="_blank";
       else
            document.<%=strFormControl%>.target="_self";
    This code is executing after the content of all records details displayed.
    My condition is If i click print button new window is opened and details are displaying. And before displaying content in new page B (means after opened new window) if i click on "viewDetails" button that is also opening new window because <script> code is not executed not yet. but it should display in same window when i click "viewDetails" button.

Maybe you are looking for

  • RFC destination and  webserver settings

    Hi, I need to configure the RFC destination and other technical settings and certainly need help from Basis people. However what inputs we have to give them enabling us to set right configuration. I find different proxy class, RFC destination etc hav

  • Ipod Classic will not restore or show in itunes

    The other day my ipod froze so I decided to reset it. When I did that the original screen would not reappear and instead it told me to restore it. "Fine," I thought, but I was on an airplane at the time and didnt have any internet. When I tried to do

  • Not all songs sync from computer to itouch

    I recently upgrade my iTouch to the new iOS 5.0.1 software (not sure if that was relevant to tell), but I have noticed it will not sync all my songs from my computer to my iTouch, for example, on my computer it says one playlist has 55 songs, however

  • Podcast episodes are not showing up in iTunes

    My podcast "Dimsum Mandarin" was submitted to iTunes on Aug 4, and all was well until these two weeks. Episode 8 was uploaded on Sep 4, but have yet to show up in the feed, as can be seen in the screen cap attached. A new episode 9 was also uploaded

  • Music not appearing in the correct place

    Hi all - HELP!!!  I treated myself to a nice new iTouch 5th Gen (32gb) & all is ok sort of.  I've sync'd stuff from iTunes to the new device but, I have several albums which dont appear under the "artist" viewin the iTouch as they should but, they do