Skip navigation
felixnicolas
Currently Being Moderated

fadIt+SpryData !!!

May 3, 2012 8:48 AM

Hi,

 

I created a website and want to make it more efficient. I use spryData for a list with links:

 

test.html

<a href="#" onclick="fadeIt('apDiv1','kartei/karte_a/karte.html'); return false;">

.

.

.

and now I want to use SpryData also for the karte.html.

 

<script type="text/javascript">

<!--

 

var ds_karteikarte = new Spry.Data.HTMLDataSet("karte/karte_a/karte_datenbank.html", "daten_karteikarte", {useCache: false });

//-->

</script>

 

</head>

<body>

 

<div id="navigation_karte" class="print">

     

      <p align="left">

      <div spry:region="ds_karteikarte">

        <table>

          <tr spry:repeat="ds_karteikarte">

            <td>{Bild}</td>

            </tr>

        </table>

      </div>

 

Now, when I preview karte.html, all Data ist shown, wenn I review the test.html, only {name} apears in the apDiv1.

 

What is wrong?

Please help.

 
Replies
  • Currently Being Moderated
    May 3, 2012 3:15 PM   in reply to felixnicolas

    It is best to upload the files and supply a link to the site.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    May 4, 2012 5:38 AM   in reply to felixnicolas

    Far too many problems within ds_ehf.html. Where is the data supposed to come from?

     

    anwaelteanwaelte_IEanwaelte_de+ep+raanwaelte_de+ep+ra_IEtechExpertentechExperten_IEphysikphysik_IEelektroelektro_IEmaschinenmaschinen_IEchemiechemie_IEmarkenmarken_IEdesigndesign_IEstrategiestrategie_IEerfindererfinder_IEkanzleileitungkanzleileitung_IE
    test

     

     

    There is no document declaration (DOCTYPE), no HTML element, no BODY element, the rows do not line up, there are multiple </table>'s without an opening tag.

     

    Clean the code up first and we'll have another look at it.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 6:46 AM   in reply to felixnicolas

    Short answer: it is possible to have a div filled with data as per

    _Capture.jpg

    But not the way that you are trying. A SpryDataSet obtains its data from various sources such as XML, CSV, JSON and HTML. The data, however, must be presented in a format similar to that of a (SQL) database as per

    database

         table(s)

              record(s)

                   field(s)

    To translate this using an HTML document containing a table with data, the format is

    path and name of the document (e.g. myData.html)

         table element(s) and id (e.g. <table id="myData">

              row element(s) (e.g. <tr>)

                   cell element(s) (e.g. <td>)

    The cell should contain a precise piece of information like firstname, lastname, adress etc. You cannot place a whole series of information into the cell as in

    <td width="180" valign="top">

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_aaaa/karte.html'); return false;">test</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_andh/karte.html'); return false;">Andresen, Heiko</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_aufc/karte.html'); return false;">Aufhauser, Christoph</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_besm/karte.html'); return false;">Beschnidt, Martin</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_bram/karte.html'); return false;">Brand, Martin</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_dros/karte.html'); return false;">Drost, Stephan</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_eppw/karte.html'); return false;">Epping, Wilhelm</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_fiss/karte.html'); return false;">Fischer, Siegfried</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_fisv/karte.html'); return false;">Fischer, Volker</a> <br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_fuca/karte.html'); return false;">Fuchs, Alexander</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_graa/karte.html'); return false;">Gramm&uuml;ller, Astrid</a><br/>

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_gros/karte.html'); return false;">Gr&ouml;ger, Stephan</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_hecd/karte.html'); return false;">Heckel, Dieter</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_heif/karte.html'); return false;">Heidrich, Frank</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_heru/karte.html'); return false;">Hermann, Uwe</a><br />

      <a href="#" class="eng" onclick="fadeIt('apDiv1','karteikarten/karte_hofc/karte.html'); return false;">Hoffmann, Claudia Viktoria</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_kafv/karte.html'); return false;">Kafka, Veit</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_kant/karte.html'); return false;">Kanzian, Tanja</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_ko_h/karte.html'); return false;">Ko, Han Bong</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_kolf/karte.html'); return false;">Koller, Florian</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_kuht/karte.html'); return false;">Kuhlmann, Thomas</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_lamm/karte.html'); return false;">Lambacher, Marion</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_leic/karte.html'); return false;">Leinung, Christian</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_letm/karte.html'); return false;">Lettenberger, Michael</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_liem/karte.html'); return false;">Liebelt, Mechthild</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_lina/karte.html'); return false;">Lindner, Adrian</a><br />

      <a href="#" onclick="fadeIt('apDiv1','karteikarten/karte_linm/karte.html'); return false;">Linhardt, Melanie</a><br />

    </td>

    In the above, all of the information in the cell will be regarded as one piece of data which should have have the column type set as "html" because of the translation needed for the imbedded markup.

     

    I am not sure what you are trying to achieve, but I do know that you need to start with a basic application and work on from there. A good starting point is here http://labs.adobe.com/technologies/spry/samples/htmldataset/index.html.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2012 5:53 PM   in reply to felixnicolas

    Please have a look at this discussion http://forums.adobe.com/thread/467798

     

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points