Search Results

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

Page 11/106 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to split HTML code with javascript or JQuery

    - by Dean
    Hi I'm making a website using JSP and servlets and I have to now break up a list of radio buttons to insert a textarea and a button. I have got the button and textarea to hide and show when you click on the radio button it shows the text area and button. But this only appears at the top and when there are hundreds on the page this will become awkward so i need a way for it to appear underneath. Here is what my HTML looks like when complied: <form action="addSpotlight" method="POST"> <table> <tr><td><input type="radio" value="29" name="publicationIDs" ></td><td>A System For Dynamic Server Allocation in Application Server Clusters, IEEE International Symposium on Parallel and Distributed Processsing with Applications, 2008</td> </tr> <tr><td><input type="radio" value="30" name="publicationIDs" ></td><td>Analysing BitTorrent's Seeding Strategies, 7th IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC-09), 2009</td> </tr> <tr><td><input type="radio" value="31" name="publicationIDs" ></td><td>The Effect of Server Reallocation Time in Dynamic Resource Allocation, UK Performance Engineering Workshop 2009, 2009</td> </tr> <tr><td><input type="radio" value="32" name="publicationIDs" ></td><td>idk, hello, 1992</td> </tr> <tr><td><input type="radio" value="33" name="publicationIDs" ></td><td>sad, safg, 1992</td> </tr> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Now here is what my JSP looks like: <form action="addSpotlight" method="POST"> <table> <%int i = 0; while(i<ids.size()){%> <tr><td><input type="radio" value="<%=ids.get(i)%>" name="publicationIDs" ></td><td><%=info.get(i)%></td> </tr> <%i++; }%> <div class="abstractWriteup"><textarea name="abstract"></textarea> <input type="submit" value="Add Spotlight"></div> </table> </form> Thanks in Advance Dean

    Read the article

  • Lift XML Parsing Error

    - by bstevens90
    I know there are other questions on this and I have read through almost all of them and none of them solved my problem. I have inside a home directory: def search(in: NodeSeq) : NodeSeq = { bind("work", in, "docId" -> text("", did = _), "visitId" -> text("", vid = _), "provider" -> text("", prov = _), "emCode" -> text(ecode, ecode = _)) } along with: <lift:home.searchForm form="POST" multipart="true" > <table> <tr> <td>DocId</td> <td>VisitId</td> <td>Provider</td> <td>EanMCode</td> </tr> <tr> <td><work:docId /></td> <td><work:visitId /></td> <td><work:provider /></td> <td><work:emCode /></td> <td><button>Click Me!</button></td> </tr> </table> </lift:home.searchForm> Inside an html page. I have included xmlns:lift="http://liftweb.net/" in default.... I can't find anyway to fix this... I am getting XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8080/ Line Number 29, Column 10: <td><work:docId></work:docId></td> in firefox. I have written similar code and had it working in another app and just cant even find anything im doing different thats not trivial naming... Thanks in advance!

    Read the article

  • Download Current WSJ.com Prime Rate

    - by Registered User
    I need to automatically download the current Wall Street Journal Prime Rate and load the data into my database. What is the best method for downloading this data automatically? I have come up with three possible solutions for doing this: Scrape a HTML web page from WSJ. Parse a RSS news feed from WSJ. Use some API that I haven't found from WSJ. Regarding solution 1, although I don't like solution 1 since it could easily break, it's the only one that I have worked out from end to end. It appears I can scrape this page with a WebRequest / WebResponse and read the text in this code: <tr> <td style="text-align:left" class="colhead">&nbsp;</td> <td class="colhead">Latest</td> <td class="colhead">Wk ago</td> <td class="colhead">High</td> <td class="colhead">Low</td> </tr> <tr> <td class="text">U.S.</td> <td style="font-weight:bold;" class="num">3.25</td> <td class="num">3.25</td> <td class="num">3.25</td> <td class="num" style="border-right:0px">3.25</td> </tr> Regarding solution 2, although I can implement a RSS reader solution, I don't see a way to reliably anticipate verbiage for changes in the Prime Rate. Therefore, I don't think this is as safe or reliable a way to get the data as solution 1. Regarding solution 3, I haven't found any published API's for checking money rates like the Prime Rate. If anyone knows of a web service or other API for checking money rates, then please let me know.

    Read the article

  • jQuery custom validation for a selected radio selection

    - by Kaushik Gopal
    Hey peeps, This is my requirement: I have a bunch of radio box selections (types of workflows). If one of the radios are selected(i.e one particular type of workflow selected), I want to run a custom validation on that. This is what i tried, but it's not behaving well. Any help? jQuery part: $(document).ready(function() { // this part is to expand the child radio selection if particular parent workflow selected $("#concernedDirectorChoice").hide(); $("input[name^=workflowChoice]").change( function (){ if($(this).attr("class")=='chooseDir'){ $("#concernedDirectorChoice").show(); }else{ $("#concernedDirectorChoice").hide(); } }); // FORM VALIDATION $.validator.addMethod("dirRequired", function(value, element) { return this.optional(element) || ($("input[name^=rdDir:checked]").length); }, "That particular workflow requires a Director to be chosen. Please select Director"); $("#contExpInitiateForm").validate({ debug:true ,rules:{ RenewalNo: {required: true, number: true}, chooseDir: {dirRequired: true}, workflowChoice: {required: true} } ,errorPlacement: function(error, element) { $('.errorMessageBox').text(error.html()); } }); }); HTML form part: <!-- Pick type of workflow --> <table class="hr-table" > <tr> <td class="hr-table-label " colspan=2 >Pick Workflow Type</td> </tr> <tr> <td> <input type="radio" name="workflowChoice" value="1"> </input> </td> <td> Workflow 1 </td> </tr> <tr> <td> <input type="radio" name="workflowChoice" value="2" class="chooseDir"> </input> </td> <td> Workflow 2 (Dir selection required) </td> </tr> <tr> <td> <input type="radio" name="workflowChoice" value="3"> </input> </td> <td> Workflow 3 </td> </tr> </table> <!-- Pick Director for Workflow type 2 --> <table id="concernedDirectorChoice" name="concernedDirectorChoice" > <tr><td class="hr-table-label" colspan=2 > Choose Concerned Director</td></tr> <tr> <td><input type="radio" value='Dir1' name="rdDir" /></td> <td>Director 1</td> </tr> <tr> <td><input type="radio" value='Dir2' name="rdDir" /></td> <td>Director 2</td> </tr> <tr> <td><input type="radio" value='Dir3' name="rdDir" /></td> <td>Director 3</td> </tr> </table>

    Read the article

  • ASP.net looping through table

    - by c11ada
    hey all, i was wondering if any one could help me out, i have a table which looks something like the following <table id="Table1" border="0"> <tr> <td><b>1.</b> Question 1</td> </tr><tr> <td style="border-width:5px;border-style:solid;"></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio1" type="radio" name="Group1" value="Radio1" /><label for="Radio1">Answer1</label></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio1" type="radio" name="Group1" value="Radio1" /><label for="Radio1">Answer2</label></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio1" type="radio" name="Group1" value="Radio1" /><label for="Radio1">Answer3</label></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio1" type="radio" name="Group1" value="Radio1" /><label for="Radio1">Answer4</label></td> </tr><tr> <td style="height:30px;"></td> </tr><tr> <td><b>2.</b> Question 2</td> </tr><tr> <td style="border-width:5px;border-style:solid;"></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio2" type="radio" name="Group2" value="Radio2" /><label for="Radio2">yes</label></td> </tr><tr> <td align="left" style="width:1000px;"><input id="Radio2" type="radio" name="Group2" value="Radio2" /><label for="Radio2">no</label></td> </tr><tr> <td style="height:30px;"></td> </tr> </table> how do i go about looping through each group of radio buttons and getting the text of the selected radio button ?? thanks a lot !!

    Read the article

  • error echo id when i want to echo id for edit

    - by Prasanta Baidya
    I have a entry and edit page of a branch, I want echo id, when I mouse over into edit link in edit button, its show error,: branchedit.php?id=Note:Undefined index:id in line 101, but it work properly in localhost. error picture page link : https://www.dropbox.com/s/i1vu62lz3pezia0/id%20error.JPG My code: <?php include 'include/config.php'; include 'include/opendb.php'; include 'loginheader.php'; ?> <!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>Branch</title> <!--Requered Validation --> <link rel="stylesheet" type="text/css" media="screen" href="jqueryvalidation/demo/css/screen.css" /> <script src="jqueryvalidation/jquery.js" type="text/javascript"></script> <script src="jqueryvalidation/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#commentForm").validate(); }); </script> <!--End Requered Validation --> <style type="text/css"> <!-- body { background-color: #cccccc; } --> </style> <style type="text/css"> <!-- --> </style> <link href="css/usercss.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style7 { color: #000000; font-weight: bold; } .style8 {color: #FFFFFF} --> </style> </head> <body> <div id="container"> <table width="453" border="0" align="left" cellpadding="0" cellspacing="1"> <tr> <td width="451"><form name="cmxform" id="commentForm" method="post" action="insert_ac.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td colspan="3" class="style2">Insert Branch into Database </td> </tr> <tr> <td width="100" height="46">Branch Code</td> <td width="18">:</td> <td width="309"><input name="branch_code" type="text" id="branch_code" minlength="3" class="required"></td> </tr> <tr> <td height="51">Branch Name</td> <td>:</td> <td><input name="branch_name" type="text" id="branch_name" class="required" ></td> </tr> <tr> <td height="47" colspan="3" align="center"> <div align="right"> <input name="Submit" type="submit" class="submit_button" value="Submit" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div></td> </tr> </table> </form></td> </tr> </table> <!--Branch List --> <?php $sql="SELECT * FROM dc_master"; $result=mysql_query($sql); ?> <table width="436" border="1" cellpadding="2" cellspacing="0" class="table" id="list"> <tr> <td colspan="4"><div align="center" class="style7">List of Branches </div></td> </tr> <tr class="style4" > <td width="87" align="center"><span class="style8">Branch Code</span></td> <td width="176" align="center" ><span class="style8">Branch Name</span></td> <td width="70" align="center" ><span class="style8">Edit</span></td> <td width="77" align="center" ><span class="style8">Delete</span></td> </tr> <?php while($rows=mysql_fetch_array($result)){ ?> <tr> <td height="28"><div align="center" class="style3"><?php echo $rows['branch_code']; ?></div></td> <td class="style3">&nbsp;&nbsp;&nbsp;<?php echo $rows['dc_name']; ?></td> <!--link to update.php and send value of id --> <td align="center"><a href="branchedit.php?id=<?php echo $rows['id']; ?>" class="style3 style5 style5">Edit</a></td> <td align="center"><a href="delete.php?id=<?php echo $rows['id']; ?>" class="style3 style5 style5" onclick="return confirm('Are you sure, you want to delete? (After delete you can not undo or get it again) <?php ?>')">Delete</a></td> </tr> <?php } ?> </table> <span class="footer">Programmer : Prasanta Baidya / Mobile : 09830980840 / Email id : [email protected]</span></div> <?php mysql_close(); ?> </body> </html>

    Read the article

  • What would be the PHP equivalent of this Perl regex?

    - by Jamie
    What would be the PHP equivalent of this Perl regex? if (/^([a-z0-9-]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/ and $1 ne "global" and $1 ne "") { print " <tr>\n"; print " <td>$1</td>\n"; print " <td>$2</td>\n"; print " <td>$3</td>\n"; print " <td>$4</td>\n"; print " <td>$5</td>\n"; print " <td>$6</td>\n"; print " <td>$7</td>\n"; print " <td>$8</td>\n"; print " </tr>\n"; }

    Read the article

  • ASP.Net repeater item.DataItem is null

    - by mattgcon
    Within a webpage, upon loading, I fill a dataset with two table with a relation between those tables and then load the data into a repeater with a nested repeater. This can also occur after the user clicks on a button. The data gets loaded from a SQL database and the repeater datasource is set to the dataset after a postback. However, when ItemDataBound occurs the Item.Dataitem is always null. Why would this occur? below is my HTML repeater code <asp:Repeater ID="rptCustomSpaList" runat="server" onitemdatabound="rptCustomSpaList_ItemDataBound"> <HeaderTemplate> </HeaderTemplate> <ItemTemplate> <table> <tr> <td> <asp:Label ID="Label3" runat="server" Text="Spa Series:"></asp:Label> </td> <td> <asp:Label ID="Label4" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SPASERIESVALUE") %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label5" runat="server" Text="Spa Model:"></asp:Label> </td> <td> <asp:Label ID="Label6" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SPAMODELVALUE") %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label9" runat="server" Text="Acrylic Color:"></asp:Label> </td> <td> <asp:Label ID="Label10" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "ACRYLICCOLORVALUE") %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label11" runat="server" Text="Cabinet Color:"></asp:Label> </td> <td> <asp:Label ID="Label12" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CABPANCOLORVALUE") %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label17" runat="server" Text="Cabinet Type:"></asp:Label> </td> <td> <asp:Label ID="Label18" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CABINETVALUE") %>'></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label13" runat="server" Text="Cover Color:"></asp:Label> </td> <td> <asp:Label ID="Label14" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "COVERCOLORVALUE") %>'></asp:Label> </td> </tr> </table> <asp:Label ID="Label15" runat="server" Text="Options:"></asp:Label> <asp:Repeater ID="rptCustomSpaItem" runat="server"> <HeaderTemplate> <table> </HeaderTemplate> <ItemTemplate> <tr> <td> <asp:Label ID="Label1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "PROPERTY") %>'></asp:Label> </td> <td> <asp:Label ID="Label2" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "VALUE") %>'></asp:Label> </td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> <table> <tr> <td style="padding-top:15px;padding-bottom:30px;"> <asp:Label ID="Label7" runat="server" Text="Configured Price:"></asp:Label> </td> <td style="padding-top:15px;padding-bottom:30px;"> <asp:Label ID="Label8" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "SPAVALUEVALUE") %>'></asp:Label> </td> </tr> </table> <asp:Label ID="Label16" runat="server" Text="------"></asp:Label> </ItemTemplate> <FooterTemplate></FooterTemplate> </asp:Repeater>

    Read the article

  • The equivalent of this Perl regex in PHP

    - by Jamie
    Hi all, What would be the equivalent in php of this regex in php: I.e. which function would do the same job. if (/^([a-z0-9-]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/ and $1 ne "global" and $1 ne "") { print " <tr>\n"; print " <td>$1</td>\n"; print " <td>$2</td>\n"; print " <td>$3</td>\n"; print " <td>$4</td>\n"; print " <td>$5</td>\n"; print " <td>$6</td>\n"; print " <td>$7</td>\n"; print " <td>$8</td>\n"; print " </tr>\n"; } Thanks very much! :-)

    Read the article

  • Need help simplifying my php table

    - by user342391
    I am relatively new to php and have a feeling that I am going the long way round when displaying data from mysql. I have a table a I want to show a few fields from my database. How would I achieve this without having to echo every bit of the table??? Here is the code: <?php $query1 = mysql_send("SELECT firstname, lastname, email, user, country FROM customers WHERE id='".$_COOKIE['custid']."'"); while ($row = mysql_fetch_array($query1)) { echo ' <table id="account_table" style="width:550px; border:none; "> <tr> <td width="155">Contact Name</td>'; echo '<td width="335">'; echo $row['firstname'] ; echo '&nbsp;'; echo $row['lastname']; echo '</td> </tr> <tr> <td>Email Address</td> <td>'; echo $row['email']; echo ' </td> </tr> <tr> <td>Username</td> <td>' ; echo $row['user']; echo '</td> </tr> <tr> <td>Country</td> <td>'; echo $row['country']; echo '</td> </tr> <tr> <td>Time Zone</td> <td>GMT+1</td> </tr> <tr> <td>Activated</td> <td>16 Dec 2009</td> </tr> </table>'; } ?>

    Read the article

  • Selenium: How to use stored value in a javascript comparison

    - by dstrube
    I've searched around for the answer to this and found lots of much more complicated questions, but none that gave me insight enough to figure this one out. What I'm doing: 1- open a page with a number that will probably be large 2- get the X Path to where that number is and store it to a variable 3- do a javascript to compare the above stored variable to see if it is bigger than 10, if so, set a new varaible to true; else false (because that is the default value) 4- verify the variable in #3 is true Sounds simple enough, no? Where it goes wrong: At step 3, comparing the variable from step #2 to 10 isn't allowed, at least not the way I'm writing it. Why? Details: <tr> <td>open</td> <td>http://www.google.com/search?hl=en&q=selenium+verifyEval</td> <td></td> </tr> <tr> <td>store</td> <td>/html/body/div[5]/div/p/b[3]</td> <td>resultCount</td> </tr> <tr> <td>storeEval</td> <td>var isMoreThan10 = new Boolean(); isMoreThan10 = (resultCount &gt; 10);</td> <td>isMoreThan10</td> </tr> <tr> <td>verifyExpression</td> <td>${isMoreThan10}</td> <td>true</td> </tr> I just thought of one possible workaround: Exapnd the javascript code to get the value there & assign it to a variable there so I'll be more likely to be able to use that variable in the javascript. Not sure exactly how that would be done- anyone wanna help with that? But surely there is be a better way, isn't there? I must be able to assign a value to a variable in Selenium, then in the next line use that variable in a javascript, right?

    Read the article

  • Multiple task in one page?(php - mysql - jquery)

    - by python
    My goal is to build an application in a page that can be use multiple task(crud) for example in this html code.there are multiple submit,multiple action in the same page after (user submit (CURD) it will load result table below.) In juery how Can I do this.? <script type="text/javascript" src="jquery.js"></script> <script> $(document).ready(function(){ $("#button1").click(function(){ $('form#crudform').attr({action: "script_1.php"}); $('form#crudform').submit(); }); $("#button2").click(function(){ $('form#crudform').attr({action: "script_2.php"}); $('form#crudform').submit(); }); $("#button3").click(function(){ $('form#crudform').attr({action: "script_3.php"}); $('form#crudform').submit(); }); }); </script> Form CRUD: <form id="crudform" method="post"> <p>Name: <input type="text" name="name"/></p> <p>Age: <input type="text" name="age"/></p> <input type="button" id="button1" value="Cancel" /> <input type="button" id="button2" value="Save" /> <input type="button" id="button3" value="Update" /> </form> Result: <form id="result" method="post"> <table border="1"> <tr> <tr><td></td><td>Name</td><td>Age</td> </tr> <tr><td><input type="checkbox" name="name1"></td><td>Name1</td><td>10</td><tr> <tr><td><input type="checkbox" name="name1"></td><td>Name2</td><td>15</td></tr> <tr><td><input type="checkbox" name="name3"></td><td>Name3</td><td>16</td></tr> </table> <input type="button" id="button4" value="change" /> <input type="button" id="button5" value="drop" /> </form> Anybody know the tutorials relating ..with my tasks.or tips,guide.....are welconme :)

    Read the article

  • PHP - Nested Looping Trouble

    - by Jeremy A
    I have an HTML table that I need to populate with the values grabbed from a select statement. The table cols are populated by an array (0,1,2,3). Each of the results from the query will contain a row 'GATE' with a value of (0-3), but there will not be any predictability to those results. One query could pull 4 rows with 'GATE' values of 0,1,2,3, the next query could pull two rows with values of 1 & 2, or 1 & 3. I need to be able to populate this HTML table with values that correspond. So HTML COL 0 would have the TTL_NET_SALES of the db row which also has the GATE value of 0. <?php $gate = array(0,1,2,3); $gate_n = count($gate); /* Database = my_table.ID my_table.TT_NET_SALES my_table.GATE my_table.LOCKED */ $locked = "SELECT * FROM my_table WHERE locked = true"; $locked_n = count($locked); /* EXAMPLE RETURN Row 1: my_table['ID'] = 1 my_table['TTL_NET_SALES'] = 1000 my_table['GATE'] = 1; Row 2: my_table['ID'] = 2 my_table['TTL_NET_SALES'] = 1500 my_table['GATE'] = 3; */ print "<table border='1'>"; print "<tr><td>0</td><td>1</td><td>2</td><td>3</td>"; print "<tr>"; for ($i=0; $i<$locked_n; $i++) { for ($g=0; $g<$gate_n; $g++) { if (!is_null($locked['TTL_NET_SALES'][$i]) && $locked['GATE'][$i] == $gate[$g]) { print "<td>$".$locked['TTL_NET_SALES'][$i]."</td>"; } else { print "<td>-</td>"; } } } print "</tr>"; print "</table>"; /* What I want to see: <table border='1'> <tr> <td>0</td> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>-</td> <td>1000</td> <td>-</td> <td>1500</td> </tr> </table> */ ?>

    Read the article

  • why this sql code dont work

    - by magy
    <!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=windows-1256"> <title>??? ?????? ???? ????</title> </head> <body> <table width="100%" border="1"> <tr> <td>name</td> <td>number</td> <td>math</td> <td>arab</td> <td>history</td> <td>geo</td> </tr> <?php require_once "conf.php"; $sql2=("SELECT * FROM student WHERE snum = $ss"); $rs2 = mysql_query($sql2) or die(mysql_error()); $num = mysql_num_rows($rs2); $ss= $_POST["ss"]; if (empty($ss)) { echo "please write your search words";} else if ($num < 1 ) { echo "not found any like "; }else { $sql=("SELECT * FROM student WHERE snum = $ss "); $rs = mysql_query($sql) or die(mysql_error()); while($data=mysql_fetch_array($rs)){ $name=$data["sname"]; $number=$data["snum"]; $math=$data["math"]; $arab=$data["arab"]; $history=$data["history"]; $geo=$data["geo"]; echo" <tr> <td>$name</td> <td>$number</td> <td>$math</td> <td>$arab</td> <td>$history</td> <td>$geo</td> </tr> "; } }; ?> </table> </body> </html>

    Read the article

  • PHP: Opening/closing tags & performance?

    - by Tom
    Hi, This may be a silly question, but as someone relatively new to PHP, I'm wondering if there are any performance-related issues to frequently opening and closing PHP tags in HTML template code, and if so, what might be best practices in terms of working with php tags? My question is not about the importance/correctness of closing tags, or about which type of code is more readable than another, but rather about how the document gets parsed/executed and what impact it might have on performance. To illustrate, consider the following two extremes: Mixing PHP and HTML tags: <?php echo '<tr> <td>'.$variable1.'</td> <td>'.$variable2.'</td> <td>'.$variable3.'</td> <td>'.$variable4.'</td> <td>'.$variable5.'</td> </tr>' ?> // PHP tag opened once Separating PHP and HTML tags: <tr> <td><?php echo $variable1 ?></td> <td><?php echo $variable2 ?></td> <td><?php echo $variable3 ?></td> <td><?php echo $variable4 ?></td> <td><?php echo $variable5 ?></td> </tr> // PHP tag opened five times Would be interested in hearing some views on this, even if it's just to hear that it makes no difference. Thanks.

    Read the article

  • Ignore a css class applied to a parent table

    - by user2585299
    <table class="table table-bordered table-hover table-condensed data_table"> <tbody data-bind="foreach: outboundFaxLogs"> <tr> </tr> <tr> <td></td> <td colspan="8"> <table> <tr style="border:none"> <td>ReFax Status</td> <td>FaxTo</td> <td>Completion</td> <td>FaxID</td> </tr> <tbody data-bind="foreach: ResubmissionHistory""> <tr style="border:none"> <td data-bind="text: Status" ></td> <td data-bind="text: FaxToNbr"></td> <td data-bind="text: $root.formatDateTime(CompletionTime)"></td> <td data-bind="text: OutboundFaxLogId"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> The parent table has a css class applied to it which is table-bordered. Its a twitter bootstrap style element. I don't want that style to be applied to the child table. How can I do this ? I do not want the lines that appear in between the table cells for the child table.

    Read the article

  • send data from one table to another page

    - by user91599
    I have this table I want when I click on a link in a table row that do a redirect to another page the data will be sent to the new page that can help me I have not found how to start I'm really stuck code table <table cellpadding="0" cellspacing="0" border="0" class="display" id="example"> <thead> <tr> <th>Date</th> <th>provider</th> <th>CI</th> <th>CELL</th> <th>BSC</th> <th>Commentaire</th> <th>nbr</th> <th>Type</th> <th><img src="{{ asset('image/Modify.png') }}" ALIGN="CENTER"/></th> <th><img src="{{ asset('image/Info.png') }}" ALIGN="CENTER"/></th> <th><img src="{{ asset('image/Male.png') }}" ALIGN="CENTER"/></th> <th>type_alertes</th> </tr> </thead> <tbody> <div class="textbox"> <h2> Information KPI dégradées</h2> <div class="textbox_content" id="kpi_dégrades"> {% for liste in listes %} <tr class="gradeU"> <td>{{ liste.DAT }} </td> <td>{{ liste.PROVIDER}} </td> <td>{{ liste.CI}} </td> <td>{{ liste.CELL}} </td> <td>{{ liste.BSC}}</td> <td>{{ liste.Cmts}}</td> <td >{{ liste.nbr}}</td> <td>{{ liste.TYPE}}</td> <td><a class="edit" href="">Edit</a></td> <td onclick="getInfo('{{ liste.CELL}}')">Information KPI dégradés</td> <td>{{ liste.user_name}}</td> <td>{{ liste.type_alertes}}</td> </tr> {% endfor %} </div> </div> </tbody>

    Read the article

  • Get Checked RadioButtons using JavaScript

    - by Rudi
    so I’m trying to build a win 8 app, which includes a WebView. The WebView contains the HTML code (+JavaScript) below. <!DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <html> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8' > <script type='text/javascript'> function get_radio_value() { for (var i=0; i < document.myForm.frage1.length; i++) { if (document.orderform.frage1[i].checked) { var rad_val = document.myForm.frage1[i].value; return rad_val; } } } </script> <title>Kundenfragebogen</title> </head> <body> <h1>Kundenfragebogen</h1> <div id='myDiv'>Hello</div> <form name='myForm' action=''> <table border='2'> <tr> <td></td> <td>sehr gut</td> <td>gut</td> <td>schlecht</td> </tr> <tr> <td>Wie geht es Ihnen?</td> <td><input type='radio' name="frage1" value='1'/>Mir ging es noch nie besser!</td> <td><input type='radio' name="frage1" value='2'/>Es geht mir so wie immer.</td> <td><input type='radio' name="frage1" value='3'/>Heute geht einfach gar nichts…</td> </tr> <tr> <td>Können Sie Auto fahren?</td> <td><input type='radio' name="frage2" value='1'/>Ja</td> <td></td> <td><input type='radio' name="frage2" value='3'/>Nein</td> </tr> <tr> <td>Möchten Sie unseren Newsletter abonnieren?</td> <td><input type='radio' name="frage3" value='1'/>Ja</td> <td></td> <td></td> </tr> </table> <input type='button' value='Formular absenden' onclick="return get_radio_value()"/> </form> </body> </html> So the html contains some radio buttons and a button. I’ve used JavaScript ~2 years ago (just a little), so I don’t really know how to write the exact code. I’ve found something on the internet, but it doesn’t do what I want. I want to have the following: The user can check the RadioButtons. When the user clicks the Button, the JavaScript function should return all the checked radio buttons (I only need to know which RadioButton is checked). Since I know the name of the RadioButtons in my Windows 8 App, I can do the following: var object = WebView.InvokeScript("JavaScriptFunctionNAME", NameOfRadiobutton); So the WebView invokes the script and should get as a return the VALUE of the RadioButton, which is checked. “JavaScriptFunctionNAME” = name of the function in Javascript NameOfRadiobutton = the name of the RadioButton as a parameter (for example “frage1”). Currently I’m returning the value of the radiobutton, which is checked in the RadioGroup “frage1”. How can I check every RadioButton by it’s parameter? By this I mean I have a parameter “frage1” and return the value of the checked RadioButton. After this, I call the function again with the parameter “frage2” and return the checked RadioButtons value. Could anyone help me out with the JavaScript-function?

    Read the article

  • How to delete an empty column in HTML table using XSLT?

    - by Monomachus
    Hi, How to delete an empty column in HTML table using XSLT, and having something like this: <table id="cas6"> <tr> <td /> <td> <table> <tr> <td>rechin</td> <td /> </tr> <tr> <td>amarillo</td> <td /> </tr> </table> </td> </tr> </table> <table id="cas7"> <tr> <td>rechin</td> <td /> </tr> <tr> <td>amarillo</td> <td /> </tr> <tr> <td>this shouldn't been</td> <td>deleted</td> </tr> </table> To delete the empty column, this being said to remove td's which are empty in all tr's in a Xth position

    Read the article

  • dynamically insert new rows in the table (JavaScript) ?

    - by Karandeep Singh
    <script type="text/javascript" language="javascript"> function addNewRow() { var table = document.getElementById("table1"); var tr = table.insertRow(); var td = tr.insertCell(); td.innerHTML= "a"; td = tr.insertCell(); td.innerHTML= "b"; td = tr.insertCell(); td.innerHTML= "c"; td = tr.insertCell(); td.innerHTML= "d"; td = tr.insertCell(); td.innerHTML= "e"; } </script> <body> <table id="table1" border="1" cellpadding="0" cellspacing="0" width="100%"> <tr id="row1"> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> </tr> </table> <input type="button" onClick="addNewRow()" value="Add New"/> </body> This example is for dynamically insert new row and cells in the table. But its behavior is different in all browsers. Internet Explorer = It add row in the last and new added cells are starts from first. Chrome/Safari = It add new row in the first and new added cells are starts from end. Mozilla Firefox = It is not working. Sir, I want new added row in the last and new added cells starts from first like(Interner Explorer) in all browsers. If you have any solution for same behavior please tell me. Thanks,

    Read the article

  • Update (ajax) only part of table without affecting whole table

    - by ile
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list"> <tr> <th><a href="#" class="sortby">Full Name</a></th> <th><a href="#" class="sortby">City</a></th> <th><a href="#" class="sortby">Country</a></th> <th><a href="#" class="sortby">Status</a></th> <th><a href="#" class="sortby">Education</a></th> <th><a href="#" class="sortby">Tasks</a></th> </tr> <div class="dynamicData"> <tr> <td>Firstname Lastname</a></td> <td>Los Angeles</td> <td>USA</td> <td>Married</td> <td>High School</td> <td>4</td> </tr> </tr> <tr> <td>Firstname Lastname</a></td> <td>Los Angeles</td> <td>USA</td> <td>Married</td> <td>High School</td> <td>4</td> </tr> </div> </table> The idea is to update table rows when clicking on link with clasl "sortby" which is part of th table tag. I tried inserting div but this doesn't work. Separating this in two tables is not good solution because witdh in both tables cell are not following each other. Any other solution? Thanks

    Read the article

  • Shell script for generating HTML out put

    - by user1638016
    The following script is generating the desired out put but not redirecting the result to /home/myuser/slavedelay.html #!/bin/bash host=<ip> echo $host user=usr1 password=mypass threshold=300 statusok=OK statuscritical=CRITICAL for i in ert7 ert9 do echo "<html>" > /home/myuser/slavedelay.html if [ "$i" == "ert7" ]; then slvdelay=`mysql -u$user -p$password -h<ip> -S /backup/mysql/mysql.sock -e 'show slave status\G' | grep Seconds_Behind_Master | sed -e 's/ *Seconds_Behind_Master: //'` if [ $slvdelay -ge $threshold ]; then echo "<tr><td>$i</td><td>CRITICAL</td>" >> /home/myuser/slavedelay.html echo "<tr><td>$i</td><td>CRITICAL</td>" else echo "<tr><td>$i</td><td>OK</td>" >> /home/myuser/slavedelay.html echo "<tr><td>$i</td><td>OK</td>" fi fi done echo "</html>" >> /home/myuser/slavedelay.html If I cat the output file /home/myuser/slavedelay.html it gives. <html> </html> Execution result : sh slave_delay.sh <tr><td>sdb7</td><td>OK</td>

    Read the article

  • php validation code format

    - by user2970887
    Okay I have this MySQL database form and am trying to add validation to it. After 2 days of fighting with it, I thought I would get some advice. Would like that the selected item from dropdown and Firstname, Phone, Email, are all required. Then I want to verify that the data in the Firstname, Lastname, Phone (doesn't have to be any special format), Email and Comments are all acceptable formats before putting in database. Here is what I have so far: <?php include('inc_header.php'); if(isset($_POST['add'])) { require('dbcon.php'); if(! get_magic_quotes_gpc() ) { $Id = addslashes ($_POST['Id']); $List = addslashes ($_POST['List']); $Firstname = addslashes ($_POST['Firstname']); $Lastname = addslashes ($_POST['Lastname']); $Phone = addslashes ($_POST['Phone']); $Email= addslashes ($_POST['Email']); $Calltime = addslashes ($_POST['Calltime']); $Comment = addslashes ($_POST['Comment']); } else { $Id = $_POST['Id']; $Date = $_POST['Date']; $List = $_POST['List']; $Firstname = $_POST['Firstname']; $Lastname = $_POST['Lastname']; $Phone = $_POST['Phone']; $Email = $_POST['Email']; $Calltime = $_POST['Calltime']; $Comment = $_POST['Comment']; } $error = ''; //put chosen function here function validate_Firstname($input, $pattern = "/([A-Za-z0-9])") { return !preg_match($pattern, $input); } function validate_Phone($input, $pattern = "/([A-Za-z0-9])") { return !preg_match($pattern, $input); } function isValidEmail( $Email ){ return filter_var( $Email, FILTER_VALIDATE_EMAIL ); } //get values and validate each one as required $List = mysql_real_escape_string($_POST['List']); if(!$List){ $error .= "Please choose one<br />"; } $Firstname = mysql_real_escape_string($_POST['Firstname']); if(!$Firstname){ $error .= "First name is required<br />"; } //get values and validate each one as required $Lastname = mysql_real_escape_string($_POST['Lastname']); if(!$Lastname){ $error .= "Last name is required<br />"; } //repeat for each field $Email = mysql_real_escape_string($_POST['Email']); if(!isValidEmail($Email)){ $error .= "The email entered is invalid<br />"; } //and so on... if(!$error){ //add insert into database code here $sql = "INSERT INTO contacts ". "(`Id`,`Date`,`List`,`Firstname`,`Lastname`,`Phone`,`Email`,`Calltime`,`Comment`)". "VALUES'$Id,','$Date','$List','$Firstname','$Lastname','$Phone','$Email','$Calltime','$Comment') "; mysql_select_db('hmintcwa_contacts'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not enter data: ' . mysql_error()); } echo "Entered data successfully<br /><br /><a href=contactsadd.php><font color=#000000>Back</font></a>\n"; mysql_close($conn); } else { ?> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" name="ContactForm"> <table bgcolor="#000000" width="500" cellpadding="5" cellspacing="1" border="0"> <input type="hidden" name="Id" id="Id"> <tr> <td bgcolor="#e9e9e9" align="right">Requested Info</td> <td bgcolor="#ffffff" align="left"><select name="List"> <option value="0" > Please Choose One </option> <option value="Market Analysis" > Market Analysis </option> <option value="Consultation" > Consultation </option></select></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Date</td> <input name="Date" type="hidden" id="Date" value="<? print(Date("l F d, Y")); ?>" /> <td bgcolor="#ffffff" align="left"><? print(Date("l F d, Y")); ?></td> </tr> <tr> <td bgcolor="#e9e9e9" align="right">Firstname</td> <td bgcolor="#ffffff" align="left"><input name="Firstname" type="text" size="20" id="Firstname"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Lastname</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Lastname" size="20" id="Lastname"></td> </tr> <tr> <td bgcolor="#e9e9e9" align="right">Phone</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Phone" size="20" id="Phone"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Email</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Email" size="20" id="Email"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Preferred Calltime</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Calltime" size="20" id="Calltime"> &nbsp;&nbsp; If none put N/A</td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Comment</td> <td bgcolor="#ffffff" align="left"><textarea name="Comment" cols="40" rows="8" id="Comment"></textarea></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">&nbsp;</td> <td bgcolor="#ffffff" align="center"><br> <input name="add" type="submit" id="add" value="Add Contact"><input type="reset" name="Reset" value="Clear Form"><input type=button value="Cancel" onClick="history.go(-1)"><br>&nbsp; </td> </tr> </table> </form> <br>&nbsp;</center> <?php } ?> </body> </html> So far I just keep chasing error message. Please forgive formatting I am trying to learn be gentle.

    Read the article

  • preg_replace replacing with array

    - by Scott
    What I want to do is replace the "[replace]" in input string with the corresponding vaule in the replace array. The total number of values will change but there will always be the same number in the replace array as in input string. I have tried doing this with preg_replace and preg_replace_callback but I can't get the pattern right for [replace], I also tried using vsprintf but the % in <table width="100%"> was messing it up. All help is greatly appreciated! Replace Array: $array = array('value 1','value 2','value 3'); Input String $string = ' <table width="100%"> <tr> <td>Name:</td> <td>[replace]</td> </tr> <tr> <td>Date:</td> <td>[replace]</td> </tr> <tr> <td>Info:</td> <td>[replace]</td> </tr> </table> '; Desired Result <table width="100%"> <tr> <td>Name:</td> <td>value 1</td> </tr> <tr> <td>Date:</td> <td>value 2</td> </tr> <tr> <td>Info:</td> <td>value 3</td> </tr> </table>

    Read the article

  • Port Forwarding(?) TD-W8961nd

    - by rich
    I have a bit of a weird internet setup. I am connected via a decent WiFi connection (from work) which I pick up using a Buffalo Airstation Wireless-G box. This simply picks up the signal and gives me 4 ethernet ports to connect to. That's all fine and works as it should. I also have a TP LINK TD-W8961nd router which used to be connected to the Airstation via an ethernet cable so I could essentially have WiFi access in my house. To cut a long story short I can't remember how the hell I got it to work and I can't find the notes I scribbled down on how to do it. I'm pretty sure I need to tell the router what ip to pick up the internet connection from and have the local wifi as a seperate network. How the hell I do that I have no idea right now. Can anyone give me some advice on this? If you need more information ask and I will be able to do so. Cheers in advance. edit I'm in work at the moment so I can't give 100% details but I will be able to later on.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >