Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - Recalling a list from within the Visu

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Warichet
    antwortet
    Hi Hartmut,
    Zitat von HartmutB Beitrag anzeigen
    See here.
    I've seen this post, but didn't realize the potential behind it. Thank you for putting me on the right track.

    Zitat von HartmutB Beitrag anzeigen
    How to get back to the visu as there is no "back" button.
    Not really a problem. I've this situation with my current setup as well.

    Zitat von HartmutB Beitrag anzeigen
    And you have to synchronize changes in the Visu with changes in the ajax.js-file manually.
    OK, once you know it ...

    My main problem is still "how to start with AJAX"
    I don't want to be flamed (I did RTFM), but reading the bits published here and in the doc seems not enough for me to start. (I must admit I dont understand 100%, but usually I get the idea)
    Could someone write "AJAX for dummies" ? Isn't that a great idea
    I guess it's not more then 5 lines, but the very early steps are important for a good start. I've some experience with vbScript, I think JS isn't much different. I used to put Java Script in a web page, but here ?!? no idea as where to put it. I guess the pages of the Visu have somehow to be translated in standard html ? before applying any JS ?

    Einen Kommentar schreiben:


  • NilsS
    antwortet
    Zitat von Warichet Beitrag anzeigen
    Hi NilsS,

    Thank you for taking the time & trouble to publish this code.
    Indeed, it could be a good starting point for non-professional programmers.
    of course only non-professional programming or you should startover writing a new ajaxvisu. What more professional could you be, using someone's else product that don't have the ability that you wan't buildin.
    Either HACK it in (non-professional) or go ask Dacom to add it or pay someone to build something from scratch with everything required for "professinal"-coding. But then you should also stay away from 3rd party logic.

    Nils

    Einen Kommentar schreiben:


  • HartmutB
    antwortet
    Zitat von Warichet Beitrag anzeigen
    Could AJAX eventually help in this case ? i.e. trigger an action on the server ?

    Hello Raymond,
    been there, done it. No not exactly me, but Alfred. See here.

    Basically it's a small hack for the ajax.js (of the PocketVisu, but should be similar with the Ajax-Visu).
    With this "hack", you can very easily jump to a web page with a Visu Button, the web page can be a HS list as well. Tested it with my PocketVisu.

    Of cause, there a minor issues: How to get back to the visu as there is no "back" button. You would have to use the browser back button. Or open the list in a new windows, might be better.
    And you have to synchronize changes in the Visu with changes in the ajax.js-file manually.


    Regards,
    Hartmut

    Einen Kommentar schreiben:


  • Warichet
    antwortet
    Hi NilsS,
    Zitat von NilsS Beitrag anzeigen
    Here are some untested mods to ajax.js (sorry away from HS)
    It could be a good starting point.
    Thank you for taking the time & trouble to publish this code.
    Indeed, it could be a good starting point for non-professional programmers.

    Einen Kommentar schreiben:


  • NilsS
    antwortet
    Here are some untested mods to ajax.js (sorry away from HS)
    It could be a good starting point.
    create a TXT Box with static text and ID XXARCHIV_ + your archiv HTML Abruf -> "Schlüssel für Abruf"

    Code:
    Line ~1836 hsupload/hsav/js/ajax.js       
          aVisuItem.click=getXmlAttr(aRes[0],"click")*1;
     
          /// ##archivhackstart##
                       // FIXME maybe not id
          if (aVisuItem.id.indexOf("XXARCHIV_") == 0) 
          {
            archivName = aVisuItem.icoid.substring(9,aVisuItem.icoid.length);
            // FIXME maybe not workinh in that case you can take loginData.user and loginData.pw 
            archivURL = "/shslist?"+encodeUrl("lst=" + archivName, 0, 0);
            bIgnore = true;
            xmlhttp.open("GET",archivURL,false);
            xmlhttp.send();
            bIgnore = false;
            // FIXME just outputs the xml to the html 
            aVisuItem.txt=xmlhttp.responseText;
          }
          // ##archivhackend##
          aItems.push(aVisuItem);

    Einen Kommentar schreiben:


  • NilsS
    antwortet
    I only mentioned SVG for my own purposes, showing the content of an archive with text messages should be an easy task.

    just an example not working
    Code:
    archivurl = "[URL]http://192.168.xxx.xxx/hslist?lst=puitxml&user=xxxx&pw=xxxx[/URL]";
    //          (METHOD,URL,ASYNCRON = true, SYNCRON = false)
    xmlhttp.open("GET", archivurl, false);
    xmlhttp.send(null);
    respXML = xmlhttp.ResponseXML();
    ....
    do some xml stuff with getDocumentByTagName("archivrowname") ...
    to get the required archiv fields and make htmlcode from it.
     
    ...
    xxARCHIV_puit.innerHTML = yourCreatedHTML;
    i reused the HSAV ajax.js xmhttp object, but i think you should create an own object, cause the readystateobject might catch up the data too.

    Einen Kommentar schreiben:


  • Warichet
    antwortet
    Zitat von NilsS Beitrag anzeigen
    I thought about getting archive data to show graphs with SVG.
    Looks great, indeed, but
    Please note that Adobe has announced that it will discontinue support for Adobe SVG Viewer on January 1, 2009.
    Isn't it a pitty to start a new project with a discontinued product ?
    Maybe this announcement is only valid for Adobe ?
    As a non-professional programmer, this kind of project is a serious investment in time.

    I was thinking about a more basic solution.
    I thought having a button in the Visu, which triggers a Java Script wich in turn triggers an action on the server wich eventually opens a browser on the client, displaying the requested archive in html.
    But my lack of knowledge prevents me from evaluating the feasability of this alternative.

    Any opinion from the specialist and AJAX gurus ?

    Also, I've read all the posts about AJAX since the beginning, but it's still difficult to get a clue about how to start. The doc doesn't help much. Once started, I'm sure it isn't much more difficult than any other technology, but what I would like to see is a step by step procedure to get a "Hello world".

    Einen Kommentar schreiben:


  • NilsS
    antwortet
    Hi,

    i thought about the possibilities of modifying the ajax.js too.
    if you change your format of the archive to xml you can access that archive with JS. I thought about getting archive data to show graphs with SVG. I would write an own function zo access the xmlhttprequest and get your archive either syncron (or asyncron for allready openend boxes). you could use a box like the one for XXPOP and XXPAGE, maybe xxARCHIVE_puit and fill the innerHtml of that box with the data XML data of the archive. With this kind of modification you could also add activeX Elements like webcam applets or alot of other funny things.

    http://svglbc.datenverdrahten.de/?code=geturl&znr=on (to view graphics install http://www.adobe.com/svg/viewer/install/main.html)
    www.backbase.com


    Nils

    Einen Kommentar schreiben:


  • Warichet
    antwortet
    Zitat von Michel Beitrag anzeigen
    There´s no way to access to an archive just by clicking a button inside the client or browser.
    Could AJAX eventually help in this case ? i.e. trigger an action on the server ?
    Haven't done anything with it yet.

    Einen Kommentar schreiben:


  • Michel
    antwortet
    In case you want external visitors to access to the list like
    http:10.0.1.249/hslist?lst=puits&user=warichet&pw=xxxxx
    just route external port 80 to the internal IP of your HS.

    There´s no way to access to an archive just by clicking a button inside the client or browser.

    Maybe a "Webabfrage" in connection with the "Ringspeicher" could help.
    Or the Ringspeicher itself : put the records in the Ringspeicher. Then you may display the records inside the Visu using 14-byte Textelements.

    Einen Kommentar schreiben:


  • Warichet
    antwortet
    Zitat von Michel Beitrag anzeigen
    you want to display an archive by sending an IP-Telegram like "http:10.0.1.249/hslist?lst=puits&user=warichet&pw=xxxxx" within the client or the browser without a tool like Alfred´s HS-Browser or c-move?
    Hemmm, I must admit I've lost my track . I didn't document the set-up on paper
    I've done it for a couple of buttons, but now that you ask the question ... this UDP/broadcast and port 7008 gives me a click....
    So, you are right, like always .
    I wonder how I could find my track again, but I guess it's rather a question for Alfred. There must be some log or so of those setup ?

    But beyhond my punctual problem, I question my setup as a whole. I understand I should have c-move on each client, but that's something not possible for Internet visitors. Some kind of dead-end.

    Thank you very much for the hint.

    Einen Kommentar schreiben:


  • Michel
    antwortet
    Did I got it right that you want to display an archive by sending an IP-Telegram like "http:10.0.1.249/hslist?lst=puits&user=warichet&pw=xxxxx" within the client or the browser without a tool like Alfred´s HS-Browser or c-move?

    Einen Kommentar schreiben:


  • Warichet
    antwortet
    Zitat von Michel Beitrag anzeigen
    I do not understand what you´re going to do with sending IP-Telegrams and showing an archive in the browser?
    Mmmm
    I thought it was a good idea
    Let's take a practical example: in the Visu, I display the water level of a pit. So it shows the current level. But you might want to know the level of the previous days, so an extra icon is provided to launch a display of the List.
    Also, when a car enters the property, the passage is archived with a time stamp. An icon in the Visu is used to check for eventual visitors during absence.
    One could use the same idea for displaying the outside temp from the previous days etc.

    Einen Kommentar schreiben:


  • Michel
    antwortet
    Raymond, I do not understand what you´re going to do with sending IP-Telegrams and showing an archive in the browser?

    Einen Kommentar schreiben:


  • Warichet
    hat ein Thema erstellt HS/FS - √ - Recalling a list from within the Visu.

    - √ - Recalling a list from within the Visu

    Hi,

    I've an understanding problem about recalling a list from a button in the Visu.

    I've several of those buttons in the Visu which call related lists, it works fine.

    Now I realize it doesn't work from another client PC.
    NB: the archive itself is OK (see Puits-Archive.JPG)
    I can call the list by explicitely specifying the URL like: http:10.0.1.249/hslist?lst=puits&user=warichet&pw=xxxxx
    Associated with a button, I've defined the "Telegramme senden" (see Puits-Telegramme.JPG) by specifying my own IP address, obviously, this will not work from another client.

    How should I define this "Telegramme senden" in such a way it is generic, i.e. works from any PC ?

    I've tried to put the IP address of the HS (10.0.1.249) but this doesn't work (sender and receiver are the same).

    Thank you for any hint.
    Angehängte Dateien
Lädt...
X