How to update Spry-table and present the updated table in a div element?

Hello!
I am using a very interesting AJAX-framework called Spry when designing a web page. Here the web page is: Link.
I need some help.
Every time a new project or shift is added, the changes are written to an xml-file. When the page is reloaded, Spry reads data from xml-files.
This is caused by this code:
dsProjects = new Spry.Data.XMLDataSet("timetable/projects.xml", "projects/project");
dsShifts = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project/shift"); //look inside projects.xml and //extrac xml-file. url
dsName = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project");
I call this function that I have written: loadProjectsIntoDivElement ().
This function does the following: [See attached code.]
It iterates through the Spry-datastructure and puts the data in a table inside of the div-element called 'projectsList'.
Now, when I add a new project, I want it to be inserted into the Spry-datastructure and then cause the new data to be written into the div element called 'Specials_DIV'.
I have found out how to update a Spry-datastructure (e.g. dsProjects above), but I don't know how to update the table containing the data without refreshing the page. This should be done using Spry.
Some code:
1:
2:
3:
function loadProjectsIntoDivElement () {
$('#projectsList').html('');
$('#projectsList').append('<table id="Specials_Table"><tr><th spry:sort="id">ID</th><th spry:sort="NAME">Name </th><th spry:sort="hoursestimated">Nr. of hours estimated</th><th spry:sort="hoursworked">Nr. of hours worked</th><th spry:sort="costperhour">Cost per hour.</th></tr>{function::init_hours}<tr spry:repeat="dsProjects" onclick="chooseProject({ds_RowID})"><td>{id}</td><td>{NAME}</td><td>{hoursestimated}</td><td>{hoursworked}</td><td>{costperhour}</td></tr></table><br/>{function::get_hours}<br/>');
I have tried to accomplish this in various ways but I don't succeed.
I want to do it without refreshing the page.
Update: I found some code here that I will try: Link
Thanks in advance!
Anders Branderud
My blog

Hello!
Thanks!
I don't succeed with the implementation in any browser.
I have found a way to it, but I would like a way that updates the data quicker and without reloading all of the page. After all, I am only adding one row on the end of the data structure, so there should be no need to read in all data again.
Now I do it like this:
When a project is added, do this:
1. Store a new row in the project file through a php script.
2. When the post-call to the php-file returns, do refresh of the whole page.
Then the newest version of the xml file will be read in.
However, I don't want to read the data from a xml file each time that a new project is created.
I know how to add the new data to a Spry-datastructure [in my code 'dsProjects'], but I don't know how to display the updated data without reloading the whole page.
I have tried some various ways to do it, but haven't succeded.
Thanks!
Anders Branderud

Similar Messages

  • How to force BI Server to pick from the Agg table and not the Fact table?

    Hi All,
    I have 3 tables as the Sources in the Key measures. 2 are fact tables and the other one is the agg table.
    E.g.
    Fact 1 at A,B,C,D and E level
    Fact 2 at A,B,C level
    Agg at A,B,C level which contains the measures from the Fact1 and Fact2
    So when I select the measures from the Agg which are coming from Fact1 the Agg table get fired and when I select measures from Agg which are coming from Fact2, the Fact2 table gets fired in the SQL Query.
    Now my question here is there anyway to tell BI Server that when I select Fact2 measures fire the Agg table and not the Fact2 table. The reason being the Agg and Fact2 tables are at the same level.
    But I need to keep the Agg table as it is one level higher than the Fact1 tables.
    Any pointers would be helpful.

    hi,
    you explain us your situation really good.but you forgot to tell us the most import,the measures in aggregate table and the aggregated dimensions.
    meaning,you have 7 measures aggregated in some levels of your dimensions tables?if yes,there is no possibility Bi goes anywhere else..(by choosing only these measures and the defined levels at your dimensions..)
    One more thing,if you choose a combination of your 2 fact data sources,bi goes?where???
    hope i helped...
    http://greekoraclebi.blogspot.com/

  • HT1600 my software update fails every time I attempt to update. I have restarted the device, selected software update but when it get to the end of "preparing software update", it fails and says the update was not successful. any ideas?

    my software update fails every time I attempt to update. I have restarted the device, selected software update but when it get to the end of "preparing software update", it fails and says the update was not successful. any ideas?

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.

  • How to export internal table and pass the internal table to another screen?

    Hi,
    I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The type of "OUT_SELECT_ITAB" cannot be converted to the type of  "itab_result".
    Another question is, how to pass the internal table that i export out from the function module to another screen?
    Here is the code
    ==============================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"     REFERENCE(OUT_SELECT_ITAB) TYPE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    Please advise. Thanks
    Regards,
    Rayden

    Hi Nagaraj,
    I try to change it in Tables tab page but it state that TABLES parameters are obsolete. when i "Enter". I try to "Enter" again. it seem to be ok but it stil give me the same error.
    ================================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"  TABLES
    *"      OUT_SELECT_ITAB STRUCTURE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    regards,
    Rayden

  • I have updated Firefox, downloaded and install the update but everytime I open Firefox, I am told that I do not have the latest version, why?

    I have downloaded the update and installed it a few times and I still have the same issue, (not having the latest version). I am running windows XP.

    If you see the message in here: www.google.com/firefox
    '''you are updated '''see your user agent :
    Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 '''Firefox/9.0.1'''
    all you have to do is to '''set another page as the home page''', as '''cor-el '''said with very detailed explanation in [https://support.mozilla.org/en-US/questions/905310 here]
    '''copied from cor-el reply:'''
    "That text about not running the latest Firefox version is hardcoded on the www.google.com/firefox site that previous Firefox used as the home page and Google doesn't seem to maintain that page anymore. Current Firefox versions no longer use that Google site as the home page, but use the build-in about:home page as the home page. So Google assumes that you use an older Firefox version if you still visit that site and warns you about that and suggests to update. You can use another page as the home page like about:home or www.google.com or www.google.com/ig (iGoogle)."
    [https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page How to set the home page]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Updating 1 imac and install the update on 12 imacs

    Hello,
    iam working on a network containing about 12 imacs with different models
    and all of them is using snow leopard, yesterday i was downloading updates to all of them
    every single one is downloading 800 M.B. from internet
    Is there any way to download the update only 1 time then install the updates to the other imacs ?

    Hi
    you can
    1: browse http://support.apple.com/downloads/ & grab what you need (much the easiest way, unless there's a ton of them going back a time)
    or (not worth the effort, usually)
    2: get a list of update names by entering this in Terminal
    softwareupdate -l
    you should get a list of results like
    Software Update found the following new or updated software:
    * iTunesX-10.0.1
    iTunes (10.0.1), 84333K [recommended]
    * SecUpd2010-006Snow-1.0
    Security Update 2010-006 (1.0), 928K [recommended] [restart]
    then use
    softwareupdate -d nameofupdate
    an example name from the list above would be SecUpd2010-006Snow-1.0
    This will download the package(s) to /Library/Updates

  • I keep on getting a warning to update my security and hit the update button but the "connecting to the update server" runs and runs but never connects."

    I have repeated been confronted with a warning that my Firefox (vers. 5.0) needs to be updated for security reasons. I hit the button to launch the update and another window pops up with a "connecting the update server" message. I runs but never connects. I have gone through this exercise perhaps some 10 times or so with no update being successfully accomplished.

    If there are problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 6.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox

  • TS1398 my iphone 4s was updated to ios6 and after the update it became unable to join my office network ie(QEHNET).my names are okam francis (nigeria)abia state,umuahia.

    my iphone 4s is no longer joining our esterblisment network(QEHNET) due to the update of ios6 that took place on the 7th of febuary2013,so what is the problem or is iphone nolonger the best phone again?please restore the network or give me the solution.thanks.

  • The new update will not load. I keep getting an error. How do I correct this and complete the update?

    I am new to Creative Cloud and AI. I just signed on and noticed I had an update to AI. I clicked to update and all I get is an error. How do I correct this?

    Where exactly did you get that notice?
    In the Creative Cloud app?
    What exactly did you do?
    Which system?
    Which version exactly?

  • How I fixed my iPhone and got the update to work...

    This sounds silly, but I just kept un-docking my iPhone and then re-docking it. If the error message came up, I clicked "OK" and did it over again. After about the eighth try, it went through and my iPhone is now updated. Hope this helps.

    I talked to AT&T support. They say that the Apple activation servers are down. Should be fixed "within an hour".
    So much for the stupid activation scheme via iTunes . There doesn't even appear a backup to do the activation over the phone.
    Apple seems to have a bad week.

  • How do you select n rows and not the whole table

    Hi
    I would like to only select the first 50 rows from a table and not the entire table. how do i accomplish this
    Thanks

    Sayeed's example will work great if you don't care which 50 rows you get back. If you do, you can use an inline view to sort them first and get back a ranked result set:
    select *
      from (select whatever
            from table
           order by key desc
    where rownum <= 50

  • How to update a form after changing the underlying table

    Hi All,
    I have read a few posts on this, and I know that it would have been better to not do this, but I had to add a new column to a table in order to meet a new requirement.
    See this post:
    Design Question - Slowly Changing Dimensions (I think)
    I decided that I would store the 'price' with the 'mailed_item' - so I had the actual price at the time the item was mailed. And then the MST table could be updated as needed without impacting the historic records.
    Now my issue is: How do I add another field to the form (I was thinking hidden) that would reference the price from the Mail_Service_Type table?
    Mailed_Item
    ID
    MST_ID (Mail_Service_Type FK)
    Piece_Count
    Price (**New)
    Mail_Service_Type
    ID
    Name
    Weight
    Price
    Can this be done easily, or should I recreate the form? Is is just a simple PL/SQL or SQL statement? Or should I build another process (maybe a trigger) to get the value?
    Any thoughts would be appreciated...
    Corey

    Nahman,
    Typically it's enough to re-load data used: check binding of your UI controls on second tab to context attributes and depict what nodes are used. Then re-initialize these nodes: either just via invalidating them or via re-binding elements / re-executing queries + re-binding elements.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How do I block this msg from always popping up "iTunes requires Safari 4.0.3 or later to be installed to use the iTunes Store within iTunes. Use Software Update to download and install the latest version of Safari" bc I can't download the latest software?

    How do I block this msg from always popping up "iTunes requires Safari 4.0.3 or later to be installed to use the iTunes Store within iTunes. Use Software Update to download and install the latest version of Safari". I cannot download this software bc my lap top is to old. The msg literally pops up everytime I make any moves on itunes and is VERY annoying.

    I have a 2006 MacBook with an Mac OS X version 10.5.
    In that case, try downloading a Safari 5.0.5 for leopard from the following location:
    http://www.apple.com/safari/download/

  • I downloads the latest iTunes software update and it properly installed.  But,  I cannot close the window showing it was completed and the blue completion bar is full but cannot cancel or close it either.  Any ideas on how to clear that out and close the

    I downloaded the latest iTunes software update and it properly installed.  But,  I cannot close the update window showing it was completed and the blue completion bar is full but cannot cancel or close it either.  Any ideas on how to clear that out and close the window.  Tried to quit on both the big window and the software update title in the menu bar.  No luck.

    Tried that by shutting down via the power button only as the normal shutdown was nixed by the open window issue.  It did not help.  Found a very similar question in the discussions and it recommended "Force Quit".  That worked and the update works normal and the window is gone.  Thanks!

Maybe you are looking for

  • Static NAT entry disappears when using NVI on Cisco 1921 (Multiple versions)

    We have a Cisco 1921 as an IPSec tunnel endpoint where we assign static NAT entries. It is a static one-to-one NAT putting each remote endpoint as a local /24 subnet. We are using NVI and we see some of these static entries disappear when packets are

  • FM: PROCESS_HU_INBOUND_DLVRY - wrong length of input parameters

    Hello, I am trying to pack materials into Handling Units in inbound delivery. Therefore i am using the Function Module PROCESS_HU_INBOUND_DLVRY, but it doesnu2019t work like it should. After some further investigation and debugging of the function mo

  • How do i save a midi track as a .smf?

    i need to save a looped midi region (click track) as an .smf, not a .mid. can't seem to find that option anywhere.

  • AD Admin

    Hi hussein/helios How frequent should I do AD Maintenance run on my EBS instance? Is it yearly? or monthly? I mean running maintenance for : A.Generate Applications Files menu    1.    Generate message files    2.    Generate form files    3.    Gene

  • How to install IS for retail

    Dear experts: I want to install a SAP IS for retail system, but unfortunanely I was confused with the documents in SMP. I can't find a guide with how to set up a SAP for retail system like IS for AFS. So can you exprts tell me how to do this? Is the