Search Results

Search found 2648 results on 106 pages for 'td'.

Page 2/106 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to recursively delete some xml elements using XSLT

    - by Monomachus
    Hi, So I got this situation which sucks. I have an XML like this <table border="1" cols="200 100pt 200"> <tr> <td>isbn</td> <td>title</td> <td>price</td> </tr> <tr> <td /> <td /> <td> <span type="champsimple" id="9b297fb5-d12b-46b1-8899-487a2df0104e" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f"> [prénom] </span> <span type="champsimple" id="e103a6a5-d1be-4c34-8a54-d234179fb4ea" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f">[nom]</span> <span></span> </td> </tr> <tr></tr> <tr> <td></td> <td>Phill It in</td> </tr> <tr> <table id="cas1"> <tr> <td ></td> <td >foo</td> </tr> <tr> <td >bar</td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas2"> <tr> <td ></td> <td >foo</td> </tr> <tr> <td ></td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas3"> <tr> <td >bar</td> <td ></td> </tr> <tr> <td >foo</td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas4"> <tr> <td /> <td /> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <table id="cas4"> <tr> <td /> <td /> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> <tr> <td /> <td /> </tr> </table> Now the question is how would I recursively delete all empty td, tr and table elements? Now I use this XSLT <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*" /> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="td[not(node())]" /> <xsl:template match="tr[not(node())]" /> <xsl:template match="table[not(node())]" /> </xsl:stylesheet> But it doesn't do very well. After I delete td, a tr becomes empty but it doesn't handle that. Too bad. See the table element with "cas4". <table border="1" cols="200 100pt 200"> <tr> <td>isbn</td> <td>title</td> <td>price</td> </tr> <tr> <td> <span type="champsimple" id="9b297fb5-d12b-46b1-8899-487a2df0104e" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f"> [prénom] </span> <span type="champsimple" id="e103a6a5-d1be-4c34-8a54-d234179fb4ea" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f">[nom]</span> <span /> </td> </tr> <tr> <td>Phill It in</td> </tr> <tr> <table id="cas1"> <tr> <td>foo</td> </tr> <tr> <td>bar</td> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas2"> <tr> <td>foo</td> </tr> <tr> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas3"> <tr> <td>bar</td> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas4"> <tr /> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <table id="cas4"> <tr /> <tr> <td>foo</td> <td>boo</td> </tr> </table> <tr /> </table> How would you solve this problem?

    Read the article

  • Problem after adding <form>?

    - by Mahmoud
    When i added <form> to my web page, all my javascript stopped working, and when i put the form at the begining of my table submit wont work, what i am doing wrong. below is my code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sabay Afrah.Inc | Contact Us</title> <script src="js/clear.js" language="javascript" type="text/javascript"></script> <script src="js/SpryValidationSelect.js" type="text/javascript"></script> <script type="text/jscript"> function Checking(form){ if(empty(form.fname.value){ alert("do nothing"); } } </script> <style type="text/css"> <!-- body { background-color: #000; } body,td,th { color: #FFF; font-size: 14px; } .address { font-family: "Comic Sans MS", cursive; font-weight: bold; } --> </style> <link href="theme/style.css" rel="stylesheet" type="text/css" /> <link href="theme/SpryValidationSelect.css" rel="stylesheet" type="text/css" /> </head> <body> <form action="enterdb.php" method="post"> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center">&nbsp;</td> </tr> <tr> <td><table width="1006" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="4">&nbsp;</td> <td width="93" align="right">&nbsp;</td> <td width="4">&nbsp;</td> <td width="374" ><img src="images/logo.png" width="230" height="114" /></td> <td width="426" align="right" class="address"> 10 GlenLake parkway<br /> Suite 130, mailbox # 76<br /> Atlanta, GA 30328<br /> Phone #: + 678-222-3442<br /> Fax #: +678-222-3401<br /> Office hours: M-F 8:30 a.m. to 5:00 p.m.<br /> </td> <td width="99">&nbsp;</td> </tr> <tr> <td colspan="5"><table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td>&nbsp;</td> <td class="title">&nbsp;</td> </tr> <tr> <td width="84"><br /></td> <td width="516" class="title">Contact Us</td> </tr> </table></td> <td>&nbsp;</td> </tr> </table></td> </tr> <tr> <td> <table width="883" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="table"> <td width="27" rowspan="10" bgcolor="#330099" class="textable">&nbsp;</td> <td colspan="2" bgcolor="#330099" class="textable">&nbsp;</td> <td width="29" rowspan="8" bgcolor="#330099" class="textable">&nbsp;</td> <td colspan="3" class="textable">&nbsp;</td> </tr> <tr > <td width="139" height="31" bgcolor="#330099" class="textable">First Name:</td> <td> <input id="fname" name="fname" type="text" size="40" /> </td> <td width="150" class="textable">Last Name:</td> <td width="265" class="textable"><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td ><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td ><input id="lname" name="lname" type="text" size="40" /></td> </tr> </table></td> </tr> </table></td> <td width="32" class="textable">&nbsp;</td> </tr> <tr> <td height="30" class="textable">Subject:</td> <td> <span id="spryselect1"> <label> <select name="sub" id="sub"> <option> Choose a Subject</option> <option> General Question</option> <option> MemberShip Area</option> <option> Others</option> </select> </label> <span class="selectRequiredMsg">Please select a Subject.</span></span> </td> <td colspan="3" class="textable">&nbsp;</td> </tr> <tr> <td height="33" class="textable">Company Name:</td> <td> <input id="cname" name="cname" type="text" size="40" /></td> <td class="textable">Company Address:</td> <td class="textable"><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td><input id="cadd" name="cadd" type="text" size="40" onclick="" /></td> </tr> </table></td> <td class="textable">&nbsp;</td> </tr> <tr> <td height="31" class="textable">Phone Number:</td> <td><input id="phonen" name="phonen" type="text" size="40" /> </td> <td colspan="3" rowspan="4" class="textable">&nbsp;</td> </tr> <tr> <td height="31" class="textable">Fax Number:</td><td> <input id="faxn" name="faxn" type="text" size="40" /></td> </tr> <tr> <td height="32" class="textable">Email Address:</td><td><input id="email" name="email" type="text" size="40" /></td> </tr> <tr> <td colspan="2" class="textable">&nbsp;</td> </tr> <tr> <td valign="top" class="textable">Additional Information:</td> <td colspan="5" class="textable"><table width="600" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center"> <textarea id="add" name="add" cols="70" rows="10" /></textarea> </td> </tr> <tr> <td align="center" class="textable"> <input name="Submit" type="submit" value="Submit" onclick="Checking()"/> </td> <td align="center" class="textable"> <input type="reset" value="Clear" /> </td> </tr> </table></td> </tr> <tr> <td colspan="6" class="textable">&nbsp;</td> </tr> </table></td> </tr> </table> </form> <script type="text/javascript"> <!-- var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1"); //--> </script> </body> </html>

    Read the article

  • Auto width on tables

    - by Hulk
    A html table cols and rows are generated dynamically, i.e, for the first instance it could be two rows and there columns. and next time it could be two rows and 10 columns My question is how to adjust the with automatically of the table so that the table always appears 100% in the page adjusting the coulmn size and row size <table> <tr><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td></tr> </table> <table> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> </table> Thanks..

    Read the article

  • Apache Tomcat Ant undeploy task error using

    - by Devil Jin
    I am using ant 1.7 to deploy and undeploy applications in tomcat //Snippet from my build.xml <target name="deploy" depends="war" description="Install application to the servlet containor"> <deploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" war="${war.local}" /> </target> <target name="undeploy" description="Removes Web Application from path"> <undeploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" /> </target> The deploy task works perfectly fine but the undeploy task gives an html output for the undeploy task prefixed with [undeploy] although the application is undeployed successfully The html message also contains the success message 'OK - Undeployed application at context path /MyApplication' OUTPUT: [undeploy] <html> [undeploy] <head> [undeploy] <style> [undeploy] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tah oma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background :white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;} table { [undeploy] width: 100%; [undeploy] } [undeploy] td.page-title { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: white; [undeploy] color: black; [undeploy] } [undeploy] td.title { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-style:italic; [undeploy] font-weight: bold; [undeploy] background: #D2A41C; [undeploy] } [undeploy] td.header-left { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.header-center { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.row-left { [undeploy] text-align: left; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-center { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-right { [undeploy] text-align: right; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] TH { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] TD { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] </style> [undeploy] <title>/manager</title> [undeploy] </head> [undeploy] <body bgcolor="#FFFFFF"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <a href="http://www.apache.org/"> [undeploy] <img border="0" alt="The Apache Software Foundation" align="left" [undeploy] src="/manager/images/asf-logo.gif"> [undeploy] </a> [undeploy] <a href="http://tomcat.apache.org/"> [undeploy] <img border="0" alt="The Tomcat Servlet/JSP Container" [undeploy] align="right" src="/manager/images/tomcat.gif"> [undeploy] </a> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td class="page-title" bordercolor="#000000" align="left" nowrap> [undeploy] <font size="+2">Tomcat Web Application Manager</font> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left" width="10%"><small><strong>Message:</strong></small>&nbsp;</td> [undeploy] <td class="row-left"><pre>OK - Undeployed application at context path /MyApplication [undeploy] </pre></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="4" class="title">Manager</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left"><a href="/manager/html/list">List Applications</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/html-manager-howto.html">HTML Manager Help</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/manager-howto.html">Manager Help</a></td> [undeploy] <td class="row-right"><a href="/manager/status">Server Status</a></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="5" class="title">Applications</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-left"><small>Path</small></td> [undeploy] <td class="header-left"><small>Display Name</small></td> [undeploy] <td class="header-center"><small>Running</small></td> [undeploy] <td class="header-center"><small>Sessions</small></td> [undeploy] <td class="header-left"><small>Commands</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/">/</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Welcome to Tomcat</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/" target="_bla nk">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/docs">/docs</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Documentation</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/docs" target=" _blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/docs" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/docs" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/docs" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/docs"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/examples">/examples</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Servlet and JSP Examples</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/examples" targ et="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/examples" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/examples" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/examples" onclick="return(confirm('Are you sure?'))">Undeploy</a>&n bsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/examples"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/host%2Dmanager">/host-manager</a></small></t d> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/host%2Dmanager " target="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Stop</a>&nbs p; [undeploy] &nbsp;<a href="/manager/html/reload?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Reload</a> &nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Undeploy </a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/host%2Dmanager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager">/manager</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/manager" targe t="_blank">3</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;Stop&nbsp; [undeploy] &nbsp;Reload&nbsp; [undeploy] &nbsp;Undeploy&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/manager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Deploy</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Deploy directory or WAR file located on server</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="get" action="/manager/html/deploy"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Context Path (required):</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployPath" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>XML Configuration file URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployConfig" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>WAR or Directory URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>WAR file to deploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form action="/manager/html/upload" method="post" enctype="multipart/form-data"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Select WAR file to upload</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="file" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Diagnostics</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Check to see if a web application has caused a memory leak on stop, r eload or undeploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="post" action="/manager/html/findleaks"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Find leaks"> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <small>This diagnostic check will trigger a full garbage collection. Use it with extreme caution on production systems.</small> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br><table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="6" class="title">Server Information</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-center"><small>Tomcat Version</small></td> [undeploy] <td class="header-center"><small>JVM Version</small></td> [undeploy] <td class="header-center"><small>JVM Vendor</small></td> [undeploy] <td class="header-center"><small>OS Name</small></td> [undeploy] <td class="header-center"><small>OS Version</small></td> [undeploy] <td class="header-center"><small>OS Architecture</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-center"><small>Apache Tomcat/6.0.26</small></td> [undeploy] <td class="row-center"><small>1.5.0_09-b01</small></td> [undeploy] <td class="row-center"><small>Sun Microsystems Inc.</small></td> [undeploy] <td class="row-center"><small>Windows XP</small></td> [undeploy] <td class="row-center"><small>5.1</small></td> [undeploy] <td class="row-center"><small>x86</small></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <center><font size="-1" color="#525D76"> [undeploy] <em>Copyright &copy; 1999-2010, Apache Software Foundation</em></font></center> [undeploy] </body> [undeploy] </html>

    Read the article

  • ant undeploy task error

    - by Devil Jin
    I am using ant 1.7 to deploy and undeploy applications in tomcat //Snippet from my build.xml <target name="deploy" depends="war" description="Install application to the servlet containor"> <deploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" war="${war.local}" /> </target> <target name="undeploy" description="Removes Web Application from path"> <undeploy url="${tomcat.manager.url}" username="${manager.user}" password="${manager.passwd}" path="/${tomcat.ctxpath}" /> </target> The deploy task works perfectly fine but the undeploy task gives an html output for the undeploy task prefixed with [undeploy] although the application is undeployed successfully The html message also contains the success message 'OK - Undeployed application at context path /MyApplication' OUTPUT: [undeploy] <html> [undeploy] <head> [undeploy] <style> [undeploy] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tah oma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background :white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;} table { [undeploy] width: 100%; [undeploy] } [undeploy] td.page-title { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: white; [undeploy] color: black; [undeploy] } [undeploy] td.title { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-style:italic; [undeploy] font-weight: bold; [undeploy] background: #D2A41C; [undeploy] } [undeploy] td.header-left { [undeploy] text-align: left; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.header-center { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] td.row-left { [undeploy] text-align: left; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-center { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] td.row-right { [undeploy] text-align: right; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] TH { [undeploy] text-align: center; [undeploy] vertical-align: top; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] font-weight: bold; [undeploy] background: #FFDC75; [undeploy] } [undeploy] TD { [undeploy] text-align: center; [undeploy] vertical-align: middle; [undeploy] font-family:sans-serif,Tahoma,Arial; [undeploy] color: black; [undeploy] } [undeploy] </style> [undeploy] <title>/manager</title> [undeploy] </head> [undeploy] <body bgcolor="#FFFFFF"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <a href="http://www.apache.org/"> [undeploy] <img border="0" alt="The Apache Software Foundation" align="left" [undeploy] src="/manager/images/asf-logo.gif"> [undeploy] </a> [undeploy] <a href="http://tomcat.apache.org/"> [undeploy] <img border="0" alt="The Tomcat Servlet/JSP Container" [undeploy] align="right" src="/manager/images/tomcat.gif"> [undeploy] </a> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <table cellspacing="4" width="100%" border="0"> [undeploy] <tr> [undeploy] <td class="page-title" bordercolor="#000000" align="left" nowrap> [undeploy] <font size="+2">Tomcat Web Application Manager</font> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left" width="10%"><small><strong>Message:</strong></small>&nbsp;</td> [undeploy] <td class="row-left"><pre>OK - Undeployed application at context path /MyApplication [undeploy] </pre></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="4" class="title">Manager</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left"><a href="/manager/html/list">List Applications</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/html-manager-howto.html">HTML Manager Help</a></td> [undeploy] <td class="row-center"><a href="/manager/../docs/manager-howto.html">Manager Help</a></td> [undeploy] <td class="row-right"><a href="/manager/status">Server Status</a></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="5" class="title">Applications</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-left"><small>Path</small></td> [undeploy] <td class="header-left"><small>Display Name</small></td> [undeploy] <td class="header-center"><small>Running</small></td> [undeploy] <td class="header-center"><small>Sessions</small></td> [undeploy] <td class="header-left"><small>Commands</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/">/</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Welcome to Tomcat</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/" target="_bla nk">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/docs">/docs</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Documentation</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/docs" target=" _blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/docs" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/docs" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/docs" onclick="return(confirm('Are you sure?'))">Undeploy</a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/docs"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/examples">/examples</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Servlet and JSP Examples</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/examples" targ et="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/examples" onclick="return(confirm('Are you sure?'))">Stop</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/reload?path=/examples" onclick="return(confirm('Are you sure?'))">Reload</a>&nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/examples" onclick="return(confirm('Are you sure?'))">Undeploy</a>&n bsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/examples"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small><a href="/host%2Dmanager">/host-manager</a></small></t d> [undeploy] <td class="row-left" bgcolor="#C3F3C3" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#C3F3C3" rowspan="2"><small><a href="/manager/html/sessions?path=/host%2Dmanager " target="_blank">0</a></small></td> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;<a href="/manager/html/stop?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Stop</a>&nbs p; [undeploy] &nbsp;<a href="/manager/html/reload?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Reload</a> &nbsp; [undeploy] &nbsp;<a href="/manager/html/undeploy?path=/host%2Dmanager" onclick="return(confirm('Are you sure?'))">Undeploy </a>&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#C3F3C3"> [undeploy] <form method="POST" action="/manager/html/expire?path=/host%2Dmanager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager">/manager</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF" rowspan="2"><small>Tomcat Manager Application</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small>true</small></td> [undeploy] <td class="row-center" bgcolor="#FFFFFF" rowspan="2"><small><a href="/manager/html/sessions?path=/manager" targe t="_blank">3</a></small></td> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <small> [undeploy] &nbsp;Start&nbsp; [undeploy] &nbsp;Stop&nbsp; [undeploy] &nbsp;Reload&nbsp; [undeploy] &nbsp;Undeploy&nbsp; [undeploy] </small> [undeploy] </td> [undeploy] </tr><tr> [undeploy] <td class="row-left" bgcolor="#FFFFFF"> [undeploy] <form method="POST" action="/manager/html/expire?path=/manager"> [undeploy] <small> [undeploy] &nbsp;<input type="submit" value="Expire sessions">&nbsp;with idle &ge;&nbsp;<input type="text" name="idle" siz e="5" value="30">&nbsp;minutes&nbsp; [undeploy] </small> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Deploy</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Deploy directory or WAR file located on server</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="get" action="/manager/html/deploy"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Context Path (required):</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployPath" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>XML Configuration file URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployConfig" size="20"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>WAR or Directory URL:</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="text" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>WAR file to deploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form action="/manager/html/upload" method="post" enctype="multipart/form-data"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] <small>Select WAR file to upload</small> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="file" name="deployWar" size="40"> [undeploy] </td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-right"> [undeploy] &nbsp; [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Deploy"> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </table> [undeploy] <br> [undeploy] <table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="2" class="title">Diagnostics</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2" class="header-left"><small>Check to see if a web application has caused a memory leak on stop, r eload or undeploy</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td colspan="2"> [undeploy] <form method="post" action="/manager/html/findleaks"> [undeploy] <table cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td class="row-left"> [undeploy] <input type="submit" value="Find leaks"> [undeploy] </td> [undeploy] <td class="row-left"> [undeploy] <small>This diagnostic check will trigger a full garbage collection. Use it with extreme caution on production systems.</small> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] </form> [undeploy] </td> [undeploy] </tr> [undeploy] </table> [undeploy] <br><table border="1" cellspacing="0" cellpadding="3"> [undeploy] <tr> [undeploy] <td colspan="6" class="title">Server Information</td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="header-center"><small>Tomcat Version</small></td> [undeploy] <td class="header-center"><small>JVM Version</small></td> [undeploy] <td class="header-center"><small>JVM Vendor</small></td> [undeploy] <td class="header-center"><small>OS Name</small></td> [undeploy] <td class="header-center"><small>OS Version</small></td> [undeploy] <td class="header-center"><small>OS Architecture</small></td> [undeploy] </tr> [undeploy] <tr> [undeploy] <td class="row-center"><small>Apache Tomcat/6.0.26</small></td> [undeploy] <td class="row-center"><small>1.5.0_09-b01</small></td> [undeploy] <td class="row-center"><small>Sun Microsystems Inc.</small></td> [undeploy] <td class="row-center"><small>Windows XP</small></td> [undeploy] <td class="row-center"><small>5.1</small></td> [undeploy] <td class="row-center"><small>x86</small></td> [undeploy] </tr> [undeploy] </table> [undeploy] <br> [undeploy] <hr size="1" noshade="noshade"> [undeploy] <center><font size="-1" color="#525D76"> [undeploy] <em>Copyright &copy; 1999-2010, Apache Software Foundation</em></font></center> [undeploy] </body> [undeploy] </html>

    Read the article

  • Simple Grouping With TableSorter Plugin

    - by HurnsMobile
    Im playing around with the Tablesorter plug-in for jQuery and was trying to get a very simple grouping functionality added into it. Using the follow html/js works great until you click sort again and reverse the order. The headers get moved to the bottom of the group when this happens. The following is my (admitedly hacky) attempt at it. Does anyone have any ideas? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Table Manipulation Test</title> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.1.custom.css" rel="stylesheet" /> <link rel="stylesheet" href="tablesorter/themes/green/style.css" type="text/css"/> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="tablesorter/jquery.tablesorter.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#test_table").tablesorter({ sortForce: [[3,0]] }); $(".group_details").hide(); $(".group_header").click(function(){ var group = $(this).attr("group"); var $expander = $(this).children("td.expanderguy") if ($("." + group + ":visible").length){ $("." + group + "").fadeOut('fast'); $expander.html("<img src='icons/plus.gif'>"); } else{ $("." + group + "").fadeIn('fast'); $expander.html("<img src='icons/minus.gif'>"); } }); } ); </script> <style type="text/css"> .group_header td{ background-color: #888888; !important } </style> </head> <body> <table id="test_table" class="tablesorter"> <thead> <tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Due Date</th><th>Amount Due</th></tr> </thead> <tbody> <tr class="group_header" group="group1"><td class="expanderguy"><img src="icons/plus.gif"></td><td></td><td></td><td>Monday, June 7</td><td></td></tr> <tr class="group_details group1"><td>Flavian</td><td>Wenceslas</td><td>[email protected]</td><td>Monday, June 7</td><td>$100</td></tr> <tr class="group_details group1"><td>Gordian</td><td>Ives</td><td>[email protected]</td><td>Monday, June 7</td><td>$1700</td></tr> <tr class="group_details group1"><td>Saladin</td><td>Tarquin</td><td>[email protected]</td><td>Monday, June 7</td><td>$1700</td></tr> <tr class="group_details group1"><td>Urban</td><td>Cyprian</td><td>[email protected]</td><td>Monday, June 7</td><td>$1500</td></tr> <tr class="group_details group1"><td>Sargon</td><td>Swithun</td><td>[email protected]</td><td>Monday, June 7</td><td>$1100</td></tr> <tr class="group_details group1"><td>Pompey</td><td>Ladislas</td><td>[email protected]</td><td>Monday, June 7</td><td>$300</td></tr> <tr class="group_details group1"><td>Attila</td><td>Hiawatha</td><td>[email protected]</td><td>Monday, June 7</td><td>$200</td></tr> <tr class="group_header" group="group2"><td class="expanderguy"><img src="icons/plus.gif"></td><td></td><td></td><td>Tuesday, June 8</td><td></td></tr> <tr class="group_details group2"><td>Bruce</td><td>Fenton</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$1700</td></tr> <tr class="group_details group2"><td>Wade</td><td>Sequoia</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$1400</td></tr> <tr class="group_details group2"><td>Eddie</td><td>Jerold</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$1100</td></tr> <tr class="group_details group2"><td>Lynn</td><td>Lucan</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$1200</td></tr> <tr class="group_details group2"><td>Taegan</td><td>Tadg</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$100</td></tr> <tr class="group_details group2"><td>Clyde</td><td>Reed</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$6100</td></tr> <tr class="group_details group2"><td>Alaois</td><td>Art</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$2100</td></tr> <tr class="group_details group2"><td>Gilbert</td><td>Patsy</td><td>[email protected]</td><td>Tuesday, June 8</td><td>$1500</td></tr> <tr class="group_header" group="group3"><td class="expanderguy"><img src="icons/plus.gif"></td><td></td><td></td><td>Wednesday, June 9</td><td></td></tr> <tr class="group_details group3" ><td>Clem</td><td>Eben</td><td>[email protected]</td><td>Wednesday, June 9</td><td>$2100</td></tr> <tr class="group_details group3" ><td>Elijah</td><td>Julyan</td><td>[email protected]</td><td>Wednesday, June 9</td><td>$2100</td></tr> <tr class="group_details group3" ><td>Marvyn</td><td>Damian</td><td>[email protected]</td><td>Wednesday, June 9</td><td>$1100</td></tr> <tr class="group_details group3" ><td>Sawyer</td><td>Ryker</td><td>[email protected]</td><td>Wednesday, June 9</td><td>$500</td></tr> </tbody> </table> </body>

    Read the article

  • trying to validate user input in php

    - by user225269
    I'm trying to validate user input in php. This code will check if the values are null or not. If it is null, this will require the user to input the values that are null. When all the text boxes in the html form that came before this. This code will show the submit button, and that submit button will save the inputted data into the mysql database. But the problem is that the value that is saved is zero zero and zero, what might be the cause of this? <html> <head> <title>Admission Information Sheet</title> <meta http-equiv="Content-Type" content="text/html; Western (ISO-8859-1)"> <meta name="author" content=" "> <title> <style> input { font-size: 16px;} </style> <?php include('header.php'); ?> <div id="main_content"> </div> <?php include('footer.php'); ?> <table border="1" width="900" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1.1" method="POST" action="aisaction.php"> <?php $NURSE = $_POST[nurse]; $TELNUM = $_POST[telnum]; $HOSPNUM = $_POST[hnum]; $ROOMNUM = $_POST[rnum]; $LASTNAME = $_POST[lname]; $FIRSTNAME = $_POST[fname]; $MIDNAME = $_POST[mname]; $AD = $_POST[ad]; $ADATE = $_POST[adate]; $ADTIME = $_POST[adtime]; $CSTAT = $_POST[cs]; $AGE = $_POST[age]; $BDAY = $_POST[bday]; $SEX = $_POST[sex]; ?> <td> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="12" style="background:#9ACD32; color:white; border:white 1px solid; text-align: center"><strong><font size="3">ADMISSION INFORMATION SHEET</strong></td> </tr> <tr> </td><br> <td width="54"><font size="3">Hospital #</td> <td width="3">:</td> <td width="168"><input type="display" name="hnum" disabled="true" value= "<?php print "$HOSPNUM";?>"><br> <font color="red"> <?php if(empty($HOSPNUM)) print "* Hospital Number required!<br>"; ?> </td> <td width="41"><font size="3">Room #</td> <td width="3">:</td> <td width="168"><input type="display" name="rnum" disabled="true" value= "<?php print "$ROOMNUM";?>"><br> <font color="red"> <?php if(empty($ROOMNUM)) print "* Room Number required!<br>"; ?> </td> <td width="67"><font size="3">Admission Date</td> <td width="3">:</td> <td width="168"><input type="display" name="adate" disabled="true" value= "<?php print "$ADATE";?>"><br> <font color="red"> <?php if(empty($ADATE)) print "* Admission Date required!<br>"; ?> </td> </tr> <tr> <td><font size="3">Last Name</td> <td>:</td> <td><input type="display" name="lname" disabled="true" value= "<?php print "$LASTNAME";?>"><br> <font color="red"> <?php if(empty($LASTNAME)) print "* Last Name required!<br>"; ?> </td> <td><font size="3">First Name</td> <td>:</td> <td><input type="display" name="fname" disabled="true" value= "<?php print "$FIRSTNAME";?>"><br> <font color="red"> <?php if(empty($FIRSTNAME)) print "* First Name required!<br>"; ?> </td> <td><font size="3">Middle Name</td> <td>:</td> <td><input type="display" name="mname" disabled="true" value= "<?php print "$MIDNAME";?>"><br> <font color="red"> <?php if(empty($MIDNAME)) print "* Middle Name required!<br>"; ?> </td> <td><font size="3">Admit time</td> <td>:</td> <td><input type="display" name="mname" disabled="true" value= "<?php print "$ADTIME";?>"><br> <font color="red"> <?php if(empty($ADTIME)) print "* Adtime required!<br>"; ?> </td> </tr> <tr> <td><font size="3">Civil Status</td> <td>:</td> <td><input type="display" name="cs" disabled="true" value= "<?php print "$CSTAT";?>"><br> <font color="red"> <?php if(empty($CSTAT)) print "* Civil Status required!<br>"; ?> </td> <td><font size="3">Age</td> <td>:</td> <td><input type="display" name="age" disabled="true" value= "<?php print "$AGE";?>"><br> <font color="red"> <?php if(empty($AGE)) print "* Age required!<br>"; ?> </td> <td><font size="3">Birthday</td> <td>:</td> <td><input type="display" name="bday" disabled="true" value= "<?php print "$BDAY";?>"><br> <font color="red"> <?php if(empty($BDAY)) print "* Birthday required!<br>"; ?> </td> </tr> <tr> <td><font size="3">Address</td> <td>:</td> <td><input type="display" name="address" disabled="true" value= "<?php print "$AD";?>"><br> <font color="red"> <?php if(empty($AD)) print "* Address required!<br>"; ?> </td> <td><font size="3">Telephone #</td> <td>:</td> <td><input type="display" name="telnum" disabled="true" value= "<?php print "$TELNUM";?>"></td> <td width="23"><font size="3">Sex</td> <td width="3">:</td> <td width="174"><input type="display" name="sex" disabled="true" value= "<?php print "$SEX";?>"><br> <font color="red"> <?php if(empty($SEX)) print "* Gender required!<br>"; ?> </td> </tr> <tr> <td><font size="3">Pls. Check</td> <td>:</td> <td><input name="stats1" type="checkbox" id="SSS" value="SSS">SSS</td> <td><font size="3"></td> <td>:</td> <td><input name="stats1" type="checkbox" id="nonmed" value="NonMedicare">Non Medicare</td> <td><font size="3"></td> <td>:</td> <td><input name="stats1" type="checkbox" id="sh" value="stockholder">Stockholder</td> </tr> <tr> <td><font size="3"></td> <td></td> <td><input name="stats1" type="checkbox" id="gsis" value="GSIS">GSIS</td> <td><font size="3"></td> <td></td> <td><input name="stats1" type="checkbox" id="senior" value="seniorcitizen">Senior-Citizen</td> <tr> <td><font size="3"></td> <td></td> <td><input name="stats1" type="checkbox" id="dep" value="dependent">Dependent</td> <td><font size="3"></td> <td></td> <td><input name="stats1" type="checkbox" id="emp" value="employee">Employee</td> </tr> <tr> <td><font size="3">Attending Nurse</td> <td>:</td> <td><input type="display" name="nurse" disabled="true" value= "<?php print "$NURSE";?>"><br> <font color="red"> <?php if(empty($NURSE)) print "* Admitting/Attending Nurse required!<br>"; ?> </td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><input type="button" value="Back" onClick="history.go(-1);return true;"> <?php $val1 = $_POST['NURSE']; if($_POST['NURSE'] !="") { ?> <form action="aisaction.php" method="POST" target="_window"> <input type="hidden" name="submit" value="yes"> <input type="submit" value="submit"> </form> <?php } ?> </td> </td> </tr> </table> </td> </form> </tr> </table> </head> </html>

    Read the article

  • Copying values of one table to another (how to convert this js function to jQuery)

    - by Sullan
    Hi All, I am stuck with a small problem here.. What i am trying to do is copy description of id's from one table to another. I have writter half of the javascript and can anybody tell me how to convert this function in jquery. I want the description copied from the first table based on the id to the second table. Have done this in jquery using 'contains', (http://stackoverflow.com/questions/2449845/comparing-2-tables-column-values-and-copying-the-next-column-content-to-the-secon) since there are 1000 table rows, the explorer crashes. Is there a way to simplify it ??... the code is as follows... the current javascript works when i click on test in the second table, but i want the value to be appended in the second table on page load... pls help <table class="reportTabe"> <tr><td>psx-pdu120v1</td><td class="itemname" id="psx-pdu120v1">some description1</td></tr> <tr><td>psx-pdu120v1</td><td class="itemname" id="psx-pdu120v1">some description1</td></tr> <tr><td>psx-pdu120v3</td><td class="itemname" id="psx-pdu120v3">some description3</td></tr> <tr><td>psx-pdu120v4</td><td class="itemname" id="psx-pdu120v4">some description4</td></tr> <tr><td>psx-pdu120v5</td><td class="itemname" id="psx-pdu120v5">some description5</td></tr> <tr><td>psx-pdu120v6</td><td class="itemname" id="psx-pdu120v6">some description6</td></tr> <tr><td>psx-pdu120v7</td><td class="itemname" id="psx-pdu120v7">some description7</td></tr> <tr><td>psx-pdu120v8</td><td class="itemname" id="psx-pdu120v8">some description8</td></tr> <tr><td>psx-pdu120v9</td><td class="itemname" id="psx-pdu120v9">some description9</td></tr> </table> <table class="data"> <tr><td class="whipItem">psx-pdu120v1</td><td onClick="Javascript:alert(document.getElementById('psx-pdu120v1').innerText)";>test</td></tr> <tr><td class="whipItem">psx-pdu120v3</td><td onClick="Javascript:alert(document.getElementById('psx-pdu120v1').innerText)";>test</td></tr> <tr><td class="whipItem">psx-pdu120v4</td><td onClick="Javascript:alert(document.getElementById('psx-pdu120v5').innerText)";>test</td></tr> <tr><td class="whipItem">psx-pdu120v5</td><td Javascript:this.innerText=document.getElementById('psx-pdu120v4').innerText;></td></tr> <tr><td class="whipItem">psx-pdu120v6</td><td Javascript:this.innerText=document.getElementById('psx-pdu120v5').innerText;></td></tr> <tr><td class="whipItem">psx-pdu120v7</td><td Javascript:this.innerText=document.getElementById('psx-pdu120v6').innerText;></td></tr> <tr><td class="whipItem">psx-pdu120v8</td><td Javascript:this.innerText=document.getElementById('psx-pdu120v7').innerText;></td></tr> <tr><td class="whipItem">psx-pdu120v9</td><td Javascript:this.innerText=document.getElementById('psx-pdu120v8').innerText;></td></tr> </table>

    Read the article

  • How to display subversion URL for the Project with jenkins email-ext plugin?

    - by kamal
    Here is the jelly script i am using: <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"> <STYLE>BODY, TABLE, TD, TH, P { font-family:Verdana,Helvetica,sans serif; font-size:11px; color:black; } h1 { color:black; } h2 { color:black; } h3 { color:black; } TD.bg1 { color:white; background-color:#0000C0; font-size:120% } TD.bg2 { color:white; background-color:#4040FF; font-size:110% } TD.bg3 { color:white; background-color:#8080FF; } TD.test_passed { color:blue; } TD.test_failed { color:red ; } TD.console { font-family:Courier New; }</STYLE> <BODY> <j:set var="spc" value="&amp;nbsp;&amp;nbsp;" /> <!-- GENERAL INFO --> <TABLE> <TR> <TD align="right"> <j:choose> <j:when test="${build.result=='SUCCESS'}"> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/blue.gif" /> </j:when> <j:when test="${build.result=='FAILURE'}"> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/red.gif" /> </j:when> <j:otherwise> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/yellow.gif" /> </j:otherwise> </j:choose> </TD> <TD valign="center"> <B style="font-size: 200%;">BUILD ${build.result}</B> </TD> </TR> <TR> <TD>Build URL</TD> <TD> <A href="${rooturl}${build.url}">${rooturl}${build.url}</A> </TD> </TR> <TR> <TD>Project:</TD> <TD>${project.name}</TD> </TR> <TR> <TD>Date of build:</TD> <TD>${it.timestampString}</TD> </TR> <TR> <TD>Build duration:</TD> <TD>${build.durationString}</TD> </TR> <TR> <!-- BRANCH --> <TD>Subversion Repo:</TD> <TD>${build.scm}</TD> </TR> <tr> <td>Build Cause:</td> <td> <j:forEach var="cause" items="${build.causes}">${cause.shortDescription} </j:forEach> </td> </tr> </TABLE> <BR /> <!-- CHANGE SET --> <j:set var="changeSet" value="${build.changeSet}" /> <j:if test="${changeSet!=null}"> <j:set var="hadChanges" value="false" /> <TABLE width="100%"> <TR> <TD class="bg1" colspan="2"> <B>CHANGES</B> </TD> </TR> <j:forEach var="cs" items="${changeSet}" varStatus="loop"> <j:set var="hadChanges" value="true" /> <j:set var="aUser" value="${cs.hudsonUser}" /> <TR> <TD colspan="2" class="bg2">${spc}Revision <B>${cs.commitId?:cs.revision?:cs.changeNumber}</B>by <B>${aUser!=null?aUser.displayName:cs.author.displayName}:</B> <B>(${cs.msgAnnotated})</B></TD> </TR> <j:forEach var="p" items="${cs.affectedFiles}"> <TR> <TD width="10%">${spc}${p.editType.name}</TD> <TD>${p.path}</TD> </TR> </j:forEach> </j:forEach> <j:if test="${!hadChanges}"> <TR> <TD colspan="2">No Changes</TD> </TR> </j:if> </TABLE> <BR /> </j:if> <!-- ARTIFACTS --> <j:set var="artifacts" value="${build.artifacts}" /> <j:if test="${artifacts!=null and artifacts.size()&gt;0}"> <TABLE width="100%"> <TR> <TD class="bg1"> <B>BUILD ATRIFACTS</B> </TD> </TR> <TR> <TD> <j:forEach var="f" items="${artifacts}"> <li> <a href="${rooturl}${build.url}artifact/${f}">${f}</a> </li> </j:forEach> </TD> </TR> </TABLE> <BR /> </j:if> <!-- MAVEN ARTIFACTS --> <j:set var="mbuilds" value="${build.moduleBuilds}" /> <j:if test="${mbuilds!=null}"> <TABLE width="100%"> <TR> <TD class="bg1"> <B>BUILD ATRIFACTS</B> </TD> </TR> <j:forEach var="m" items="${mbuilds}"> <TR> <TD class="bg2"> <B>${m.key.displayName}</B> </TD> </TR> <j:forEach var="mvnbld" items="${m.value}"> <j:set var="artifacts" value="${mvnbld.artifacts}" /> <j:if test="${artifacts!=null and artifacts.size()&gt;0}"> <TR> <TD> <j:forEach var="f" items="${artifacts}"> <li> <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a> </li> </j:forEach> </TD> </TR> </j:if> </j:forEach> </j:forEach> </TABLE> <BR /> </j:if> <!-- JUnit TEMPLATE --> <j:set var="junitResultList" value="${it.JUnitTestResult}" /> <j:if test="${junitResultList.isEmpty()!=true}"> <TABLE width="100%"> <TR> <TD class="bg1" colspan="2"> <B>${project.name} Functional Tests</B> </TD> </TR> <j:forEach var="junitResult" items="${it.JUnitTestResult}"> <j:forEach var="packageResult" items="${junitResult.getChildren()}"> <TR> <TD class="bg2" colspan="2">Name: ${packageResult.getName()} Failed: ${packageResult.getFailCount()} test(s), Passed: ${packageResult.getP assCount()} test(s), Skipped: ${packageResult.getSkipCount()} test(s), Total: ${packageResult.getPassCount()+packageResult.getFailCount()+packageResult.getSkipCount()} test(s)</TD> </TR> <j:forEach var="failed_test" items="${packageResult.getFailedTests()}"> <TR bgcolor="white"> <TD class="test_failed" colspan="2"> <B> <li>Failed: ${failed_test.getFullName()} <br /> <pre> ${failed_test.errorDetails} </pre></li> </B> </TD> </TR> <TR bgcolor="white"> <TD class="test_failed" colspan="2"> <B> <li>StackTrace: ${failed_test.getFullName()} <br /> <pre> ${failed_test.errorStackTrace} </pre></li> </B> </TD> </TR> </j:forEach> </j:forEach> </j:forEach> </TABLE> <BR /> </j:if> <!-- COBERTURA TEMPLATE --> <j:set var="coberturaAction" value="${it.coberturaAction}" /> <j:if test="${coberturaAction!=null}"> <j:set var="coberturaResult" value="${coberturaAction.result}" /> <j:if test="${coberturaResult!=null}"> <table width="100%"> <TD class="bg1" colspan="2"> <B>Cobertura Report</B> </TD> </table> <table width="100%"> <TD class="bg2" colspan="2"> <B>Project Coverage Summary</B> </TD> </table> <table border="1px" class="pane"> <tr> <td>Name</td> <j:forEach var="metric" items="${coberturaResult.metrics}"> <td>${metric.name}</td> </j:forEach> </tr> <tr> <td>${coberturaResult.name}</td> <j:forEach var="metric" items="${coberturaResult.metrics}"> <td data="${coberturaResult.getCoverage(metric).percentageFloat}">${coberturaResult.getCoverage(metric).percentage}% (${coberturaResult.ge tCoverage(metric)})</td> </j:forEach> </tr> </table> <j:if test="${coberturaResult.sourceCodeLevel}"> <h2>Source</h2> <j:choose> <j:when test="${coberturaResult.sourceFileAvailable}"> <div style="overflow-x:scroll;"> <table class="source"> <thead> <tr> <th colspan="3">${coberturaResult.relativeSourcePath}</th> </tr> </thead>${coberturaResult.sourceFileContent}</table> </div> </j:when> <j:otherwise> <p> <i>Source code is unavailable</i> </p> </j:otherwise> </j:choose> </j:if> <j:forEach var="element" items="${coberturaResult.childElements}"> <j:set var="childMetrics" value="${coberturaResult.getChildMetrics(element)}" /> <table width="100%"> <TD class="bg2" colspan="2">Coverage Breakdown by ${element.displayName}</TD> </table> <table border="1px" class="pane sortable"> <tr> <td>Name</td> <j:forEach var="metric" items="${childMetrics}"> <td>${metric.name}</td> </j:forEach> </tr> <j:forEach var="c" items="${coberturaResult.children}"> <j:set var="child" value="${coberturaResult.getChild(c)}" /> <tr> <td>${child.xmlTransform(child.name)}</td> <j:forEach var="metric" items="${childMetrics}"> <j:set var="childResult" value="${child.getCoverage(metric)}" /> <j:choose> <j:when test="${childResult!=null}"> <td data="${childResult.percentageFloat}">${childResult.percentage}% (${childResult})</td> </j:when> <j:otherwise> <td data="101">N/A</td> </j:otherwise> </j:choose> </j:forEach> </tr> </j:forEach> </table> </j:forEach> </j:if> <BR /> </j:if> <!-- HEALTH TEMPLATE --> <div class="content"> <j:set var="healthIconSize" value="16x16" /> <j:set var="healthReports" value="${project.buildHealthReports}" /> <j:if test="${healthReports!=null}"> <h1>Health Report</h1> <table> <tr> <th>W</th> <th>Description</th> <th>Score</th> </tr> <j:forEach var="healthReport" items="${healthReports}"> <tr> <td> <img src="${rooturl}${healthReport.getIconUrl(healthIconSize)}" /> </td> <td>${healthReport.description}</td> <td>${healthReport.score}</td> </tr> </j:forEach> </table> <br /> </j:if> </div> <!-- CONSOLE OUTPUT --> <j:getStatic var="resultFailure" field="FAILURE" className="hudson.model.Result" /> <j:if test="${build.result==resultFailure}"> <TABLE width="100%" cellpadding="0" cellspacing="0"> <TR> <TD class="bg1"> <B>CONSOLE OUTPUT</B> </TD> </TR> <j:forEach var="line" items="${build.getLog(100)}"> <TR> <TD class="console">${line}</TD> </TR> </j:forEach> </TABLE> <BR /> </j:if> </BODY> </j:jelly> <!-- BRANCH --> <TD>Subversion Repo:</TD> <TD>${build.scm}</TD> </TR> does not work, and i am not sure which argument to use with build object to get subversion url. outside jelly script, i can get the Subversion URL, using: Subversion URL: ${ENV, var="SVN_URL"}

    Read the article

  • Retrieving saved checkboxes' name and values from database

    - by sermed
    I have a form with checkboxes, each one has a value. When the registered user select any checkbox the value is incremented (the summation) and then then registred user save his selection of checkbox if he satisfied with the result of summation into database all this work fine ...i want to enable the registred user to view his selection history by retriving and displaying the checkboxes he selected in a page with thier values ... How I can do that? I'm just able to save the selected checkboxes as choice 1, choice 2, for example .. I want to view the selected checkboxes that is saved in database as the appear in the page when the user first select them: for example if the registred user selects these 3 options LEAD DEEP KEEL (1825) FULLY BATTENED MAINSAIL (558) TEAK SIDE DECKS (2889) They will be saved as for example (choice1, choice2, choice3). But if he want to view selected checkboxes the appear exactly as first he selects them: LEAD DEEP KEEL (1825) FULLY BATTENED MAINSAIL (558) TEAK SIDE DECKS (2889) This is my user table: $query="CREATE TABLE User( user_id varchar(20), password varchar(40), user_type varchar(20), firstname varchar(30), lastname varchar(30), street varchar(50), city varchar(50), county varchar(50), post_code varchar(10), country varchar(50), gender varchar(6), dob varchar(15), tel_no varchar(50), vals varchar(50), email varchar(50))"; and the code to inser the options selected to database <?php include("databaseconnection.php"); $str = ''; foreach($_POST as $key => $val) if (strpos($key,'choice') !== false) $str .= $key.','; $query = "INSERT INTO User (vals) VALUES('$str')"; $result=mysql_query($query,$conn); if ($result) { (mysql_error(); } else { echo " done"; } ?> And this is my form: function checkTotal() { document.listForm.total.value = ''; var sum = 0; for (i=0;i <form name="listForm" method="post" action="insert_options.php" > <TABLE cellPadding=3 width=600 border=0> <TBODY> <TR> <TH align=left width="87%" bgColor=#b0b3b4><SPAN class=whiteText>Item</SPAN></TH> <TH align=right width="13%" bgColor=#b0b3b4><SPAN class=whiteText>Select</SPAN></TH></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>General</B></SPAN></TD></TR> <TR> <TD bgcolor="#c4c8ca"><SPAN class=normalText >TEAK SIDE DECKS (2889)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="2889" type="checkbox" onchange="checkTotal()" /></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>LEAD DEEP KEEL (1825)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1825" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>FULLY BATTENED MAINSAIL (558)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="558" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>HIGH TECH SAILS FOR CONVENTIONAL RIG (1979)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1979" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>IN MAST REEFING WITH HIGH TECH SAILS (2539)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="2539" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPlNNAKER GEAR (POLE LINES DECK FITTINGS) (820)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="820" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPINNAKER POLE VERTICAL STOWAGE SYSTEM (214)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="214" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>GAS ROD KICKER (208)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="208" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SIDE RAIL OPENINGS (BOTH SIDES) (392)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="392" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPRING CLEATS MIDSHIPS -ALUMIMIUM (148)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="148" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ELECTRIC ANCHOR WINDLASS (1189)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1189" type="checkbox" onchange="checkTotal()"> </TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ANCHOR CHAIN GALVANISED (50m) (202)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="202" type="checkbox" onchange="checkTotal()"> </TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ANCHOR CHAIN GALVANISED (50m) (1141)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1141" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>NAVIGATION & ELECTRONICS</B></SPAN></TD></TR> <TR> <TD bgcolor="#c4c8ca"><SPAN class=normalText >WIND VANE (STAINLESS STEEL)(41)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="41" type="checkbox" onchange="checkTotal()" /></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>RAYMARINE ST6O LOG & DEPTH (SEPARATE UNITS)(226)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="226" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>ENGINES & ELECTRICS</B></SPAN></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SHORE SUPPLY (220V) WITH 3 OUTLETS (EXCLUDJNG SHORE CABLE) (327)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="327" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>3rd BATTERY(14OA/H)(196)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="196" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>24 AMP BATTERY CHARGER (475)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="475" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>2 BLADED FOLDING PROPELLER (UPGRADE)(299)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="299" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>BELOW DECKS/DOMESTIC</B></SPAN></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>WARM WATER (FROM ENGINE & 220V)(749)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="749" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SHOWER IN AFT HEADS WITH PUMPOUT(446)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="446" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>DECK SUCTION DISPOSAL FOR HOLDINGTANK(166)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="166" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>REFRIGERATED COOLBOX (12V)(666)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="666" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>LFS SAFETY PACKAGE (COCKPIT HARNESS POINTS STAINLESS STEEL JACKSTAYS)(208)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="208" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>UPHOLSTERY UPGRADE IN SALOON (SUEDETYPE)(701)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="701" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>NAVIGATION ELECTRONICS & ELECTRICS</B></SPAN></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>VHF RADIO AERIAL CABLED TO NAVIGATION AREA(178)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="178" type="checkbox" onchange="checkTotal()"></TD></TR> </table>

    Read the article

  • merge cells in one

    - by alkitbi
    $query1 = "select * from linkat_link where emailuser='$email2' or linkname='$domain_name2' ORDER BY date desc LIMIT $From,$PageNO"; now sample show : <table border="1" width="100%"> <tr> <td>linkid</td> <td>catid</td> <td>linkdes</td> <td>price</td> </tr> <tr> <td>1</td> <td>1</td> <td>&nbsp;domain name</td> <td>100</td> </tr> <tr> <td>2</td> <td>1</td> <td>&nbsp;hosting&nbsp; plan one</td> <td>40</td> </tr> <tr> <td>3</td> <td>2</td> <td>&nbsp;domain name</td> <td>20</td> </tr> </table> How do I merge two or more  When there are numbers of cells same on the Table in this way sample? <table border="1" width="100%"> <tr> <td>catid</td> <td>linkdes</td> <td>price</td> </tr> <tr> <td>1</td> <td>linkid(1)- domain namelinkid(2)- hosting&nbsp; plan one</td> <td>10040</td> </tr> <tr> <td>2</td> <td>&nbsp;domain name</td> <td>20</td> </tr> </table>

    Read the article

  • Calculating the total in JavaScript

    - by DAFFODIL
    OP, please replace this text with a detailed description of your problem. Your code is below. I used document.getElementById but the math is not working. I need total to be calculated: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script type = "text/javascript"> function a() { var q = document.getElementById('ad').value; document.getElementById('s').value=q + q; } </script> </head> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_GET['msg']; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <body> <form id="form1" name="form1" method="post" action=""> <table width="846" border="0"> <tr> <td width="411" height="113">&nbsp;</td> <td width="412">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td height="38">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td width="390" rowspan="4">&nbsp;</td> <td width="92" height="35">&nbsp;</td> <td width="136"><?php echo $No;?></td> <td width="36">&nbsp;</td> <td width="170"><?php echo $Date;?></td> </tr> <tr> <td height="37">&nbsp;</td> <td><?php echo $DCNo;?></td> <td>&nbsp;</td> <td><?php echo $DcDate;?></td> </tr> <tr> <td height="34">&nbsp;</td> <td><?php echo $YourOrderNo;?></td> <td>&nbsp;</td> <td><?php echo $OrderDate;?></td> </tr> <tr> <td height="29">&nbsp;</td> <td><?php echo $VendorCode;?></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <table width="845" border="0"> <tr> <td height="38">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="34">&nbsp;</td> <td width="457">&nbsp;</td> <td width="104">&nbsp;</td> <td width="79">&nbsp;</td> <td width="149">&nbsp;</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $descofgoods;?></td> <td><?php echo $Qty;?></td> <td><?php echo $Rate;?></td> <td><input name="Amount" type = "text" id ="ad" value="<?php echo $Amount;?>" /></td> </tr> <?php $i++;} ?> </table> <table width="844" border="0"> <tr> <td width="495" height="1065">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="textfield2" /> &nbsp; &nbsp; &nbsp; &nbsp; </td> <td width="191">&nbsp;</td> <td width="144"><input type="text" name="tot" id="s" onclick="a()"; /></td> </tr>

    Read the article

  • Parsing a complicated HTML table with PHP

    - by user2944979
    I successfully parsed a dynamic table with the following PHP code: $docH = new DOMDocument(); $docH->loadHTMLFile($url); //get everything inside the body element: $bodyH = $docH->getElementsByTagName('body')->item(0); foreach ($bodyH->childNodes as $childNode) { echo $docH->saveHTML($childNode); } Parsed HTML Table: <table> <tr> <td>5CG </td> <td>aass </td> <td>sxs </td> <td>sx </td> <td>EK </td> <td> </td> <td>72 </td> </tr> <td> </td> <td>samplxs </td> <td>xs </td> <td> </td> <td>xss </td> <td>fkxsx aus</td> <td>s </td> </tr> <td> </td> <td>5AH. </td> <td>ds </td> <td>d </td> <td>sdf </td> <td>sdfsdf aus</td> <td> </td> </tr> <tr> <td>6CG </td> <td>3. </td> <td>sfd </td> <td> </td> <td>scs </td> <td>das aus</td> <td>a </td> </tr> <tr> <td>7DG </td> <td>6. </td> <td>s </td> <td>s </td> <td>sD </td> <td>sdsa.</td> <td> </td> </tr> <td> </td> <td>samplxs </td> <td>xs </td> <td> </td> <td>xss </td> <td>fkxsx aus</td> <td>s </td> </tr> <tr> <td>7DG, 7CG, 7CR </td> <td>6. </td> <td>NsdR </td> <td>s </td> <td>SP </td> <td>fasdlt aus</td> <td>s </td> </tr> <td> </td> <td>samplxs </td> <td>xs </td> <td> </td> <td>xss </td> <td>fkxsx aus</td> <td>s </td> </tr> <tr> <td> 9BR </td> <td>6. </td> <td>FEI </td> <td>sa </td> <td>DE </td> <td>fasdad aus</td> <td> </td> </tr> <tr> <td>9AR, 9BR, 9CR</td> <td>62. </td> <td>BEH </td> <td> </td> <td>sd </td> <td>fasda aus</td> <td> </td> </tr> <tr> <td> </td> <td>6. </td> <td>MLR </td> <td> </td> <td>FdR </td> <td>fsdfaus</td> <td> </td> </tr> <tr> <td>E10C </td> <td>6. </td> <td>sdf </td> <td>d </td> <td>d </td> <td>fsdfs aus</td> <td> </td> </tr> <tr> </table> But my goal is to just show the content of the table the user wants by asking for just the <tr> elements in which the first <td> of the first <tr> includes some text until there is another <tr> which first <td> has a different content. For example: If the user types "9BR" into an input field, I just want him to see: <td> 9BR </td> <td>6. </td> <td>FEI </td> <td>sa </td> <td>DE </td> <td>fasdad aus</td> <td> </td> </tr> <tr> <td>9AR, 9BR, 9CR</td> <td>62. </td> <td>BEH </td> <td> </td> <td>sd </td> <td>fasda aus</td> <td> </td> </tr> <tr> <td> </td> <td>6. </td> <td>MLR </td> <td> </td> <td>FdR </td> <td>fsdfaus</td> <td> </td> </tr> If he types in 5CG: <tr> <td>5CG </td> <td>aass </td> <td>sxs </td> <td>sx </td> <td>EK </td> <td> </td> <td>72 </td> </tr> <td> </td> <td>samplxs </td> <td>xs </td> <td> </td> <td>xss </td> <td>fkxsx aus</td> <td>s </td> </tr> Or if 6CG just: <tr> <td>6CG </td> <td>3. </td> <td>sfd </td> <td> </td> <td>scs </td> <td>das aus</td> <td>a </td> </tr>

    Read the article

  • Why does this PHP script interfere with my CSS layout?

    - by CT
    This page uses $_GET to grab an asset id and query a mysql database and return some information. If 'id' does not match anything, no results are displayed but the page looks fine. If 'id' is null an error would occur at $id = $_GET["id"] or die(mysql_error()); When this occurs, they page layout is not displayed correctly. How do I fix this? Bonus question: How would I get a message like "No matching results found" or something when the id does not match any id in the database or is null. Thank you. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Wagman IT Asset</title> </head> <body> <div id="page"> <div id="header"> <img src="images/logo.png" /> </div> </div> <div id="content"> <div id="container"> <div id="main"> <div id="menu"> <ul> <table width="100%" border="0"> <tr> <td><li><a href="index.php">Search Assets</a></li></td> <td><li><a href="browse.php">Browse Assets</a></li></td> <td><li><a href="add_asset.php">Add Asset</a></li></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> </tr> </table> </ul> </div> <div id="text"> <ul> <li> <h1>View Asset</h1> </li> </ul> <table width="100%" border="0" cellpadding="2"> <?php //make database connect mysql_connect("localhost", "asset_db", "asset_db") or die(mysql_error()); mysql_select_db("asset_db") or die(mysql_error()); //get asset $id = $_GET["id"] or die(mysql_error()); //get type of asset $sql = "SELECT asset.type From asset WHERE asset.id = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $type = $row['type']; switch ($type){ case "Server": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,server.manufacturer ,server.model ,server.serial_number ,server.esc ,server.user ,server.prev_user ,server.warranty FROM asset LEFT JOIN server ON server.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $location = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $esc = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr>"; } break; case "Laptop": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,laptop.manufacturer ,laptop.model ,laptop.serial_number ,laptop.esc ,laptop.user ,laptop.prev_user ,laptop.warranty FROM asset LEFT JOIN laptop ON laptop.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $location = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $esc = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr>"; } break; case "Desktop": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,desktop.manufacturer ,desktop.model ,desktop.serial_number ,desktop.esc ,desktop.user ,desktop.prev_user ,desktop.warranty FROM asset LEFT JOIN desktop ON desktop.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $location = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $esc = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr>"; } break; } ?> </table> <br /> <br /> <table width="100%" border="0"> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><a href="#">Add Software</a></td> <td><a href="#">Edit Asset</a></td> <td><a href="#">Delete Asset</a></td> </tr> </table> </div> </div> </div> <div class="clear"></div> <div id="footer" align="center"> <p>&nbsp;</p> </div> </div> <div id="tagline"> Wagman Construction - Bridging Generations since 1902 </div> </body> </html>

    Read the article

  • I'm looking for this graph solution

    - by Ben Fransen
    Hello all, Recently I found a pretty graph when I was browsing the adminskins at ThemeForest and in one of the templates I found a really nice, smooth, clean graph. But I've searching arround but so far without luck finding out which solution is used. And example can be found at: http://enstyled.com/adminus/original/page.html The source of this graph looks like: <table class="stats bar" cellpadding="0" cellspacing="0" width="100%"> <thead> <tr> <td>&nbsp;</td> <th scope="col">02.09</th> <th scope="col">03.09</th> <th scope="col">04.09</th> <th scope="col">05.09</th> <th scope="col">06.09</th> <th scope="col">07.09</th> <th scope="col">08.09</th> <th scope="col">09.09</th> <th scope="col">10.09</th> <th scope="col">11.09</th> <th scope="col">12.09</th> <th scope="col">01.10</th> <th scope="col">02.10</th> <th scope="col">03.10</th> </tr> </thead> <tbody> <tr> <th scope="row">Page views</th> <td>1800</td> <td>900</td> <td>700</td> <td>1200</td> <td>600</td> <td>2800</td> <td>3200</td> <td>500</td> <td>2200</td> <td>1000</td> <td>1200</td> <td>700</td> <td>650</td> <td>800</td> </tr> <tr> <th scope="row">Unique visitors</th> <td>1600</td> <td>650</td> <td>550</td> <td>900</td> <td>500</td> <td>2300</td> <td>2700</td> <td>350</td> <td>1700</td> <td>600</td> <td>1000</td> <td>500</td> <td>400</td> <td>700</td> </tr> </tbody> </table> Can someone please tell me which graphingsolution is used here? Thanks in advance, Ben Fransen

    Read the article

  • Why can I query with an int but not a string here? PHP MySQL Datatypes

    - by CT
    I am working on an Asset Database problem. I receive $id from $_GET["id"]; I then query the database and display the results. This works if my id is an integer like "93650" but if it has other characters like "wci1001", it displays this MySQL error: Unknown column 'text' in 'where clause' All fields in tables are of type: VARCHAR(50) What would I need to do to be able to use this query to search by id that includes other characters? Thank you. <?php <?php /* * ASSET DB FUNCTIONS SCRIPT * */ # connect to database function ConnectDB(){ mysql_connect("localhost", "asset_db", "asset_db") or die(mysql_error()); mysql_select_db("asset_db") or die(mysql_error()); } # find asset type returns $type function GetAssetType($id){ $sql = "SELECT asset.type From asset WHERE asset.id = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $type = $row['type']; return $type; } # query server returns $result (sql query array) function QueryServer($id){ $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchaseDate ,asset.purchaseOrder ,asset.value ,asset.type ,asset.notes ,server.manufacturer ,server.model ,server.serialNumber ,server.esc ,server.warranty ,server.user ,server.prevUser ,server.cpu ,server.memory ,server.hardDrive FROM asset LEFT JOIN server ON server.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); return $result; } # get server data returns $serverArray function GetServerData($result){ while($row = mysql_fetch_assoc($result)) { $id = $row['id']; $company = $row['company']; $location = $row['location']; $purchaseDate = $row['purchaseDate']; $purchaseOrder = $row['purchaseOrder']; $value = $row['value']; $type = $row['type']; $notes = $row['notes']; $manufacturer = $row['manufacturer']; $model = $row['model']; $serialNumber = $row['serialNumber']; $esc = $row['esc']; $warranty = $row['warranty']; $user = $row['user']; $prevUser = $row['prevUser']; $cpu = $row['cpu']; $memory = $row['memory']; $hardDrive = $row['hardDrive']; $serverArray = array($id, $company, $location, $purchaseDate, $purchaseOrder, $value, $type, $notes, $manufacturer, $model, $serialNumber, $esc, $warranty, $user, $prevUser, $cpu, $memory, $hardDrive); } return $serverArray; } # print server table function PrintServerTable($serverArray){ $id = $serverArray[0]; $company = $serverArray[1]; $location = $serverArray[2]; $purchaseDate = $serverArray[3]; $purchaseOrder = $serverArray[4]; $value = $serverArray[5]; $type = $serverArray[6]; $notes = $serverArray[7]; $manufacturer = $serverArray[8]; $model = $serverArray[9]; $serialNumber = $serverArray[10]; $esc = $serverArray[11]; $warranty = $serverArray[12]; $user = $serverArray[13]; $prevUser = $serverArray[14]; $cpu = $serverArray[15]; $memory = $serverArray[16]; $hardDrive = $serverArray[17]; echo "<table width=\"100%\" border=\"0\"><tr><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>General Info</h2></td></tr><tr id=\"hightlight\"><td>Asset ID:</td><td>"; echo $id; echo "</td></tr><tr><td>Company:</td><td>"; echo $company; echo "</td></tr><tr id=\"hightlight\"><td>Location:</td><td>"; echo $location; echo "</td></tr><tr><td>Purchase Date:</td><td>"; echo $purchaseDate; echo "</td></tr><tr id=\"hightlight\"><td>Purchase Order #:</td><td>"; echo $purchaseOrder; echo "</td></tr><tr><td>Value:</td><td>"; echo $value; echo "</td></tr><tr id=\"hightlight\"><td>Type:</td><td>"; echo $type; echo "</td></tr><tr><td>Notes:</td><td>"; echo $notes; echo "</td></tr></table></td><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>Server Info</h2></td></tr><tr id=\"hightlight\"><td>Manufacturer:</td><td>"; echo $manufacturer; echo "</td></tr><tr><td>Model:</td><td>"; echo $model; echo "</td></tr><tr id=\"hightlight\"><td>Serial Number:</td><td>"; echo $serialNumber; echo "</td></tr><tr><td>ESC:</td><td>"; echo $esc; echo "</td></tr><tr id=\"hightlight\"><td>Warranty:</td><td>"; echo $warranty; echo "</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\"><h2>User Info</h2></td></tr><tr id=\"hightlight\"><td>User:</td><td>"; echo $user; echo "</td></tr><tr><td>Previous User:</td><td>"; echo $prevUser; echo "</td></tr></table></td><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>Specs</h2></td></tr><tr id=\"hightlight\"><td>CPU:</td><td>"; echo $cpu; echo "</td></tr><tr><td>Memory:</td><td>"; echo $memory; echo "</td></tr><tr id=\"hightlight\"><td>Hard Drive:</td><td>"; echo $hardDrive; echo "</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\"><h2>Options</h2></td></tr><tr><td colspan=\"2\"><a href=\"#\">Edit Asset</a></td></tr><tr><td colspan=\"2\"><a href=\"#\">Delete Asset</a></td></tr></table></td></tr></table>"; } ?> __ /* * View Asset * */ # include functions script include "functions.php"; $id = $_GET["id"]; if (empty($id)):$id="000"; endif; ConnectDB(); $type = GetAssetType($id); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Wagman IT Asset</title> </head> <body> <div id="page"> <div id="header"> <img src="images/logo.png" /> </div> </div> <div id="content"> <div id="container"> <div id="main"> <div id="menu"> <ul> <table width="100%" border="0"> <tr> <td width="15%"></td> <td width="30%%"><li><a href="index.php">Search Assets</a></li></td> <td width="30%"><li><a href="addAsset.php">Add Asset</a></li></td> <td width="25%"></td> </tr> </table> </ul> </div> <div id="text"> <ul> <li> <h1>View Asset</h1> </li> </ul> <?php if (empty($type)):echo "<ul><li><h2>Asset ID does not match any database entries.</h2></li></ul>"; else: switch ($type){ case "Server": $result = QueryServer($id); $ServerArray = GetServerData($result); PrintServerTable($ServerArray); break; case "Desktop"; break; case "Laptop"; break; } endif; ?> </div> </div> </div> <div class="clear"></div> <div id="footer" align="center"> <p>&nbsp;</p> </div> </div> <div id="tagline"> Wagman Construction - Bridging Generations since 1902 </div> </body> </html>

    Read the article

  • passing values to php print page

    - by DAFFODIL
    In this wen i select a value in drop down box it will list out that name value in table .There will be a check box ,the checked values should be passed to pring page which is below the 1st part of code. Any help ii be appreciated <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query("select * from inv where name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> function ram() { var q=document.getElementById('qty').value; var r=document.getElementById('rate').value; document.getElementById('amt').value=q*r; } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <table width="1315" border="0"> <script type="text/javascript"> function g() { form1.submit(); } </script> <tr> <th>Name</th> <th align="left"><select name="select1" onchange="g();"> <option value="" selected="selected">select</option> <?php $row=mysql_query("select Name from inv "); while($row1=mysql_fetch_array($row)) { ?> <option value="<?php echo $row1['Name'];?>"><?php echo $row1['Name'];?></option> <?php } ?> </select></th> </tr> <tr> <th>Address</th> <th align="left"><textarea name="Address"><?php echo $Address;?></textarea></th> </tr> <tr> <th>City</th> <th align="left"><input type="text" name="City" value='<?php echo $City;?>' /></th> </tr> <tr> <th>Pincode</th> <th align="left"><input type="text" name="Pincode" value='<?php echo $Pincode;?>'></th> </tr> <tr> <th>No</th> <th align="left"><input type="text" name="No2" value='<?php echo $No;?>' readonly="" /></th> </tr> <tr> <th>Date</th> <th align="left"><input type="text" name="Date" value='<?php echo $Date;?>' readonly="" /></th> </tr> <tr> <th>DCNo</th> <th align="left"><input type="text" name="DCNo" value='<?php echo $DCNo;?>' readonly="" /></th> </tr> <tr> <th>DcDate:</th> <th align="left"><input type="text" name="DcDate" value='<?php echo $DcDate;?>' /></th> </tr> <tr> <th>YourOrderNo</th> <th align="left"><input type="text" name="YourOrderNo" value='<?php echo $YourOrderNo;?>' readonly="" /></th> </tr> <tr> <th>OrderDate</th> <th align="left"><input type="text" name="OrderDate" value='<?php echo $OrderDate;?>' readonly="" /></th> </tr> <tr> <th width="80">VendorCode</th> <th width="1225" align="left"><input type="text" name="VendorCode" value='<?php echo $VendorCode;?>' readonly="" /></th> </tr> </table> <table width="1313" border="0"> <tr> <td width="44">&nbsp;</td> <td width="71">SNO</td> <td width="527">DESCRIPTION</td> <td width="214">QUANTITY</td> <td width="214">RATE/UNIT</td> <td width="217">AMOUNT</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><input type="checkbox" name="checkbox" value="checkbox" /></td> <td><input type="text" name="No" value='<?php echo $No;?>' readonly=""/></td> <td><input type="text" name="descofgoods" value='<?php echo $descofgoods;?>' /></td> <td><input type="text" name="qty" maxlength="50000000" id="qty"/></td> <td><input type="text" name="Rate" value='<?php echo $Rate;?>' id="rate" onclick="ram()";></td> <td><input type="text" name="Amount" id="amt"/></td> </tr> <?php $i++;} ?> <tr> <th colspan="2"><a href="pp.php?msg=<?php echo $nam;?>">Print</a></th> </tr> </table> <label></label> </form> </body> </html> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script type = "text/javascript"> function a() { var q = document.getElementsByName('Amount'); var count = 0; for (i = 0; i < q.length; i++) count += parseInt(q[i].value,10); document.getElementById('s').value = count; } </script> </head> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_GET['msg']; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $Name=$row1['Name']; $Address =$row1['Address']; $City=$row1['City']; $Pincode=$row1['Pincode']; $No=$row1['No']; $Date=$row1['Date']; $DCNo=$row1['DCNo']; $DcDate=$row1['DcDate']; $YourOrderNo=$row1['YourOrderNo']; $OrderDate=$row1['OrderDate']; $VendorCode=$row1['VendorCode']; $SNo=$row1['SNo']; $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; } ?> <body> <form id="form1" name="form1" method="post" action=""> <table width="846" border="0"> <tr> <td width="411" height="113">&nbsp;</td> <td width="412">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td height="38">&nbsp;</td> </tr> </table> <table width="846" border="0"> <tr> <td width="390" rowspan="4">&nbsp;</td> <td width="92" height="35">&nbsp;</td> <td width="136"><?php echo $No;?></td> <td width="36">&nbsp;</td> <td width="170"><?php echo $Date;?></td> </tr> <tr> <td height="37">&nbsp;</td> <td><?php echo $DCNo;?></td> <td>&nbsp;</td> <td><?php echo $DcDate;?></td> </tr> <tr> <td height="34">&nbsp;</td> <td><?php echo $YourOrderNo;?></td> <td>&nbsp;</td> <td><?php echo $OrderDate;?></td> </tr> <tr> <td height="29">&nbsp;</td> <td><?php echo $VendorCode;?></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> <table width="845" border="0"> <tr> <td height="38">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="34">&nbsp;</td> <td width="457">&nbsp;</td> <td width="104">&nbsp;</td> <td width="79">&nbsp;</td> <td width="149">&nbsp;</td> </tr> <?php $i=1; $row=mysql_query("select * from inv where Name='$nam'"); while($row1=mysql_fetch_array($row)) { $descofgoods=$row1['descofgoods']; $Qty=$row1['Qty']; $Rate=$row1['Rate']; $Amount=$row1['Amount']; ?> <tr> <td><?php echo $i;?></td> <td><?php echo $descofgoods;?></td> <td><?php echo $Qty;?></td> <td><?php echo $Rate;?></td> <td><input name="Amount" type = "text" value="<?php echo $Amount; ?>" /></td> </tr> <?php $i++;} ?> </table> <table width="844" border="0"> <tr> <td width="495" height="1065">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="text" name="textfield2" width="150" /> &nbsp; &nbsp; &nbsp; &nbsp; </td> <td width="191">&nbsp;</td> <td width="144"><input type="text" name="to" id="s" onclick="a()";/></td> </tr> </table> </form> </body> </html>

    Read the article

  • C# - Parse HTML source as XML

    - by fonix232
    I would like to read in a dynamic URL what contains a HTML file, and read it like an XML file, based on nodes (HTML tags). Is this somehow possible? I mean, there is this HTML code: <table class="bidders" cellpadding="0" cellspacing="0"> <tr class="bidRow4"> <td>kucik (automata)</td> <td class="right">9 374 Ft</td> <td class="bidders_date">2010-06-10 18:19:52</td> </tr> <tr class="bidRow4"> <td>macszaf (automata)</td> <td class="right">9 373 Ft</td> <td class="bidders_date">2010-06-10 18:19:52</td> </tr> <tr class="bidRow2"> <td>kucik (automata)</td> <td class="right">9 372 Ft</td> <td class="bidders_date">2010-06-10 18:19:42</td> </tr> <tr class="bidRow2"> <td>macszaf (automata)</td> <td class="right">9 371 Ft</td> <td class="bidders_date">2010-06-10 18:19:42</td> </tr> <tr class="bidRow0"> <td>kucik (automata)</td> <td class="right">9 370 Ft</td> <td class="bidders_date">2010-06-10 18:19:32</td> </tr> <tr class="bidRow0"> <td>macszaf (automata)</td> <td class="right">9 369 Ft</td> <td class="bidders_date">2010-06-10 18:19:32</td> </tr> <tr class="bidRow8"> <td>kucik (automata)</td> <td class="right">9 368 Ft</td> <td class="bidders_date">2010-06-10 18:19:22</td> </tr> <tr class="bidRow8"> <td>macszaf (automata)</td> <td class="right">9 367 Ft</td> <td class="bidders_date">2010-06-10 18:19:22</td> </tr> <tr class="bidRow6"> <td>kucik (automata)</td> <td class="right">9 366 Ft</td> <td class="bidders_date">2010-06-10 18:19:12</td> </tr> <tr class="bidRow6"> <td>macszaf (automata)</td> <td class="right">9 365 Ft</td> <td class="bidders_date">2010-06-10 18:19:12</td> </tr> </table> I want to parse this into a ListView (or a Grid) to create rows with the data contained. All tr are different row, and all td in a given td is a column in the given row. And also I want it to be as fast as possible, as it would update itself in 5 seconds. Is there any library for this?

    Read the article

  • Why is this unwanted ">" character being displayed when displaying this PHP document in a browser?

    - by CT
    This page takes an asset id from $_GET of the url and displays some info about the asset after querying a mysql database. When I view the page in my browser there is an unwanted "" character within the page and I have no idea why. I've commented where it appears. It appears before the < table create tag right afterward. The < table tag was originally outside the php script section but I threw it in to see if it made a difference. It did not. Thank you all. I am viewing the page in Firefox. The web server is running on an Ubuntu Server 10.04 virtual machine on my laptop. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Wagman IT Asset</title> </head> <body> <div id="page"> <div id="header"> <img src="images/logo.png" /> </div> </div> <div id="content"> <div id="container"> <div id="main"> <div id="menu"> <ul> <table width="100%" border="0"> <tr> <td><li><a href="index.php">Search Assets</a></li></td> <td><li><a href="browse.php">Browse Assets</a></li></td> <td><li><a href="add_asset.php">Add Asset</a></li></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> </tr> </table> </ul> </div> <div id="text"> <ul> <li> <h1>View Asset</h1> </li> </ul> //UNWANTED > CHARACTER APPEARS HERE <?php echo "<table width='100%' border='0' cellpadding='2'>"; //make database connect mysql_connect("localhost", "asset_db", "asset_db") or die(mysql_error()); mysql_select_db("asset_db") or die(mysql_error()); //get asset $id = $_GET["id"]; //get type of asset $sql = "SELECT asset.type From asset WHERE asset.id = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $type = $row['type']; switch ($type){ case "Server": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,server.manufacturer ,server.model ,server.serial_number ,server.esc ,server.user ,server.prev_user ,server.warranty FROM asset LEFT JOIN server ON server.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $company = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $escy = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr></table>"; } break; case "Laptop": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,laptop.manufacturer ,laptop.model ,laptop.serial_number ,laptop.esc ,laptop.user ,laptop.prev_user ,laptop.warranty FROM asset LEFT JOIN laptop ON laptop.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $company = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $escy = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr></table>"; } break; case "Desktop": $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchase_date ,asset.purchase_order ,asset.value ,asset.type ,asset.notes ,desktop.manufacturer ,desktop.model ,desktop.serial_number ,desktop.esc ,desktop.user ,desktop.prev_user ,desktop.warranty FROM asset LEFT JOIN desktop ON desktop.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result)) { echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Asset ID:</td><td>"; $id = $row['id']; setcookie('id', $id); echo "$id</td></tr>"; echo "<tr<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>><td>Company:</td><td>"; $company = $row['company']; setcookie('company', $company); echo "$company</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Location:</td><td>"; $company = $row['location']; setcookie('location', $location); echo "$location</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Date:</td><td>"; $purchase_date = $row['purchase_date']; setcookie('purchase_date', $purchase_date); echo "$purchase_date</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Purchase Order:</td><td>"; $purchase_order = $row['purchase_order']; setcookie('purchase_order', $purchase_order); echo "$purchase_order</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Value:</td><td>"; $value = $row['value']; setcookie('value', $value); echo "$value</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Type:</td><td>"; $type = $row['type']; setcookie('type', $type); echo "$type</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Notes:</td><td>"; $notes = $row['notes']; setcookie('notes', $notes); echo "$notes</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Manufacturer:</td><td>"; $manufacturer = $row['manufacturer']; setcookie('manufacturer', $manufacturer); echo "$manufacturer</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Model / Description:</td><td>"; $model = $row['model']; setcookie('model', $model); echo "$model</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Serial Number / Service Tag:</td><td>"; $serial_number = $row['serial_number']; setcookie('serial_number', $serial_number); echo "$serial_number</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Express Service Code:</td><td>"; $escy = $row['esc']; setcookie('esc', $esc); echo "$esc</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>User:</td><td>"; $user = $row['user']; setcookie('user', $user); echo "$user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Previous User:</td><td>"; $prev_user = $row['prev_user']; setcookie('prev_user', $prev_user); echo "$prev_user</td></tr>"; echo "<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>Warranty:</td><td>"; $warranty = $row['warranty']; setcookie('warranty', $warranty); echo "$warranty</td></tr></table>"; } break; } ?> </div> </div> </div> <div class="clear"></div> <div id="footer" align="center"> <p>&nbsp;</p> </div> </div> <div id="tagline"> Wagman Construction - Bridging Generations since 1902 </div> </body> </html>

    Read the article

  • Jquery change text ajax request problem

    - by blasteralfred
    Hi, I have an html file as coded below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style> .style1 { background-color: #c3d9ff; font-family:arial,sans-serif; } .style2 { text-align: center; font-weight: bold; } .style3 { background-color: #FFFFFF; font-family:arial,sans-serif; text-align: center; font-weight: bold; } .style4 { background-color: #FFFFFF; font-family:arial,sans-serif; text-align: left; } body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:15px; background-color: ; } .action_button { font-weight:bold; float:right; } </style> <script type="text/javascript" src="jquery-1.4.4.min.js"></script> <script type="text/javascript">$(function() { $('.action_button').click(function() { var $button = $(this); $.ajax({ type: 'POST', url: 'action.php', data: 'id='+ $(this).attr('id'), cache: false, success: function(result) { var $row = $button.closest('tr'); var $col = $row.find('.clickme2'); $row.fadeOut('fast', function() { if (result == 'ACTIVATED') { $button.text('Activate'); $col.text('Active'); } else if (result == 'INACTIVATED') { $button.text('Inactivate'); $col.text('Inactive'); } }).fadeIn(); } }); return false; }); }); </script> </head> <body> <table style="width: 90%" align="center" class="style1"> <tr> <td colspan="7" class="style2">MANAGER</td> </tr> <tr> <td class="style3" style="width: 139px">Col1</td> <td class="style3" style="width: 139px">Col2</td> <td class="style3" style="width: 139px">Col3</td> <td class="style3" style="width: 139px">Col4</td> <td class="style3" style="width: 139px">Col5</td> <td class="style3" style="width: 200px">Col6</td> <td class="style3" style="">Action</td> </tr> </table> <td id="main" class="main"> <td class="update"> <table style="width: 90%" align="center" class="style1"> <tr> <td class="style4" style="width: 139px">DataA1</td> <td class="style4" style="width: 139px">DataA2</td> <td class="style4" style="width: 139px">DataA3</td> <td class="style4" style="width: 139px">DataA4</td> <td class="style4 clickme2" style="width: 139px">Inactive</td> <td class="style4" style="width: 200px">DataA6</td> <td> <button href="#" id="DataA1" class="action_button" style="width:80px;height:"> Activate</button> </td> </tr> <tr> <td class="style4" style="width: 139px">DataB1</td> <td class="style4" style="width: 139px">DataB2</td> <td class="style4" style="width: 139px">DataB3</td> <td class="style4" style="width: 139px">DataB4</td> <td class="style4 clickme2" style="width: 139px">Inactive</td> <td class="style4" style="width: 200px">DataB6</td> <td> <button href="#" id="DataB1" class="action_button" style="width:80px;height:"> Activate</button> </td> </tr> <tr> <td class="style4" style="width: 139px">DataC1</td> <td class="style4" style="width: 139px">DataC2</td> <td class="style4" style="width: 139px">DataC3</td> <td class="style4" style="width: 139px">DataC4</td> <td class="style4 clickme2" style="width: 139px">Active</td> <td class="style4" style="width: 200px">DataC6</td> <td> <button href="#" id="DataC1" class="action_button" style="width:80px;height:"> Inactivate</button> </td> </tr> <tr> <td class="style4" style="width: 139px">DataD1</td> <td class="style4" style="width: 139px">DataD2</td> <td class="style4" style="width: 139px">DataD3</td> <td class="style4" style="width: 139px">DataD4</td> <td class="style4 clickme2" style="width: 139px">Active</td> <td class="style4" style="width: 200px">DataD6</td> <td> <button href="#" id="DataD1" class="action_button" style="width:80px;height:"> Inactivate</button> </td> </tr> <tr> <td class="style4" style="width: 139px">DataE1</td> <td class="style4" style="width: 139px">DataE2</td> <td class="style4" style="width: 139px">DataE3</td> <td class="style4" style="width: 139px">DataE4</td> <td class="style4 clickme2" style="width: 139px">Inactive</td> <td class="style4" style="width: 200px">DataE6</td> <td> <button href="#" id="DataE1" class="action_button" style="width:80px;height:"> Activate</button> </td> </tr> </table> </td> </td> </body> </html> The fage contain a table with 5 rows with a button at the end of the row. On click, the button submits data to a php file and then changes text and blurs according to the response from php file. The blur function and change text function in col5 is working well. But the change text function in button got really buggy. The button text should change accordingly. the text of button "Activate" should change to "Inactivate" and the text of button "Inactivate" should change to "Activate" on click / successful submission.. This is not working.. Below is the php file code <?php $id = $_POST[id]; if($id=="DataA1"){ echo "ACTIVATED"; } if($id=="DataB1"){ echo "ACTIVATED"; } if($id=="DataE1"){ echo "ACTIVATED"; } if($id=="DataC1"){ echo "INACTIVATED"; } if($id=="DataD1"){ echo "INACTIVATED"; } ?> Thanks in advance.. :) blasteralfred

    Read the article

  • Javascript to PHP, mysql uploading, one button pressing solution

    - by user2897858
    my program is generating buttons from a mysql database.When one of the button is pressed, it would uplod the current time and the gps coordinate. Sadly, it only works if the same button is pressed twice, but its not an option, because the button has to dissappear. I would like to have some help in coding how to make that possible the user only need to press the button once for the correct upload.Thanks in advance Here is the full code of my my file: <?php session_start(); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>title</title> </head> <?php $maidatum=date("Ymj"); echo "<script>getLocation();</script>"; //Az adatbázishoz való csatlakozás $conn = mysql_connect("localhost","root","asd"); if(!($conn))die("Nincs conn a kiszolgálóval!".mysql_error()); $adatbazisneve="schtrans"; mysql_select_db($adatbazisneve,$conn); mysql_query("set names 'utf8'"); mysql_query("set character set 'utf8'"); //Combobox $sql = "SELECT Jaratszam,Vezeto FROM user"; $rs = mysql_query($sql) or die(mysql_error()); echo "<form action=\"\" method=\"post\">"; echo<<<nev <select name='Lista'> nev; while($row = mysql_fetch_array($rs)){ echo "<option value='".$row["Jaratszam"]."'>".$row["Vezeto"]."</option>"; }mysql_free_result($rs); echo "</select>"; ///Combox vége echo<<<lekerd <form action="" method="post"> <input type="submit" name="bekuldes" value="Lekérdez" /> </form> </form> lekerd; echo<<<gps <form action="" method="post"> <input type="hidden" name= "longitude" id="longitude"> <input type= "hidden" name ="latitude" id="latitude"> </form> gps; if(isset($_POST["bekuldes"])) { $jaratszam = $_POST['Lista']; $_SESSION['jaratsz']=$jaratszam; $lekerdez_parancs="SELECT * FROM cim_$maidatum WHERE jarat=$jaratszam;"; $lekerdez=mysql_query($lekerdez_parancs, $conn); echo "<table border=\"1\">"; echo "<td>Utánvétel</td> <td>Megrendelés összege</td> <td>ISZ</td> <td>Város</td> <td>Utca</td> <td>Megjegyzés</td> <td>Csomagok</td> <td>Raklaphely</td> <td>Súly</td><td>Térfogat</td><td>Latitude</td><td>Longitude</td><td>Ido</td>"; $g=1; //cimszámláló while ($adatok=mysql_fetch_array($lekerdez)) { echo "<tr>"; $_SESSION['adatok0'][$g]=$adatok[0]; echo "<td>$adatok[2]</td> <td>$adatok[3]</td> <td>$adatok[4]</td> <td>$adatok[5]</td> <td>$adatok[6]</td> <td>$adatok[7]</td> <td>$adatok[8]</td> <td>$adatok[9]</td> <td>$adatok[10]</td><td>$adatok[11]</td><td>$adatok[13]</td><td>$adatok[14]</td>"; if ($adatok[12]==null) { echo<<<gomb <form action="" method="post"> <td> <input type="hidden" name= "longitude" id="longitude$g"> <input type= "hidden" name ="latitude" id="latitude$g"> <input type="submit" name="ido" value="$g" /></td> </form> gomb; } else {echo "<td>$adatok[12]</td>";} $g++; } echo "</table>"; } if(isset($_POST["ido"])) { $hanyadik=$_POST["ido"]; $longitudee="longitude$hanyadik"; $latitudee="latitude$hanyadik"; ?> <script> var x=document.getElementById("log"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML="GPS szolgáltatás nem müködik ezen a böngészon, kérlek értesítsd a rendszergazdát!";} } function showPosition(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; document.getElementById("<?php echo $longitudee;?>").value = longitude; document.getElementById("<?php echo $latitudee;?>").value = latitude; } </script> <?php echo "<script>getLocation();</script>"; $latitude=$_POST["latitude"]; $longitude=$_POST["longitude"]; print_r($_POST); $currentime=date("H:i:s"); $acim=$_SESSION['adatok0'][$hanyadik]; $idofeltolt_parancs="UPDATE cim_$maidatum SET ido='$currentime',lat='$latitude',longi='$longitude' WHERE cimid='$acim';"; $feltoltes=mysql_query($idofeltolt_parancs, $conn) or die(mysql_error()); //tryy $jaratszam=$_SESSION['jaratsz']; $lekerdez_parancs="SELECT * FROM cim_$maidatum WHERE jarat=$jaratszam;"; $lekerdez=mysql_query($lekerdez_parancs, $conn); mysql_query("set names 'utf8'"); mysql_query("set character set 'utf8'"); echo "<table border=\"1\">"; echo "<td>Utánvétel</td> <td>Megrendelés összege</td> <td>ISZ</td> <td>Város</td> <td>Utca</td> <td>Megjegyzés</td> <td>Csomagok</td> <td>Raklaphely</td> <td>Súly</td><td>Térfogat</td><td>Latitude</td><td>Longitude</td><td>Ido</td>"; $g=1; //cimszámláló while ($adatok=mysql_fetch_array($lekerdez)) { echo "<tr>"; $_SESSION['adatok0'][$g]=$adatok[0]; echo "<td>$adatok[2]</td> <td>$adatok[3]</td> <td>$adatok[4]</td> <td>$adatok[5]</td> <td>$adatok[6]</td> <td>$adatok[7]</td> <td>$adatok[8]</td> <td>$adatok[9]</td> <td>$adatok[10]</td><td>$adatok[11]</td><td>$adatok[13]</td><td>$adatok[14]</td>"; if ($adatok[12]==null) { echo<<<gomb <form action="" method="post"> <td> <input type="hidden" name= "longitude" id="longitude$g"> <input type= "hidden" name ="latitude" id="latitude$g"> <input type="submit" name="ido" value="$g" /></td> </form> gomb; } else {echo "<td>$adatok[12]</td>";} $g++; } echo "</table>"; } mysql_close($conn); ?> </html>

    Read the article

  • Update table rows in a non-sequential way using the output of a php script

    - by moviemaniac
    Good evening everybody, this is my very first question and I hope I've done my search in stack's archive at best!!! I need to monitor several devices by querying theyr mysql database and gather some informations. Then these informations are presented to the operator in an html table. I have wrote a php script wich loads devices from a multidimensional array, loops through the array and gather data and create the table. The table structure is the following: <table id="monitoring" class="rt cf"> <thead class="cf"> <tr> <th>Device</th> <th>Company</th> <th>Data1</th> <th>Data2</th> <th>Data3</th> <th>Data4</th> <th>Data5</th> <th>Data6</th> <th>Data7</th> <th>Data8</th> <th>Data9</th> </tr> </thead> <tbody> <tr id="Device1"> <td>Devide 1 name</td> <td>xx</td> <td><img src="/path_to_images/ajax_loader.gif" width="24px" /></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr id="Device2"> <td>Devide 1 name</td> <td>xx</td> <td><img src="/path_to_images/ajax_loader.gif" width="24px" /></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr id="DeviceN"> <td>Devide 1 name</td> <td>xx</td> <td><img src="/path_to_images/ajax_loader.gif" width="24px" /></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </tbody> </table> The above table is directly populated when I first load the page; then, with a very simple function, i update this table every minute without reloading the page: <script> var auto_refresh = setInterval( function() { jQuery("#monitoring").load('/overview.php').fadeIn("slow"); var UpdateTime= new Date(); var StrUpdateTime; StrUpdateTime= ('0' + UpdateTime.getHours()).slice(-2) + ':' + ('0' + UpdateTime.getMinutes()).slice(-2) + ':' + ('0' + UpdateTime.getSeconds()).slice(-2); jQuery("#progress").text("Updated on: " + StrUpdateTime); }, 60000); </script> The above code runs in a wordpress environment. It comes out that when devices are too much and internet connection is not that fast, the script times out, even if i dramatically increase the timeout period. So it is impossible even to load the page the first time... Therefore I would like to change my code so that I can handle each row as a single entity, with its own refresh period. So when the user first loads the page, he sees n rows (one per device) with the ajax loader image... then an update cycle should start independently for each row, so that the user sees data gathered from each database... then ajax loader when the script is trying to retrieve data, then the gathered data once it has been collected or an error message stating that it is not possible to gather data since hour xx:yy:zz. So rows updating should be somewhat independent from the others, like if each row updating was a single closed process. So that rows updating is not done sequentially from the first row to the last. I hope I've sufficiently detailed my problem. Currently I feel like I am at a dead-end. Could someone please show me somewhere to start from?

    Read the article

  • on click checkbox set input attr

    - by Tommy Arnold
    html form with 4 columns the first 2 columns are the sizes inside input boxes with disabled ='disabled', when they click radio button to select a size a checkbox appears, when they click that checkbox I would like to change the class and disabled attr of the inputs on that table row to allow them to edit the input box <table width="388" border="1" id="product1"> <tr> <td width="100">Width</td> <td width="100">Height</td> <td width="48">Price</td> <td width="65">Select</td> </tr> <tr> <td><input type="text" disabled='disabled'value="200"/><span> CMS</span></td> <td><input disabled='disabled'type="text" value="500"/><span> CMS</span></td> <td>£50.00</td> <td><input type="radio" name="product1" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product1" value="size2" /> Customise<input disabled='disabled' type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product1" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> </table> <table width="288" border="1" id="product2"> <tr> <td width="72">Width</td> <td width="75">Height</td> <td width="48">Price</td> <td width="65">&nbsp;</td> </tr> <tr> <td>200</td> <td>500</td> <td>£50.00</td> <td><input type="radio" name="product2" value="size1" /> Customise<input type="checkbox" name="custom[size1]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1000</td> <td>£100.00</td> <td><input type="radio" name="product2" value="size2" /> Customise<input type="checkbox" name="custom[size2]" class="custombox" value="1"/></td> </tr> <tr> <td>200</td> <td>1500</td> <td>£150</td> <td><input type="radio" name="product2" value="size3" /> Customise<input type="checkbox" name="custom[size3]" class="custombox" value="1"/></td> </tr> <table> CSS input[type=checkbox] { display: none; } input[type=checkbox].shown { display: inline; } input .edit{ border:1px solid red; } input[disabled='disabled'] { border:0px; width:60px; padding:5px; float:left; background:#fff; } span{float:left; width:30px; padding:5px;} Jquery $("body :checkbox").hide(); // The most obvious way is to set radio-button click handlers for each table separatly: $("#product1 :radio").click(function() { $("#product1 :checkbox").hide(); $("#product1 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); $("#product2 :radio").click(function() { $("#product2 :checkbox").hide(); $("#product2 .cbox").hide(); $(this).parent().children(":checkbox").show(); $(this).parent().children(".cbox").show(); }); This is what I thought but its not working $("#product1 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); $("#product2 :checkbox").click(function(){ $(this).parent("tr").children("td :input").attr('disabled',''); $(this).parent("tr").children("td :input").toggleClass(edit); }); Thanks in advance for any help.

    Read the article

  • Fixed Table Header And Scrolling Body

    - by user2881191
    can Anyone please help me with the example that is on site 'http://mkoryak.github.io/floatThead/examples/inner-scroll/' How Can i Apply the Jquery to the below example. please provide Me the Demo in JSFiddle. I Want to Make My Table Header Fixed With Scrolling (both horizontal and vertical) Body. If Possible I also need to make the last column Fixed as the Header. Please Help Me Reageding the Issue. I Have Been Stuck For a Week. Below Is My test Code For which I need to apply the style as in the above link or any other better approach. Css : #table-container{ background-color :white; overflow:auto; position:absolute; top : 0px; bottom : 18px; width : 100%; z-index: 1; } Jsp : <div id="table-container"> <table id="maintable" style="width: 100%"> <thead> <tr> <th>Col 1</th> <th>Col 2</th> <th>Col 3</th> <th>Col 4</th> <th>Col 5</th> <th>Col 6</th> <th>Col 7</th> <th>Col 8</th> <th>Col 9</th> </tr> </thead> <tbody> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> <tr> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> <td>info</td> </tr> </tbody> </table> </div>

    Read the article

  • Using jQuery to slideToggle a group of Table Rows

    - by CCC
    Hi. I'm fairly new to javaScript and jQuery, so hopefully this will be a quick fix. I need to display a table containing data that can be grouped into several categories, and I'd like to implement a slideToggle that hides/reveals all of the observations in each given category. The code below should (ideally) display a table with 4 columns and 9 rows, with every group of 3 rows preceded by a green "Section i" row. I would like each Section header to work as a slideToggle that expands or collapses all of the rows beneath it. Right now, nothing is collapsing. Any thoughts? <head> <style type="text/css"> td{padding:5px;} </style> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".flip").click(function(){ $(this).next(".section").slideToggle(); }); }); </script> </head> <body> <p> <table id="main_table"> <thead> <tr class="firstline"> <th>Column1</th> <th>Column2</th> <th>Column3</th> <th>Column4</th> </tr> </thead> <tbody> <tr style="background-color:green; color:white"> <td colspan="4" class="flip"> Section 1 </td> </tr> <div class="section"> <tr> <td>item 111</td> <td>item 112</td> <td>item 113</td> <td>item 114</td> </tr> <tr> <td>item 121</td> <td>item 122</td> <td>item 123</td> <td>item 124</td> </tr> <tr> <td>item 131</td> <td>item 132</td> <td>item 133</td> <td>item 134</td> </tr> </div> <tr style="background-color:green; color:white"> <td colspan="4" class="flip"> Section 2 </td> </tr> <div class="section"> <tr> <td>item 211</td> <td>item 212</td> <td>item 213</td> <td>item 214</td> </tr> <tr> <td>item 221</td> <td>item 222</td> <td>item 223</td> <td>item 224</td> </tr> <tr> <td>item 231</td> <td>item 232</td> <td>item 233</td> <td>item 234</td> </tr> </div> <tr style="background-color:green; color:white"> <td colspan="4" class="flip"> Section 3 </td> </tr> <div class="section"> <tr> <td>item 311</td> <td>item 312</td> <td>item 313</td> <td>item 314</td> </tr> <tr> <td>item 321</td> <td>item 322</td> <td>item 323</td> <td>item 324</td> </tr> <tr> <td>item 331</td> <td>item 332</td> <td>item 333</td> <td>item 334</td> </tr> </div> </tbody> </table> </p> </body>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >