Menu

#41 Self-writting into HTML page

open
Ballad (1)
7
2005-02-23
2005-02-23
No

Currently, the ui code of Ballad is written by hand in
the HTML page. This means including <script/>, <input/>
and <style/> tags and that means the page is quite static.

Those things should be done by the player itself, at
instanciation time, so that the web admin has only to
include something like :

<script type="text/javascript">
var jwsreader = new
barde_log_reader_JSW(log,startDate,channels,sources,locale);
var ballad = new
barde_gui_ballad_Player("ballad","balladTable",jwsreader,style.getRenderer());
</script>

at the place where he wants the player to be inserted.

Discussion

  • Nicolas BONARDELLE

    • labels: --> 645025
     
  • Nicolas BONARDELLE

    • summary: [Javascript] self-writting player --> [Ballad] self-writting player
     
  • Nicolas BONARDELLE

    • labels: 645025 --> Ballad
    • assigned_to: nobody --> cbonar
    • summary: [Ballad] self-writting player --> Self-writting into HTML page
     
  • Nicolas BONARDELLE

    Logged In: YES
    user_id=555057

    Problem :
    --------------
    The instanciation code is dependent on the place in the page
    because Javascript is very sensitive to the order of
    declaration. For instance, a controller need a player
    (view), so it must be instanciated after the view (and so be
    after it in the page, it cannot be place above). The
    solution would be to add an instanciation method to the
    controller and trigger it by hand but it's prone to errors
    and requires more understanding of the library.

    Solution ?
    ---------------
    ActiveWidget overwrites the toString() method (native one ?)
    and then call document.write(myObject) to insert into the
    page the code for the control :
    http://www.activewidgets.com/general.doc.html

     

Log in to post a comment.