SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Porting legacy code to non-obtrusive code

    Greetings,

    I am about to port an app using html, css, and javascript where most of the content is mixed with the presentation and behaviour.

    The question I have been asked is: even though this older style is difficult to maintain, will the method proposed my the authors of Simply Javascript perform adequately on a page with hundreds of entries like the one below? Using the newer method, the program would have to iterate through all the elements on the page and assign handlers for click, mouseover, etc. Please advise.

    <tr id='LineItem' class="Line"
    onclick="SelectItem(this)"
    onmouseover="HighlightItem(this, 1)"
    onmouseout="HighlightItem(this, 0)">
    <td style='border-bottom:1px solid'></td>
    <img id=ImgLeft src='/images/pic1.gif' title='Overdue MED' style='position:relative; top:2'>
    </td>

    <td width=75&#37; style="padding-left:10px; padding-right:10px; border-bottom:1px solid #c0c0c0">
    <a href=# onclick='blur();Dialog("","1234")' class=LineName title='Show order'>IV: NS @ 125 cc/hr </a></b><br>
    <span class=LineNextAdmin style='color:myred'><font color=red>Stopped.</font></span>
    <span class=LineEndTime>End Time Expired 02/01/07 08:00</b>.</span><br>
    <span id=OD_3674 style="display:none">Overdue admins:\n\n01/30/07 00:00\n01/30/07</span>
    <a href=# onclick='blur();alert("Overdue administrations:\n\n01/30/07 00:00\n01/30/07")' class=LineOverdue title='01/30/07 00:00 01/30/07'>8 overdue admins</a>
    </tr>

    As you can see, there is a mix of content, style, and javascript all over.

    Regards,
    Huambo
    Last edited by ecunha; Aug 3, 2007 at 08:31.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •