Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Where to put the <ol> &&</ol> tags in the javascript??

    Where to put the <ol>&&</ol> tags so everytime i run the javascript it numbers each indivdiual items which the javascript is looping.
    Code:
     <table  border="2"table align="center" cellpadding="40">
      <tr>
        <th width="80%"> Questions & Time</th>
        <th>Status</th>
      </tr>
       <tr>
        <td><% for (int i=0; i < theList.size(); i++) {%>
       <tr>
       <td><%= theList.elementAt(i)+ " " + theTime.elementAt(i) %>
      <% }%>
       </td>
         <td>Where is the pending goes:</td>
      </tr>
      <tr>
      </table>

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    , what language is that? It looks liek you are trying to mix classic ASP with javascript... and possibly jQuery since you are using .size()

  • #3
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am just using .java to calling in a function and html for the website coding.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,472
    Thanks
    0
    Thanked 634 Times in 624 Posts
    You have to put the entire loop inside of the one td tag and then wrap it inside of the ol tag. Not sure why you need the table though since a list isn't usually an element within tabular data. If it is tabular data then you probably need to repeat the loop for the list in every td in the column or row (depending on how the data is arranged)
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could you please demostrate with my coding above .I have try that and it doesnt seem to work . A million thanks in advance.


  •  

    Posting Permissions

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