External file with javascript

i have a page with a javscript:
<ui:composition>
<f:view>
<h:form>
<.script >
function prova(){
alert('hello!');
<./script >
<h:commandLink id="..." value="..." action="..." onclick="prova();" />
</h:form>
</f:view>
</ui:composition>
it is possible to use an external file with all my javascript functions?
how?
thanks

this is my page
where is htmlhead?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:s="http://jboss.com/products/seam/taglib"
     xmlns:selectitems="http://jboss.com/products/seam/selectitems/taglib"
     >
     <body>
          <ui:composition>
               <f:view>
                    <h:form>
                    </h:form>
          </f:view>
     </ui:composition>
     </body>
</html>

Similar Messages

  • Problem in loading an external file with unicode name

    Hi,
    I am working on a project which involves loading of an
    external file with unicode name for ex:
    "插入音乐.mp3
    ,插入音乐.jpg". These unicode files are
    loaded successfully when I play/publish the movie with flash player
    alone.
    But when the movie is embedded in to HTML file, it is failing
    to load files with unicode name. this works fine with English name.
    is it a bug? if not pls help.. on this issue
    Thx

    what is your code? so we can get clear picture.

  • How to extract data from XML file with JavaScript

    HI All
    I am new to this group.
    Can anybody help me regarding XML.
    I want to know How to extract data from XML file with JavaScript.
    And also how to use API for XML
    regards
    Nagaraju

    This is a Java forum.
    JavaScript is something entirely different than Java, even though the names are similar.
    Try another website with forums about JavaScript.
    For example here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3

  • Hi can NE one tell me hwo to open an external file with it's defualt viewer

    hi can NE one tell me hwo to open an external file with it's defualt viewer
    e.g. open a .mdb file in access or a .txt file in notepad
    thnx
    help would be much apreciated

    hello can NE one help me?????

  • Openeing external files with defualt open settings

    hi can NE one tell me hwo to open an external file with it's defualt viewer
    e.g. open a .mdb file in access or a .txt file in notepad
    thnx
    help would be much apreciated

    hi,
    this is what i use on a win2000 platform:
    try {
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("cmd /c start yourFile.ext");
    } catch(Exception e) {
    System.out.println(e);
    it is possible that a full path of the file is required.
    good luck

  • Opening an external file containing javascript code

    I'm trying to develop a PDF in two languages. When pushing a button, all questions and list-of-values for possible answers should be translated.
    I created and initialized several variables with the two language phrases with javascript. Everything is inside my code.
    Is there anyway that when a button is pressed an external file is read, bringing that javascript code for questions ans list-of-values? My concern is that currently I have a duplicated code, but if I want to implement three, four languages it will grow without control.
    This is an example I wrote in my code:
    var TxtAuxL1ESP = new Array();
    var TxtAuxL1ING = new Array();
    TxtAuxL1ESP[0]=", como ";
    TxtAuxL1ING[0]=", such as ";
    TxtAuxL1ESP[1]=": el último año ha obtenido ";
    TxtAuxL1ING[1]=": last year it obtained ";
    TxtAuxL1ESP[2]="%, en los últimos tres años ";
    TxtAuxL1ING[2]="%, in the last three years ";
    TxtAuxL1ESP[3]="% y en los últimos cinco años ";
    TxtAuxL1ING[3]="% and in the last five years ";
    if (P1.BtnIdioma.border.edge.stroke == "raised") {
        var TxtAuxL1=TxtAuxL1ESP;
        var TxtAuxL2=TxtAuxL2ESP;
        var TxtAuxL3=TxtAuxL3ESP;
    else {
        var TxtAuxL1=TxtAuxL1ING;
        var TxtAuxL2=TxtAuxL2ING;
        var TxtAuxL3=TxtAuxL3ING;
    What I was thinking is to store TxtAuxL1ING in one file, TxtAuxL1ESP in another file and read them from my javascript code inside the PDF. Is it possible?
    Regards
    JC

    Hi,
    maybe this solution ist interesting for you.
    It populates form fields with data read from an attached XML file.
    http://thelivecycle.blogspot.de/2011/01/populate-data-from-attachment.html

  • Working With Two External Files With T-SQL Commands

    Hi friends,
    In a VSTO Excel AddIn of mine I have come across a need to use T-SQL commands before bringing the dataset on the activesheet, derived from two tables in the shape of external CSV files. However,
    since using SQL Express in this regard requires connection to a server. With Visual Studio as well as SSMS installed on my laptop I'm able to use the said facility but I am unable to distribute such an addin to other team members not having any of the studios
    installed nor access to any server.
    Is there any way to use the similar features on the users' side?
    In other words, how to develop a macro, for example, in which I could consider two CSV files as two different tables as in a database, and carryout some T-SQL functions/commands on the same like:
    UNION of first three columns from both the tables;
    Creating a temporary table with the DISTINCT sets of the said three columns; and
    Then carryout LEFT JOINS between the new table and the earlier two tables;
    to derive a simple comparative dataset?
    Looking forward for you experts' valuable advices in this regard.
    Thanx in advance.
    Thanx in advance, Best Regards, Faraz A Qureshi

    Hi FARAZ,
    As with Excel files, you can also use Odbc driver to connect to CSV files. As long as the user's machine installs the ODBC driver, you can OdbcConnection to connect to the CSV files.
    The sample code to manimulate CSV files with ODBC driver(C#):
    string connectionString = @"Driver={Microsoft Text Driver (*.txt; *.csv)}; Dbq=C:\; Extensions=asc,csv,tab,txt;";
    using (OdbcConnection conn = new OdbcConnection(connectionString))
    conn.Open();
    string sql = "SELECT u.UserName,u.Age,c.Phone,c.Address FROM user.csv u left join contact.csv c on u.Id=c.UserId";
    using (OdbcCommand cmd = new OdbcCommand(sql, conn))
    But if you want to publish the Add-in to the user's machine, you still need to install the .Net Framework and the VSTO runtime to support the Add-in.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Launch file with JavaScript

    As there's no JavaScript forum I thought this would be the best place to post this.
    I am developing a tool for use internally on my network. I want to click on a link and would like it to launch a file (XML, XSL and Word files).
    Is there a way to do this with JavaScript?

    Where is this file located? On the server? On your local machine?
    All you need is a standard <href> link to the file which will download it.
    The browser will load the appropriate handler based on the type of file.
    No javascript required.

  • Open file with javascript

    Hello all ,
    I used the package in the Denes Kubicek demo page: http://htmldb.oracle.com/pls/otn/f?p=31517:118:651492651950833::NO, to Export report data into XML file and it works fine.
    I'm now using it in a Shared process being called from Javascript in the page, my problem is that in this way i can't download a file.
    Javascript
    <script type="text/javascript">
    function carregar_report_id()
    var temp_ir_id = document.getElementById('apexir_REPORT_ID').value;
    var temp_page_id = document.getElementById('pFlowStepId').value;
    var ajaxRequest = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=CARREGAR_REPORT_ID',0);
    ajaxRequest.add('GLOBAL_IR_ID',temp_ir_id);
    ajaxRequest.add('GLOBAL_PAGE_ID',temp_page_id);
    var ajaxResult = ajaxRequest.get();
    if(ajaxResult)
              //document.getElementById('teste_listagem').innerHTML = 'update_selected_template:' + ajaxResult + '
              //alert("XML criado: " + ajaxResult);     
              document.write(ajaxResult);
              //document.getElementById('xml_div').innerHTML = ajaxResult;          
    else
    alert('Erro de Aplicação, #create_ir_xml# contactar administrador!');
    ajaxRequest = null;
    </script>
    Shared Process
    DECLARE
    id_region NUMBER;
    BEGIN
    select region_id into id_region from apex_application_page_regions where APPLICATION_ID= :APP_ID AND PAGE_ID= :GLOBAL_PAGE_ID AND SOURCE_TYPE='Interactive Report';
    export_xml_pkg.print_report (id_region,'RelatorioIR_'||:GLOBAL_PAGE_ID,:GLOBAL_PAGE_ID);
    END;
    How can i open the xml file in a new tab with javascript??
    Regards Pedro.

    As a short term workaround, you could package it with Firefox on the USB flash drive to work around the tendency of the installed Firefox to look to its own profile folder.
    Possible discussion forums:
    (1) Add-ons - https://forums.mozilla.org/addons/
    Not sure if they talk about webapps or just the more conventional kinds of add-ons.
    (2) Mozillazine - http://forums.mozillazine.org/
    Again, not sure there is a board for this yet.

  • Search in external files with Oracke DB?

    Is it possible to use Oracle DB to search in external files (Excel and Word)?
    If yes, does it work in version 7 and 8 also?
    Per Magne

    Is it possible to use Oracle DB to search in external files (Excel and Word)?
    If yes, does it work in version 7 and 8 also?
    Per Magne Yes it is possible. The name for this feature is different in each version and I recommend to use 8.1.7 or 9i and you can use a FILE_DATASTORE.
    Oracle is using a third party apllication (INSO-Filter) to covert excel,word,... to html and index these.
    7/8 context option (or cartridge)
    8i Intermedia Text
    9i Oracle Text
    For further in see the documention here on technet.
    Thomas

  • Open an external file with as2??

    Im building a portfolio on Flash.I have created my menu buttons and need to open files with doc, pdf, avi and swf extentions.
    So far I have been using the getUrl command and it seems to work for the pdf and swf. How can I get this to work for the other types?
    They all seems to work when I try them from my computer, but once they are burned in the cd, it fails miserably. Help!!!!

    adjust your security settings to allow your cd to be in the trusted zone and retest to confirm this is a security sandbox issue:
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l

  • How to use elements in .css file with javascript in the jsp

    I have a jsp in which i need to show some links with the background colour.The links depends on certain conditions which is known.But the requirement is that the background color should be grey and white alternatively. I could have hardcoded the background color with the link. But the problem is that all the links are not visible to all users. The background color is defined in the .css file. I need to check the background color for the previous link. I am declaring a boolean within a jsp and then verifying the value of that boolean( in the javascript within the same jsp) so that i could know the bckground color for previous link.but i am not able to use the element in the .css element in that javascript which is having if-else loop.It's showing an error when i tried doing this. So can some one help me out how can this be done.

    Hi Shweta,
    Refer this [wiki|https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-TableDisplayinSAPScript]
    Regards,
    Sravanthi

  • How do you update an .SWF file with Javascript

    Hello - I have this Flash map that I've created. It uses
    javascript calls from within Flash to swap out hidden DIVS when a
    user clicks on a county. When the user clicks on the zip code
    region of that map, a javascript triggers the check box.
    What I need to do now is to have a way that when a user
    unclicks the check box, the zip code region in the map will be
    unhighlighted. Essentially, I need to have javascript tell a movie
    clip within the .SWF file to goto a certain frame and stop.
    I've never done this before, so I'm seeking someone's wisdom
    on how to proceed with this.
    For a visual on what I'm describing, the file can be viewed
    here:
    http://pixegen.com/sandbox/map.html

    use the flash'es externalinterface class for two way
    communication between js and actionscript.

  • Change Color Label of File with Javascript

    I need to be able to run a JS script from within Photoshop and when it's complete, change the color of the file in Finder to indicate it has been processed.  I'm talking about the red, orange, yellow, etc. highlights you can give the files in Finder.
    I know how to change these file colors in Applescript.  But I cannot figure out how to initiate the process from JS when run inside Photoshop.
    So I was curious if there was:
    A.  A way to run an Applescript from Javascript
    or
    B.  A way to define the property of a file from JS such that Finder would interpret it into a color highlight?
    Any ideas?
    Thanks

    Here is some code from X that might be of use...
    //myscript.sh MUST exist with execute permissions! 
      var script = new File("~/Desktop/myscript.sh");
      script.length = 0;
      script.lineFeed = "unix";
      script.length = 0;
      script.open("e");
      script.writeln("#!/bin/bash");
      script.writeln("osascript ... whatever");
      script.close();
      script.execute();
    Of course you would need CS3 orr better.

  • Firefox won't download PDF files with javascript:doDownload();

    I just installed Firefox version 9.0.1 hoping it would solve this problem, but no such luck. My bank allows me to download and print my bank statements as PDF files from their website. I checked the code and the button I click on implements a javascript:doDownload(); function. A small panel opens that allows me to enter the page range. I then click OK and nothing happens. An earlier version of Firefox (3.0) had no problem with this and I was able to download and save my bank statements to my hardrive as PDF files.

    I found that the problem was with the addon PDF Download 3.0.0.2
    I disabled it and was able to download and print my bank statements. I'm just not sure if I need to change the settings or completely un-install it.

Maybe you are looking for

  • Updating data from PSA to CUBE

    Hi Experts, i got a mismatch between R/3 and BW reports, one document number value has not updated in PSA and INFOCUBE, that's why it is showing wrong value in BW report, i know which value and in which field it has missed. I want to enter that field

  • Unable to create Alias in 11g

    Hi I have one product table. i am trying to create Alias on Product table. In physical layer i was right clicked on Product table. It shows all options( like New object, Update row count, view data.......etc) when i am moving cursor on New object it

  • Has anyone solved the "all mail marked as junk" problem?

    Mail marks almost all incoming mail and all sent mail as junk. I've found some inconclusive posts on this but no solution. Can anyone explain (or, better) fix this problem?

  • Returning Varrays to Client Technologies

    A lot of functions in my PL/SQL API return varrays. I've been getting some grief from programmer/users who call the APIs from various client technologies (PERL, Java). Their argument is that they are unable to work with the varray return type. When I

  • Editing photos into a slideshow

    I am a new user to Mac.  I just downloaed photos from my Canon digital camera into my MacBook Pro.  All of the photos show up in the computer, although in 3 different 'EVENTS".  I want to create a slide show but I want to rearrange the order of the p