Recent Document Loader, addEventListener with dynamic functions.

I have an application which I am trying to display a list of recent documents, that you can click on to open them.
So far they display but only the last item gets the new event and works. Here is the code that I use to generate the call.
The code is attached. Its as if the code only rembers the last added eventListner. Please help, thank you!

Jon,
The problem in your code where you use an unnamed callback function as the event listener:
     document.getElementById('recDocName' + arrCount).addEventListener('click', function() {
            OpenFile(stringName, true);},true);
Try something like this:
        document.getElementById('sdf' + arrCount).addEventListener('click', clickEventListener, true);
Then define a separate clickEventListener() function that looks like this:
function clickEventListener(event) {
    var targetID = event.target.id;
    air.trace(targetID);
    // Calculate the filename based on the targetID, possibly looking up in an Array
    // Call the funciton to open the file

Similar Messages

  • Load XML with dynamic filename

    Hi,
    I am trying to create a load xml function where I can send
    the filname to load to the function, however I get a syntax error
    with the following function, can anyone see what is wrong here?
    function loadXML(file){
    myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.onLoad = function(success) {
    if (success) {
    // Success
    } else {
    // fail
    myXML.load(path+file);
    Thanks for your advice

    I was trying to do the same thing and came across this great
    tutorial. I think your syntax is just a little off.
    myXML=new XML();
    myXML.ignoreWhite=true;
    myXML.onLoad=function(ok){
    if(ok){
    //trace('data loaded');
    allData=this.firstChild.childNodes;
    for(i=0;i<allData.length;i++){
    trace(allData
    .attributes.text);
    }else{
    trace('error');
    myXML.load('gridTest.xml');
    <?xml version="1.0" encoding="iso-8859-1"?>
    <nav>
    <but text="home">
    <heading>You are at Home</heading>
    <content>This is the text that is displayed when click
    on home</content>
    </but>
    <but text="About Us">
    <heading>You are at the about us
    section</heading>
    <content>This is the text that is displayed when click
    on about us</content>
    </but>
    <but text="Contact"></but>
    <heading>You are at Contact</heading>
    <content>This is the text that is displayed when click
    on Contact</content>
    </nav>

  • Document copy@cell with EXIT function

    hi experts,
    we are doing document created @ cell level in a version and doing version to version copy.
    we are using fox formula for normal data copy,which is working fine,
    we are trying to copy the documents @ cell level from old version to new version after data copy, by using SAP recommended EXIT function.
    we are using UPF_DOC_COPY_EXIT and UPF_DOC_COPY_INIT modules.
    but they are taking lot of time like more than 1 hour.we are terminating the process in between.
    is there any way we can copy the documents.
    thanks in advance,
    sajeevan.

    hello guys,
    for the above EXIT function.if i hard code the values instead of variables in the parameter group, it is executing in less than 30 secs. but the notes are not copied.
    but, if i use variables it is taking lot of time and also not executing.
    any suggestions?
    thanks in advance.
    regards,

  • Creating Report using EPM Functions with Dynamic Filters

    Hi All,
    I am new to BPC, In BPC 7.5 i seen like we can generate EPM report using EVDRE function very quickly and easy too. Is the same feature is existing in BPC 10.0 ? if no how can we create EPM reports using EPM Functions with Dynamic Filters on the Members of the dimension like in BPC 7.5.
    And i searched in SDN, there is no suitable blogs or documents which are related to generation of Reports using EPM Functions. All are described just in simple syntax way. It is not going to be understand for the beginners.
    Would you please specify in detail step by step.
    Thanks in Advance.
    Siva Nagaraju

    Siva,
    These functions are not used to create reports per se but rather assist in building reports. For ex, you want to make use of certain property to derive any of the dimension members in one of your axes, you will use EPMMemberProperty. Similary, if you want to override members in any axis, you will make use of EPMDimensionOverride.
    Also, EvDRE is not replacement of EPM functions. Rather, you simply create reports using report editor (drag and drop) and then make use of EPM functions to build your report. Forget EvDRE for now.
    You can protect your report to not allow users to have that Edit Report enabled for them.
    As Vadim rightly pointed out, start building some reports and then ask specific questions.
    Hope it clears your doubts.

  • Unable to get the data from a website with dynamically filled textboxes when accessing through myWb.Document.GetElementById("num1").InnerText;

    Hi Team,
    I am learning on webbrowser control and during the learning phase i have the following issue:-
    My webbrowser [mywb in this case] is successfully navigating and displaying the website content in webbrowser control. However; that site has three textboxes with dynamically allocated text from asp script
    code behind; I have tried to display these textboxes values by providing the correct id of these textboxes in my visual studio 2013 code; but I am not receiving any data except null. Can you help me on this as early as possible.
    asp code written to dynamically assign the data to textbox:-
    <%
    myvar=Request.form("some")
    Response.write("<input type=text id=num1 value=" + myvar+ ">")
    %>
    The code written in VS 2013 to access the textbox  by its id when the DocumentCompleted event is triggered:-
    string mystr ="";
    mystr = myWb.Document.GetElementById("num1").InnerText;
    MessageBox.Show(mystr);
    Thank You in Advance.
    Regards, Subhash Konduru

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because the issue is related to website, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    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.

  • Not able to copying files/folders from one Document Library to another Document Library using Open with Browser functionality

    Hi All, 
    We have SharePoint Production server 2013 where users are complaining that they are not able to copy or move files from one document library to another document library using “Open with Explorer” functionality.
    We tried to activate publishing features on production server but it did not work. We users reported following errors:  
    Copying files from one document library to another document library:
    Tried to map the document libraries and still not get the error to copy files: 
    In our UAT environment we are able to copy and move folders from using “Open with Explorer” though.
    We have tried to simulate in the UAT environment but could not reproduce the production environment.  
    Any pointers about this issue would be highly appertained.
    Thanks in advance
    Regards,
    Aroh  
    Aroh Shukla

    Hi John and all,
    One the newly created web applications that we created few days back and navigated to document library, clicked on “Open with Explorer”, we get this error.
    We're having a problem opening this location in file explorer. Add this website to your trusted and try again.
    We added to the trusted site in Internet Explorer for this web application, cleared the cache and open the site with same document library but still get the same above error.
    However, another existing web application (In same the Farm) that we are troubleshooting at the moment, we are able click on “Open with Explorer”,  login in credentials opens and we entered the details we are able to open the document
    library and tried to follow these steps:
    From Windows Explorer (using with Open with Explorer), tried to copy or move a files to
    source document library.
    From Windows Explorer moved this file to another destination document library and we got this error.
    What we have to achieve is users should be able to copy files and folders using
    Open with Explorer functionality. We don’t know why Open with Explorer
    functionality not work working for our environment.  
    Are we doing something wrong? 
    We have referred to following websites.
    we hope concepts of copying / Moving files are similar as SharePoint 2010. Our production environment is SharePoint 2013.   
    http://www.mcstech.net/blog/index.cfm/2012/1/4/SharePoint-2010-Moving-Documents-Between-Libraries https://andreakalli.wordpress.com/2014/01/28/moving-or-copying-files-and-folders-in-sharepoint/
    Please advise us. Thank you.
    Regards,
    Aroh
    Aroh Shukla

  • HP office jet pro 8600- "No document loaded" error message with OS Mavericks 10.9.1 when scanning

    I am unable to scan from either my HP officejet pro 8600 printer or  my iMac, using OS Mavericks 10.9.1.  From computer, message in sequence are:  1) Waiting for scanner 2) no document loaded and 3) scanner failed to complete the scan (this after changing defaults to match type of feed and document.  I can print and copy fine.
    From the printer, I receive the following messages:  Scan could not be completed due to one or more of the following:
    1) Connection to computer is lost, 2) The scan application or computer is currently in use (Not that I can see) and 3) OCR application is not installed on the computer (have installed and re-installed driver several times, with help of HP customer support person).
    I have spent 1-1/2 hours on the phone with an hp customer  support person trying to resolve the problem, based on the above results.  I have also read the solutions on this forum, none of which seemed to either apply or work.

    Hi Trishan,
    I know you have done a great deal of troubleshooting already and have invested more time than I am sure you would like to have, but I have a document for you to use. I have seen success from those who have used this document.
    Communication Error between the Scanner and Your Computer in Mac
    You will find, after opening the link, that the 10.9 is not listed; however, this document does apply to all of the Mac operating systems.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • I have an iMac and have been using Adobe reader successfully for sometime. Recently, however, whenever I go to sign a document on Adobe reader The document closes unexpectedly with an error statement. I have already uninstalled and reinstalled Adobe reade

    I have an iMac and have been using Adobe reader successfully for sometime. Recently, however, whenever I go to sign a document on Adobe reader The document closes unexpectedly with an error statement. I have already uninstalled and reinstalled Adobe reader with no improvement. What do I do next?

    Please post the full error message, plus OS and Reader versions.

  • Load JDBC-Driver dynamically with JarClassLoader

    Hey!
    I have a problem loading JDBC drivers dynamically with a JarClassLoader:
    Code:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        DriverManager.registerDriver((Driver)d);
        // DriverManager.getDrivers()    Enumeration is empty
        Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://Server:1433","test","test");
        DatabaseMetaData meta = conn.getMetaData();
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }Problem:
    Till the DriverManager registraton everything is ok.
    The registerDriver Method throws no exception but if I call DriverManager.getDrivers() after calling the registerDriver Method an empty Enumeration is returned.
    So the driver is not loaded and DriverManager.getConnection throws an Exception (no suitable driver).
    If I include the driver jars into the Classpath everything is running (but that isn't what I want to do).
    Is there a solution for this problem? Maybe it is possible to load the data into the AppClassLoader??!!
    Thanx in advance.

    Found a solution!
    For everyone who is interested:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        Driver driver = (Driver)d;
        Properties prop = new Properties();
        prop.setProperty("user","test");
        prop.setProperty("password" ,"test");
        Connection conn = driver.connect("jdbc:microsoft:sqlserver://test:1433",prop);
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }

  • I am trying to figure out how to clear my massage backlog of messages on Messages for Mavericks OS. I believe a lot of space is taken up by this running in the background keeping recent messages loaded. Especially with all the gif files I've been sending

    I am trying to figure out how to clear my massage backlog on Messages for Mavericks OS. I believe a lot of space is taken up by this running in the background keeping recent messages loaded. Especially with all the gif files I've been sending. Is there a way to select all and deleter? Please help! Can't find anyone who looks to do the same just lots of manuals for using the app on iphones and ipads.
    Thanks

    I am trying to figure out how to clear my massage backlog on Messages for Mavericks OS. I believe a lot of space is taken up by this running in the background keeping recent messages loaded. Especially with all the gif files I've been sending. Is there a way to select all and deleter? Please help! Can't find anyone who looks to do the same just lots of manuals for using the app on iphones and ipads.
    Thanks

  • Recently got new iMac with Lion.....when I try to load my LogicPro software, I get 'OS does not support power PC'.  Is there a download to fix or must I spend another 500 on software?

    Recently got new iMac with Lion.....when I try to load my LogicPro software, I get 'OS does not support power PC'.  Is there a download to fix or must I spend another 500 on software?

    What version of Logic do you have?
    And if you end up upgrading, it's only $199 now.

  • Reinstalling AE and PP due to an error with dynamic link. Where do i find the program install? And tips on how to reinstall without messing things up? last question is, does my recent files and saves work after the reinstall?

    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    And tips on how to reinstall without messing things up?
    last question is, does my recent files and saves work after the reinstall?
    Thank you

    karianne wrote:
    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    Which versions? Which operating system?
    Try Download and Installation Help

  • I just updated my MAC operating system and when I went to open a recent document in numbers, the document that opened had none of my data and was formatted differently.  Can I get my document with all my information back?

    I just updated my MAC operating system and when I went to open a recent document in numbers, the document that opened had none of my data and was formatted differently.  Can I get my document with all my information back?

    I suggest the easy stuff first:
    1) quite Numbers and restart Numbers
    2) reboot the computer
    After that try opening the same document in another user space

  • I recently purchased some scripts and saved them as actions but wont work with assigned function key

    i could use some help ....i recently purchased some scripts to help automate things i do with scrapbooking.... i am using cs4 and have vista...i have made actions to make it easy to use the scripts.... i have assigned function keys to make it easy to use the actions... but it doesnt seem to work with the function keys...i can run the actions by pressing that arrow/button on the bottom of the action palette but when i hit the f key nothing happens..when i first got the scripts it did work.... but now it doesnt....i deleted the actions and made them again but still dont work with f keys...what could be the problem and what do you suggest i do...others who have purchased these same actions seem to be able to use them with the f keys.... thanks for any thoughts and suggestions

    think i may have solved it myself and passing this dum thing along....on my keyboard is flock...i mustve hit it and the keys were locked...so i hit it and now they work.... oh dear.

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

Maybe you are looking for

  • Apple ID on multiple devices vs iMessage/Facetime (don't want auto setup)

    I have few devices under one Apple ID. on that Apple ID a have additional email addresses for iMessage/facetime. I don't need/want receive imessages on all devices simultaneously which was sent to one email. so I am using different email addresses on

  • Pacman port for minix

    Hello Forums, lately I discovered minix3, that cool microkernel OS. Here is an Wikipedia article about it. I gave it a shot and ran it in vmware (needs to be workstation 5 compatible or it fails), but the packagemanager ("packman"), honestly,  just s

  • Combining hor and vert spry menus

    Hi, My client wants to have their horizontal nav menu display the drop down choices horizontally like the http://www.businessweek.com/ Can this be done with a spry menu widget? (shouldn't have to add this but...) If so, how? Thanks, J

  • EXP File Corrupt

    i am using Oracle 8.1.7 with Windows 2000 server, everything was working fine but some invisible thing occured and now when i tries to use "EXP" utility it doesnt function just shows EXPORT HELP. Also i have noticed that the size of EXP.EXE in normal

  • Archive data of using DART : Job lock problem in table TSP01

    Hi , I'm facing problem while archiving from Production system to UNIX using DART. Using TC: FTW1A to data extract, once data has extracted, we need to do verifaction progess through TC. FTWE1(run a BG jobRTXWCHK4) and FTWD(BG Job RTXWCHK2). When I a