SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with checkboxes

    I think this is probably easy but I'm rusty with JavaScript and could use some help. I have this code:

    Code:
    <form action="" method="post" name="clients" id="clients">
    <a href=""><img src="_images/archiveIcon.gif" alt="Archive Client" /></a>
    
    <table>
    	<tr><td><input type="checkbox" name="clientid[]" value="John" /></td></tr>
    	<tr><td><input type="checkbox" name="clientid[]" value="Jane" /></td></tr>
    	<tr><td><input type="checkbox" name="clientid[]" value="Bob" /></td></tr>
    </table>
    </form>
    What I'd like to have happen when the user clicks the icon, if none of the checkboxes are checked, they're given an alert telling them they have to check at least one. If one or more is checked, the alert says something like, "Do you want to archive Jane and Bob?" (or whichever ones they check). How do I do that?

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi tryin_to_learn, try this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Validate Checkboxes</title>
    <style type='text/css'>
    </style>
    <script type='text/javascript'>
    window.onload = function()
    {
      document.forms['clients'].onsubmit = formValidate;
    }
    function formValidate()
    {
      var v = [], e = this.elements;
      for (var i = 0; i < e.length; ++i) {
        if (e[i].type == 'checkbox' && e[i].checked) {
          v[v.length] = e[i].value;
        }
      }
      if (v.length) {
        if (confirm('Do you want to archive the following clients?\n' + v)) {
          return true;
        }
        else {
          return false;
        }
      }
      else {
        alert('You must check at least one!');
        return false;
      }
    }
    </script>
    </head>
    <body>
    <form action="" method="post" name="clients" id="clients">
    <table>
    	<tr><td><input type="checkbox" name="clientid[]" value="John">John</td></tr>
    	<tr><td><input type="checkbox" name="clientid[]" value="Jane">Jane</td></tr>
    	<tr><td><input type="checkbox" name="clientid[]" value="Bob">Bob</td></tr>
    </table>
    <p><input type='submit' value='Archive Clients'></p>
    </form>
    </body>
    </html>

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much, Mike. Could you (or someone) explain this part:

    Code:
    window.onload = function()
    {
      document.forms['clients'].onsubmit = formValidate;
    }
    This is for a template driven site that has tons of forms and all of the header info for the site is in a single template so I need to modify this part of the code a bit. Also, there are 8 or so of these buttons so we aren't actually submitting the form each time we click one. I tried calling the function from my button like this:

    Code:
    <input type="image" src="_images/archiveIcon.gif" alt="Archive Clients" name="archiveClient" onclick="formValidate();" />
    That works fine as long as I leave the window.onload in place, but if I take it out, it stops working. Any tips on how to get this to work without the window.onload part? Or to redo the window.onload so it's something generic that I can put in the top template and use for all forms on the site? Thanks again for the help.

  4. #4
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been playing with this some more and it's a bit more complex than I thought. The buttons on the form are inside of anchor tags that basically open a popup window. If I add the anchor tag to the code above, it stops working. Before I started trying to add the validation, here's how it looked:
    Code:
    <a href="javascript:newSmallWin('popup.php?popupContent=archiveClient');" title="Archive Client"><input type="image" src="_images/archiveIcon.gif" alt="Archive Clients" name="archiveClient" /></a>
    I tried adding the onclick="formValidate() to the input tag like in the code below. It still goes to the popup but doesn't call formValidate and it gives me these error messages:
    e has no properties
    myScripts.js (line 11)
    formValidatemyScripts.js (line 11)
    onclickdelete3.php (line 1)
    document.forms.clients has no properties
    myScripts.js (line 5)
    Code:
    <a href="javascript:newSmallWin('popup.php?popupContent=archiveClient');" title="Archive Client"><input type="image" src="_images/archiveIcon.gif" alt="Archive Clients" name="archiveClient" onclick="formValidate();" /></a>
    Then I tried calling both functions from the anchor tag and neither function works -- I get these error messages:
    e has no properties
    myScripts.js (line 11)
    formValidatemyScripts.js (line 11)
    nulljavascript:formVa... (line 1)
    e has no properties
    myScripts.js (line 11)

    Code:
    <a href="javascript:formValidate(); newSmallWin('popup.php?popupContent=archiveClient');" title="Archive Client"><input type="image" src="_images/archiveIcon.gif" alt="Archive Clients" name="archiveClient" /></a>
    I put the demo page up on the site. It's here if anyone has the time to try to help. The actual page I'm trying to write this code for is here. It's a static prototype for a site that will eventually be dynamically generated.

  5. #5
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry about the trouble. My demo was a little different than what you wanted because it was taken from something I already had written. I'll take another look at it as soon as I can.

    BTW... does the popup need to open only if formValidate returns true? Or should the popup open no matter what?

    After looking at the popup I'm even more confused.

    After seeing your pathnames... I'm hesitant to do any more coding for you - altho I will try to make some general suggestions.

  6. #6
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh Mike, no need to apologize. I was feeling bad, too, because at first, I thought it was a straightforward problem and then I saw that it wasn't so I felt like I had mislead people. I appreciate your help no matter what. : )

    Part of what's confusing about this project is that since it's a prototype, I'm not worrying about any validation at this point. I'm planning to do that via PHP once the prototype is accepted. All I'm wanting here is enough JavaScript to give my audience the overall experience that the application will eventually provide.

    To answer your question about the popup, yes, the popup is only if formValidate returns true.

  7. #7
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi tryin_to_learn,

    I'm a little concerned about doing too much for you since this seems to be a school project. But I feel that I've caused some confusion with my first post - so I will at least try clear that up.

    There are many different ways this could be done. The following is just a suggestion of one way to do it. Please feel free to ask any questions you may have about it.

    You had INPUT elements (of type 'image') wrapped in A elements. Bear in mind that INPUT elements of type 'image' become SUBMIT buttons. At any rate - I'm merely providing an alternative for your consideration:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Validate Checkboxes</title>
    <style type='text/css'>
    .btn {
      cursor: pointer;
    }
    </style>
    <script type='text/javascript'>
    window.onload = function()
    {
      var f = document.getElementById('clients');
      document.getElementById('btnAdd').onclick = function(){doClientsAction(f,'add');};
      document.getElementById('btnArc').onclick = function(){doClientsAction(f,'archive');};
      document.getElementById('btnDel').onclick = function(){doClientsAction(f,'delete');};
    }
    function doClientsAction(clientsForm, clientsAction)
    {
      var v = [], e = clientsForm.elements;
      for (var i = 0; i < e.length; ++i) {
        if (e[i].type == 'checkbox' && e[i].checked) {
          v[v.length] = e[i].value;
        }
      }
      if (v.length) {
        switch (clientsAction) {
          case 'add':
            if (confirm('Do you want to add the following clients?\n' + v)) {
              alert("Open 'Add Clients' popup here");
            }
            break;
          case 'archive':
            if (confirm('Do you want to archive the following clients?\n' + v)) {
              alert("Open 'Archive Clients' popup here");
            }
            break;
          case 'delete':
            if (confirm('Do you want to delete the following clients?\n' + v)) {
              alert("Open 'Delete Clients' popup here");
            }
            break;
        } // end switch
      }
      else {
        alert('You must check at least one!');
      }
    }
    </script>
    </head>
    <body>
    
    <form action="" method="post" name="clients" id="clients">
    <div>
      <img id='btnAdd' class='btn' src=''>
      <img id='btnArc' class='btn' src=''>
      <img id='btnDel' class='btn' src=''>
    </div>
    <table>
      <tr><td><input type="checkbox" name="clientid[]" value="John">John</td></tr>
      <tr><td><input type="checkbox" name="clientid[]" value="Jane">Jane</td></tr>
      <tr><td><input type="checkbox" name="clientid[]" value="Bob">Bob</td></tr>
    </table>
    </form>
    
    </body>
    </html>

  8. #8
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Mike,

    Thanks so much for your help. I appreciate your concern about the school project part of it but we're fine there. Our instructors tell us about Sitepoint and suggest we come here for help. Also, this particular project is so big that my advisor has suggested I farm out part of it and not try to do it all alone. In my documentation, I'm mention using outside sources for collaboration so I'm not trying to do anything under the table. We're cool. : )

    Thanks for the tip about wrapping INPUT image elements in anchor tags. I didn't realize that INPUT image tags became SUBMIT buttons. See? I learned something! LOL

    Your code worked beautifully until I actually put it in my page. I think it's the templates that are messing things up, although I'm not sure. Let me tell you what I did to see if I did it right:

    1. I put this in my style sheet:
    Code:
    .btn {
      cursor: pointer;
    }
    2. I put the script in my external js file (_scripts/myScripts.js). I'm wondering if I did this wrong -- like maybe the window.onload needs to be somewhere else? I don't really understand that part. Anyway, here's what I put in myScripts.js:
    Code:
    window.onload = function()
    {
      var f = document.getElementById('clients');
      document.getElementById('btnAdd').onclick = function(){doClientsAction(f,'add');};
      document.getElementById('btnArc').onclick = function(){doClientsAction(f,'archive');};
      document.getElementById('btnDel').onclick = function(){doClientsAction(f,'delete');};
    }
    
    function doClientsAction(clientsForm, clientsAction)
    {
      var v = [], e = clientsForm.elements;
      for (var i = 0; i < e.length; ++i) {
        if (e[i].type == 'checkbox' && e[i].checked) {
          v[v.length] = e[i].value;
        }
      }
      if (v.length) {
        switch (clientsAction) {
          case 'add':
            if (confirm('Do you want to add the following clients?\n' + v)) {
              alert("Open 'Add Clients' popup here");
    		  
            }
            break;
          case 'archive':
            if (confirm('Do you want to archive the following clients?\n' + v)) {
              //alert("Open 'Archive Clients' popup here");
    		  newSmallWin('popup.php?popupContent=archiveClient');
            }
            break;
          case 'delete':
            if (confirm('Do you want to delete the following clients?\n' + v)) {
              alert("Open 'Delete Clients' popup here");
            }
            break;
        } // end switch
      }
      else {
        alert('You must check at least one!');
      }
    }
    3. I put this in my page:
    Code:
    <div>
      <img id='btnAdd' class='btn' src='_images/addIcon.gif'>
      <img id='btnArc' class='btn' src='_images/archiveIcon.gif'>
      <img id='btnDel' class='btn' src='_images/deleteIcon.gif'>
    </div>
    <table>
      <tr><td><input type="checkbox" name="clientid[]" value="John">John</td><td><input type="checkbox" name="clientid[]" value="Jane">Jane</td><td><input type="checkbox" name="clientid[]" value="Bob">Bob</td></tr>
    </table>
    The things I've done to troubleshoot so far are that I checked the whole site to make sure I only had one "id=clients". I had several, so fixed that. Now this is the only form in the site with that id. I also tried putting an alert after the onclick on btnArc to see if we were even getting that far, and we aren't. So somehow, once I put it on my page, something is breaking.

    I don't know if you need additional information or if you already see what's wrong. If you need to know how things are being called, I'm using the tabtastic system for my tabs. So the main page that the part we're working on is coming off of (clients.php) basically looks like this:

    PHP Code:
    <?php 
    //////////// LEFT AND TOP NAV CONTENT

    include_once("_templates/templateTop.tpl.php");


    //////////////// MAIN PAGE CONTENT 
    ?>
    <!-- end leftNav, beginning right content -->

            <div id="tab1" class="tabsetContent">
            <h2 class="alignRightSmall"><?php echo $dynamicTitle ?></h2>
                <h2 class="tabset_label">Clients/Sessions/Payments</h2>
                    
                    <ul class="tabsetTabs">
                       <li><a href="#tabC1" class="active">Active</a></li>
                       <li><a href="#tabC2">Inactive</a></li>
                    </ul>    
            
                    <div id="tabC1" class="tabsetContentNested">
                        <h2 class="tabset_label">Active</h2>
                        <?php include_once("tabContentClients/active.tpl.php"); ?>            
                    </div> <!-- end tabC1 -->            
        
                    <div id="tabC2" class="tabsetContentNested">
                        <h2 class="tabset_label">Inactive</h2>
                        <?php include_once("tabContentClients/inactive.tpl.php"); ?>            
                    </div> <!-- end tabC2 -->

            </div> <!-- end tab1 -->

    <!-- end right content -->
        
    <?php 
    ////////////// BOTTOM TEMPLATE INCLUDING FOOTER

    include_once("_templates/templateBottom.tpl.php");
    ?>
    The page we're actually working on is active tab (tabContentClients/active.tpl.php). I put your part of the code at the very top, just for testing purposes and went ahead an uploaded it so we could play with it. Here's the URL and the code is below:

    Code:
    <form action="_formActions/allClientsProcess.php" method="post" name="clients" id="clients">
    <input type="hidden" name="action" value="0" id="action" />
    
    <!-- ******************************** Start Mike's stuff ********************************************** -->
    
    
    <div>
      <img id='btnAdd' class='btn' src='_images/addIcon.gif'>
      <img id='btnArc' class='btn' src='_images/archiveIcon.gif'>
      <img id='btnDel' class='btn' src='_images/deleteIcon.gif'>
    </div>
    <table>
      <tr><td><input type="checkbox" name="clientid[]" value="John">John</td><td><input type="checkbox" name="clientid[]" value="Jane">Jane</td><td><input type="checkbox" name="clientid[]" value="Bob">Bob</td></tr>
    </table>
    
    <!-- ******************************** End Mike's stuff ********************************************** -->
    
    <div class="toolBar">	
    	<div class="float">
    		<img src="_images/clients.gif" alt="Clients" class="leftIndent26" />
    		<div class="navcontainer">
    			<ul class="navlist">
    				<li><a href="javascript:newWin('popup.php?popupContent=addClient');" title="Add Client"><img src="_images/addIcon.gif"  align="middle" alt="Add Client" /></a>
    				</li>
    				<li><a href="javascript:newSmallWin('popup.php?popupContent=archiveClient');" title="Archive Client"><input type="image" src="_images/archiveIcon.gif" align="middle"  alt="Archive Clients" name="archiveClient" /></a></li>
    				<li><a href="javascript:newSmallWin('popup.php?popupContent=deleteClient');" title="Delete Client"><img src="_images/deleteIcon.gif"  align="middle" alt="Delete Client" /></a></li>
    			</ul>
    		</div>		
    	</div> <!-- end Clients float -->
    	
    
    	<div class="floatRight">
    		<span class="alignRightWithBgColor"><li>Use the checkboxes to archive or delete a client.</li><li>Use the edit pencils to work with an individual client's record.</li> 
    		</span>
    	
    	</div> <!-- end floatRight for Next Appointment box float -->
    	
    </div> <!-- end toolBar -->
    <div class="spacer">&nbsp;</div>
    
    <div class="allClientListTable">
    		<table  cellpadding="3" cellspacing="0"  summary="This is a table that shows demographic data for all clients.">
    					  <tr class="columnColorBrownShaded">
    						<th scope="col" nowrap="nowrap" class="smalltext">All<br /><input type="checkbox" name="checkall" onclick="checkUncheckAll(this);" /></th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Edit</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Last Name</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">First Name</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Cell Phone</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Home Phone</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Work Phone</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Street Address</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">City</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">State</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Birthday</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">SSN</th>
    						<th scope="col" nowrap="nowrap" class="fontSize11">Therapist</th>
    					  </tr>
    					  
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Jim Adams" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Adams</td>
    						<td>Jim</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>2964 Greenville Rd</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>8/2/81</td>
    						<td>&nbsp;</td>
    						<td>Gray</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Gillian Belk" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Belk</td>
    						<td>Gillian</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>2964 Greenville Rd</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>5/2/42</td>
    						<td>&nbsp;</td>
    						<td>Gray</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Good ole Norm" /></td>
    						<td scope="col" align="center"><a href="singleClient.php" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td><a href="singleClient.php">Blake</a></td>
    						<td><a href="singleClient.php">Norman</a></td>
    						<td><a href="singleClient.php">213-777-3452</a></td>
    						<td><a href="singleClient.php">441-987-2351</a></td>
    						<td><a href="singleClient.php">441-925-2590</a></td>
    						<td><a href="singleClient.php">938 Blackberry Lane</a></td>
    						<td><a href="singleClient.php">MiddleBerg</a></td>
    						<td><a href="singleClient.php">IA</a></td>
    						<td><a href="singleClient.php">10/19/73</a></td>
    						<td><a href="singleClient.php">778-52-8933</a></td>
    						<td><a href="singleClient.php">Smith</a></td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Jamie Boskovitz" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Boskovitz</td>
    						<td>Jamie</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>2964 Brown Rd</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>10/2/79</td>
    						<td>441-80-7639</td>
    						<td>Smith</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="David Conner" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Conner</td>
    						<td>David</td>
    						<td>457-233-5131</td>
    						<td>803-222-1863</td>
    						<td>&nbsp;</td>
    						<td>1908 Hunnypot Rd</td>
    						<td>Middleberg</td>
    						<td>IA</td>
    						<td>11/29/64</td>
    						<td>&nbsp;</td>
    						<td>Carter</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Jose Diamonte" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Diamonte</td>
    						<td>Jose</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>313-255-2059</td>
    						<td>2964 Brown Rd</td>
    						<td>Connersville</td>
    						<td>IA</td>
    						<td>10/2/79</td>
    						<td>220-66-9302</td>
    						<td>Smith</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Josie Ernst" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Ernst</td>
    						<td>Josie</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>987-333-1011</td>
    						<td>313 Brant Rd, Apt 3</td>
    						<td>Connersville</td>
    						<td>IA</td>
    						<td>10/2/59</td>
    						<td>&nbsp;</td>
    						<td>McNair</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Piet Franc" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Franc</td>
    						<td>Piet</td>
    						<td>777-203-9901</td>
    						<td>238-252-2429</td>
    						<td>888-345-1717</td>
    						<td>164 Ophelia Lane</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>10/2/84</td>
    						<td>&nbsp;</td>
    						<td>McNair</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Joan Jenkins" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Jenkins</td>
    						<td>Joan</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>234 Cornfield Corner Rd</td>
    						<td>Marks Corner</td>
    						<td>IA</td>
    						<td>10/2/71</td>
    						<td>&nbsp;</td>
    						<td>Smith</td>
    					  </tr>			
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Marseille Johnson" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Johnson</td>
    						<td>Marseille</td>
    						<td>&nbsp;</td>
    						<td>888-222-1053</td>
    						<td>888-345-1717</td>
    						<td>2964 Greenville Rd</td>
    						<td>Middleberg</td>
    						<td>IA</td>
    						<td>11/5/69</td>
    						<td>&nbsp;</td>
    						<td>Carter</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Peter Kylie" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Kylie</td>
    						<td>Peter</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>409 Bluebell Ct</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>10/2/49</td>
    						<td>&nbsp;</td>
    						<td>Gray</td>
    					  </tr>				
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Jonie Lamar" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Lamar</td>
    						<td>Jonie</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>2964 Greenville Rd</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>5/2/42</td>
    						<td>&nbsp;</td>
    						<td>Gray</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Billie Lundon" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Lundon</td>
    						<td>Billie</td>
    						<td>213-777-3452</td>
    						<td>441-987-2351</td>
    						<td>441-925-2590</td>
    						<td>938 Blackberry Lane</td>
    						<td>MiddleBerg</td>
    						<td>IA</td>
    						<td>10/19/73</td>
    						<td>778-52-8933</td>
    						<td>Smith</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Janine Moran" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Moran</td>
    						<td>Janine</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>&nbsp;</td>
    						<td>2964 Brown Rd</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>10/2/79</td>
    						<td>441-80-7639</td>
    						<td>Smith</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="David Muir" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Muir</td>
    						<td>David</td>
    						<td>457-233-5131</td>
    						<td>803-222-1863</td>
    						<td>&nbsp;</td>
    						<td>1908 Hunnypot Rd</td>
    						<td>Middleberg</td>
    						<td>IA</td>
    						<td>11/29/64</td>
    						<td>&nbsp;</td>
    						<td>Carter</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Becca Nancie" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Nancie</td>
    						<td>Becca</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>313-255-2059</td>
    						<td>2964 Brown Rd</td>
    						<td>Connersville</td>
    						<td>IA</td>
    						<td>10/2/79</td>
    						<td>220-66-9302</td>
    						<td>Smith</td>
    					  </tr>
    					  <tr class="shaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Josie Randstat" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Randstat</td>
    						<td>Josie</td>
    						<td>777-333-0101</td>
    						<td>888-222-1053</td>
    						<td>987-333-1011</td>
    						<td>313 Brant Rd, Apt 3</td>
    						<td>Connersville</td>
    						<td>IA</td>
    						<td>10/2/59</td>
    						<td>&nbsp;</td>
    						<td>McNair</td>
    					  </tr>
    					  <tr class="unshaded">
    						<td class="rightDarkerBorder"><input type="checkbox" name="clientid[]" value="Piet Zurch" /></td>
    						<td scope="col" align="center"><a href="#" ><img src="_images/editIcon.gif" alt="Edit" /></a></td>
    						<td>Zurch</td>
    						<td>Piet</td>
    						<td>777-203-9901</td>
    						<td>238-252-2429</td>
    						<td>888-345-1717</td>
    						<td>164 Ophelia Lane</td>
    						<td>Grants</td>
    						<td>IA</td>
    						<td>10/2/84</td>
    						<td>&nbsp;</td>
    						<td>McNair</td>
    					  </tr>		  								  							  
    		</table>
    	</div> <!-- end allClientListTable -->
    </form>

  9. #9
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi tryin_to_learn,

    I'm afraid I will be gone for the rest of the day. It may be tonight or tomorrow morning before I can return to this. Sorry.

    A quick suggestion: search all files for "onload". There can only be one assignment like this:

    window.onload = ...

  10. #10
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that's it, Mike! I have to run, too, so I can't check it thoroughly, but I had a body onload for an image preloader and I took that out and now your script works fine! I need to check it tonight to make sure I can get the popups to display, but so far so good. Thanks so much.

  11. #11
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perfect, Mike. Thanks again. I'm sure I'll be back. : )

  12. #12
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •