Webkit. How to connect external javascript from dir C:

I can't execute javascript from dir C:
I have some html, that I load in Webkit with loadContent(). In that html invoked function test(). Function contains in a separate javascript file.
<head>     
<script language='javascript' type='text/javascript' src="file:///C:/temp/test.js"></script>
<script>
     function getText() { var val = document.getElementById('text_area').value;
          prompt('getText', "val");
</script>          
</head>
<body>
       <textarea id='text_area' name='text_area' style="width:100%; height:100%"></textarea>     
       <script> test(); </script>
</body>External javascript (test.js)
function test() {
        alert('It works!');
     getText();           
}External js doesn't work. PromptHandler (AlertHandler) doesn't catch anything. If I use wEngine.executeScript('test'), appear error: netscape.javascript.JSException: ReferenceError: Can't find variable: getText.
But that code works on any other browsers.

Thank you for the problem report!
This looks like a bug in WebView. A Jira issue has been filed to track this: http://javafx-jira.kenai.com/browse/RT-17330. Note that the issue may end up classified as not-a-bug because the ability to run local scripts from dynamic contents may be considered a security hole.
As a workaround, try saving your HTML into a temporary file and load it using WebEngine.load(). It should work as in any other browser. Another option is to include all necessary code in the HTML document loaded with WebEngine.loadContent(), but I gather that is undesirable in your case.
Edited by: 890759 on Oct 11, 2011 5:19 AM
Edited by: 890759 on Oct 11, 2011 5:21 AM

Similar Messages

  • How to connect external webservice from ABAP

    Hi,
    Please see code pasted below and tell me what is wrong.
    We try to connect external webservice via https. Should I install certificate is SAP for this connection? (if YES, how can I do this?)
    Should I configure something else in SAP to connect external webservice via https?
      DATA: client type ref to if_http_client,
            lv_content type String,
            lv_xml_string type string,
            lv_length type I,
            lv_response type I,
            lv_node type ref to IF_IXML_NODE,
            lv_xml_doc type ref to cl_xml_document.
    ****Create the HTTP client
    call method cl_http_client=>create_by_url
       EXPORTING
         url    = 'http://services-demo.krd.pl/raina/1.0/KrdAPI.asmx'
       IMPORTING
         client = client
       EXCEPTIONS
         others = 1.
    CALL METHOD CL_HTTP_CLIENT=>CREATE
      EXPORTING
        HOST               = 'services-demo.krd.pl'
         SERVICE = '443'
        SCHEME  = '2'
       PROXY_HOST         =
       PROXY_SERVICE      =
       SCHEME             = SCHEMETYPE_HTTP
       SSL_ID             =
       SAP_USERNAME       =
       SAP_CLIENT         =
      IMPORTING
        CLIENT             = client.
    EXCEPTIONS
       ARGUMENT_NOT_FOUND = 1
       PLUGIN_NOT_ACTIVE  = 2
       INTERNAL_ERROR     = 3
       others             = 4
    CONCATENATE
    '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    ' xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
    'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rain="http://raina.krd.pl">'
    '<soapenv:Header/>'
    '<soapenv:Body>'
    '<rain:Login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
    '<id xsi:type="xsd:string">B03EB34F02</id>'
    '<password xsi:type="xsd:string">Akquinet99</password>'
    '<appId xsi:type="xsd:string">test</appId>'
    '<appInstId xsi:type="xsd:string">test</appInstId>'
    '<custom xsi:type="xsd:string">test</custom>'
    '</rain:Login>'
    '</soapenv:Body>'
    '</soapenv:Envelope>'
    INTO lv_content.
    CALL METHOD client->request->set_header_field
        EXPORTING
          name  = '~request_method'
          value = 'POST'.
    CALL METHOD client->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_uri'
        VALUE = '/raina/1.0/KrdAPI.asmx?'.
      CALL METHOD client->request->set_header_field
        EXPORTING
          name  = 'Content-Type'
          value = 'text/xml; charset=utf-8'.
      call method client->request->set_header_field
        EXPORTING
          name  = 'SOAPAction'
          value = 'Login'.
      lv_length = STRLEN( lv_content ).
      call method client->request->set_cdata
        EXPORTING
          data   = lv_content
          offset = 0
          length = lv_length.
    ****Make the call
      client->send( ).
    ****Receive the Response Object
      call method client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          others                     = 4.
    *****Get the response content
      client->response->GET_STATUS( IMPORTING CODE = lv_response ).
      lv_xml_string = client->response->get_cdata( ).
    Regards,
    Michal

    HI ,
            Error in accessing External Web Service
    Calling a secured external web service from ABAP
    Edited by: A kumar on Aug 21, 2008 11:58 AM

  • How to connect external database(Ex:SQL Server/Tivoli)  from ABAP Webdynpro

    Hi,
    Any one have idea how to connect external database like SQL Server/Tivoli to access tables from WebDynPro ABAP.
    Please point to me some links if you have
    Thanks
    Praveen

    Hi,
    Please check out this link -
    FETCH DATA FROM ORACLE DATABASE USING Web Dynpro
    Regards,
    Lekha.

  • How to connect external trigger PCI-1433

    Hi all:
    I met the same problem as this old post: https://forums.ni.com/t5/Machine-Vision/How-to-connect-external-trigger-PCIe-1433/m-p/1677560/highli...
    however the post did not give solution.
    I am having an issue getting the external trigger( from PCI 6259) to work with a cameralink camera, a PCIe-1433 card . The PCI 6259 is connected to BNC 2111, the output trigger signal from CTR0 is connected to the SMB connector on the 1433 card and is providing pulse train at TTL voltages (0-5V).  Using the MAX SOFTWARE and under the Acquisition tab I have CC1 set to external 0, however the camera is not receiving this external trigger. The camera is Basler 4096-140km.
    I measured the ouiput signal from CTL0, the sigal seems good.
    I tried RTSI trigger before, failded. I thought SMB should be more straight forward, seems I was wrong.
    Looking forward to reply!
    Attachments:
    camera configuration.jpg ‏168 KB
    External Camera Trigger(SMB).vi ‏57 KB

    Bobjojo,
    You will actually need to affect the properties of both the camera and the frame grabber to take advantage of this triggering mode. I found a document that contains a good run down of the process to acquire in this mode (linked below). As far as the programming for the acquisition is concerned, the frames will be built at the driver level for the specified frame height. This means that the IMAQ driver will composite the line scans for you, and any simple acquisition (the document shows using the Vision Acquisition Express VI) will be able to pull the image into LabVIEW.
    www.ni.com/white-paper/13786/en/pdf
    Karl G.
    Applications Engineer
    ni.com/support

  • HT3988 how to connect external keyboard to the garage band if its possible

    how to connect external keyboard to the garage band if its possible,
      is any body tried ? I have roland e66 keyboard and im trying to
       connect with grage band but i dont know thats is possible??

    You can definitely just connect a mouse and keyboard and then an external monitor and it will work. In the power options in the Windows control panel you will have a choice as to what happens when the lid is closed. Set it to "do nothing" and then you can shut the lid of the laptop and use only the external monitor. 
    If this is "the Answer" please click "Accept as Solution" to help others find it. 

  • How to connect oracle database from tuxedo

    Hi,
    How to connect oracle database from tuxedo.
    If any one can help me.
    Regards,

    it depends on configuration your going to choose, there are two ways--
    - Using X/Open standards, for this
    you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
    Then in UBBConfig file in GROUPS section u have to set Openinfo.
    It also depend on which database you are going to use.
    In your service now you need to call tpopen() API from tpsvrinit() function.
    - Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
    EXEC SQL Connect ...

  • How to connect informix database from informatica through JDBC instead of ODBC

    How to connect informix database from informatica through JDBC instead of ODBC.

    Hi mate,
    You may get fast reply for this in informatica forums.
    Thanks
    http://mkashu.blogspot.com

  • How to connect to db from sql navigator ?

    database active and working.
    login from web working normally.
    how to connect to db from sql navigator ?

    Remote connections generally need three bits of information, whether its an oracle, odbc, or some other type of client ...
    1. Where does the database "live" (hostname or IP address)
    2. What port is the database listener "listening" on for connections
    3. What is the database service name or $ORACLE_SID
    Default port is 1521, if its an XE install the service name is XE out-of-the-box (as set up by the installer and no DBA intervention.)

  • How to connect external sensors to labview?

    i want to ask How can i connect external sensors to NI labview for my final year project.? here are my lists of sensors:
    a. Temperature sensor (LM35)
    b. Humidity sensor (HH10D)
    c. Light sensor (LDR)
    d. Moisture sensor

    simply_me wrote:
    I've used the NI's bread board (with DAQ assistant initially) when I was in school. We used it for temp, light, and etc... measurements, the whole system is very straight forward. I would say having the option to simulate signals is a big plus in that. From what you described, I don't think the "slower" rate of data acquisition will disturb you at all. But more information is needed on your sensors and  general functional spec. 
    @ NIquist & RTSLVU, please correct me if I'm misleading/wrong :-)
    Is that the ELVIS stuff?  Very neat but kind of pricey (unless the school is paying! )
    Again, the low-cost USB DAQs from NI or MC are the way to go for the OPs project.  I am assuming that he has enough electronics background to make simple signal conditioning circuits for his sensor chips.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • How To : Call External Webservice from BPEL and pass SOAP Message to the WS

    Hello All-
    Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
    <strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
    <strong>2. Transform the message</strong>
    <strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
    I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
    If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
    Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
    I am new to Webservice integration using BPEL and would really appreciate your help.
    Thanks In Advance
    Regards,
    Dibya

    Hi Dharmendra,
    I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
    I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
    I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
    This is what I see in the TCP monitor, please note the double SOAP env:Body:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <env:Header>
    <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
    <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
    <wsa:Metadata>
    <device xmlns:hl7="urn:hl7-org:v3">
    </device>
    </wsa:Metadata>
    </env:Header>
    <env:Body>
    <RCMR_IN000002NR01>
    </RCMR_IN000002NR01>
    </env:Body>
    </RCMR_IN000002NR01>
    </env:Body>
    </env:Envelope>
    Any help is appreciated.
    Regards,
    Aagaard
    Edited by: Aagaard on Oct 30, 2008 8:59 PM
    Should have mentioned. I am using BPEL 10.1.3.4
    Edited by: Aagaard on Oct 31, 2008 8:43 AM
    I have opened a new thread for this question so as to not confuse the issue more than necessary.
    How many SOAP envelopes do you really need?

  • How to  include external javascript and css resources to a jsf?

    I need to include external css and javascript files to my jsf page. Using the code below does not work because all the styles on the css page are ignored and the functions within the js files are not executed.
    <link rel="stylesheet" type="text/css" href="/resources/styles/style.css" />
    <script language="JavaScript" src="/resources/javascript/util.js"></script>When I try to execute any js function within a script tag on a jsf page I get an object expected error.
    I googled about my problem and found this piece of code for importing styles for an external css.
    <style type="text/css">
    @import url("/resources/styles/style.css");
    </style>How could I add an external javascript file to my jsf?

    Used the relative urls in my first post as well as these, and both were not working.
    <link rel="stylesheet" type="text/css" href="./resources/styles/style.css" />
    <script language="JavaScript" src="./resources/javascript/util.js"></script>The ./ tells that the external file can be found by starting at the current directory and working down the path to the specified file. This is my directory structure. Index.jsf is the file that references the external js and css files.
    -Webcontent
    |_index.jsf
    |_resources
    |__styles
    | |__style.css
    |__javascript
    |__util.js
    Either way I still can't reference the files that I need. Calling a javascript function results in an object expected error, and the styles are ignored.
    If I include the js file directly in the jsf then I can get it to work. I don't want to do this because I have created a handful of seperate js files, and do not want to include all of them in one page. I am using myfaces and tomahawk if that helps.

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • How to add external call from Report Painter

    Hi experts,
    I'm working on a report painter, and I need to do an external call, from the generated code.
    add something like this    PERFORM Z_CALCULO_IMPORTE_COMPENSADO(ZCASS_FFMRBCS)
                                                                                    USING CUR-TAB
    Is there any way to do it without an SSCR key?
    Thanks in advance

    HI  Pradeep,
    Goto the transaction code (Change Report) GR32.
    Give you library name and report name
    And click on the column (application tool bar or F7) button then place the curser on the screen where you want column (please note you have to keep curser on the header section u2013Red column text) right click and insert element. Then you select formula as selection element  and enter. You will get the enter formula box. Then you can type your formula and continue. This will add new column to the report.
    How to enter formula: you can see the formula components in that id and description.
    Id is columns that are present and description indicates explanation of that column.
    Enter formula according your requirement.
    Examples:
    Enter formula screen:
    ID :    des
    X001  amount
    X002  pt000
    X003  test
    1. Enter formula as: ( X001 u2013 X002)
    The above formula is for fist column u2013 second column.
    2. ( ( X001 u2013 X002) / X003) * 100
    First column u2013 second column and devide by third column after that multiple with 100.
    Hope this will help you
    Regards
    Manohar

  • How to connect external database with SAP

    Hi,
    How to get the data from an external database into SAP by directly linking the SAP Program to the external database.
    Regards
    Guhapriyan

    Hi,
    http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
    This might help,
    Regards,
    Gaurav

  • How to execute external command from SAP

    Hi gurus,
    i need to execute an external command from a Sap (rel ECC.5.0) to a server UNIX (no SAP); precisely i have to write a file into a directory in unix server.
    I see transaction SM49 and Sm69 but i don't know how can i use these features.
    Please coul'd you help me or give me a documentation.
    Thank's in advance
    Maurizio Ortolani
    email. [email protected]

    Hi Maurizio,
    i do it in this way:
    CONSTANTS: CMD_LS(50)   VALUE 'ls -al /transfer/sap'.
      DATA: BEGIN OF ITAB_LS OCCURS 0,
              LINE(200),
            END   OF ITAB_LS.
      CALL 'SYSTEM'
        ID 'COMMAND' FIELD CMD_LS
        ID 'TAB'     FIELD ITAB_LS-SYS.
    How do you write the file, via an UNIX-COMMAND than try the above call
    with your command.
    Another way is to write the file via OPEN DATASET ..., TRANSFER ... TO ..., CLOSE DATASET.
    If you mean this i can give you an example.
    Hope it helps.
    Regards, Dieter

Maybe you are looking for

  • How to access PI NFS Directory

    Hi Frnds, I am trying to access my PI server NFS directory, to test my all developments for time being. This is the path of the directory u201C/usr/sap/interfaces/xd5ftp/sourceu201D . but i am unable to access. My PI server installed at client locati

  • My ipad no longer shows up as a listed device on my computer

    Several days ago my computer received a Windows 7 update. Since then my ipad no longer shows up when I hit the Start button and go to "Computer". Up until recently it had been listed as a portable device. I switched USB ports, but that didn't help. I

  • Keyboard issues with IOS 8.02 and iPad Air

    Does anybody know how to fix the following issue... When using iOS8.02 spotlight search on my iPad Air in Landscape mode the keyboard (Apple keyboard, not 3rd party) stays on the side of the screen. Spotlight search is in landscape mode...but the key

  • Diffc'e between 4.7 and 6.0 in abap hr

    Hi experts, can u say the differences between 4.7 and 6.0 in hr abap.

  • Firefox freezes upon opening, although I have uninstalled the Skype toolbars add-on

    I tried opening it in Safe Mode (with all add-ons disabled) and it ran fine. I enabled the skype add-on and FF died, so my best guess is that the Skype add-on was the problem (I could enable or disable, but not uninstall). I uninstalled the add-on fr