Search Results

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

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

  • How to find rows between other rows w/ID then add class

    - by Ravex
    Hi guys. i'm stuck with my table. need create toggle rows function. but i no idea how to find sub rows in table. Some one can help me? I have table with many rows 500 All Rows have class="row-1,row-2.....row-600 etc" And all main rows also have class="parent" between each "parent" rows i have 6 rows So i need for toggle/collapse purposes find all (sub)rows betwen parent rows. and add class with id like in prevous parent row. For example: parent have class="row-1 parent" all sub must have - class="child-row-1" default table <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table> in the end it should look like this: <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even child-row-1"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd child-row-1"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table>

    Read the article

  • Splitting data from MySQL using PHP & Javascript works in IE but not in FF

    - by MTSzabo
    I have the following JavaScript function on a page: function setFields(){ var menu = document.getElementById('EditLocation'); var itemDataArray = menu[menu.selectedIndex].value.split('|'); form.LocationShortName.value = itemDataArray[0]; form.LocationLongName.value = itemDataArray[1]; form.Phone.value = itemDataArray[2]; form.Address1.value = itemDataArray[3]; form.CityStateZip.value = itemDataArray[4]; form.MapLink.value = itemDataArray[5]; } Down on the Form, I have the following: <select class="input2" name="EditLocation" id="EditLocation" onchange = "setFields();"> <option value="-Add New-"<?php if($editlocation=='-Add New-'){echo(' selected="selected"');} ?>>-Add New-</option> <?php require_once('connection.php'); $connection = mysql_connect($hostname,$username,$password) or die (mysql_errno().": ".mysql_error()."<BR />"); mysql_select_db($database); $sql = "SELECT * FROM directions ORDER BY dirshortname"; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)) { echo('<option value="'.stripslashes($row['dirshortname']).'|'.stripslashes($row['dirlongname']).'|'.stripslashes($row['dirphone']).'|'.stripslashes($row['dirstreet']).'|'.stripslashes($row['dircsz']).'|'.stripslashes($row['dirmaplink']).'"'); if ($editlocation==stripslashes($row['dirshortname'])) { echo(' selected="selected"'); } echo('>'.stripslashes($row['dirshortname']).'</option>'); } ?> In essence, the PHP is supposed to pack the data elements pulled from MySQL into the OPTION VALUE portion of the SELECT box. Once the user selects a record, the JavaScript pulls the packed data apart and populates the other data elements on the FORM. It all works wonderfully in IE, but in FF the fields do not populate with data. The form is somewhat long, but I'll include it anyway for the sake of completeness. <form action="admin-dirs.php" method="post" enctype="multipart/form-data" style="margin:0px; padding:0px " id="form"> <table width="587" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="60">&nbsp;</td> <td width="185">Select Location to Edit: </td> <td width="342"><select class="input2" name="EditLocation" id="EditLocation" onchange = "setFields();"> <option value="-Add New-"<?php if($editlocation=='-Add New-'){echo(' selected="selected"');} ?>>-Add New-</option> <?php require_once('connection.php'); $connection = mysql_connect($hostname,$username,$password) or die (mysql_errno().": ".mysql_error()."<BR />"); mysql_select_db($database); $sql = "SELECT * FROM directions ORDER BY dirshortname"; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)) { echo('<option value="'.stripslashes($row['dirshortname']).'|'.stripslashes($row['dirlongname']).'|'.stripslashes($row['dirphone']).'|'.stripslashes($row['dirstreet']).'|'.stripslashes($row['dircsz']).'|'.stripslashes($row['dirmaplink']).'"'); if ($editlocation==stripslashes($row['dirshortname'])) { echo(' selected="selected"'); } echo('>'.stripslashes($row['dirshortname']).'</option>'); } ?> </select></td> </tr> <tr> <td width="60">&nbsp;</td> <td colspan="2"><span class="main" style=" padding-left:12px; padding-right:12px; padding-top:6px"><br /> (Note: Leaving the Long Name blank will duplicate the Short Name.)</span></td> </tr> <?php if(!$errlocationshortname=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$errlocationshortname.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>Location Short Name: <span class="red_star">*</span> </td> <td><input name="LocationShortName" id="LocationShortName" type="text" class="input2<?php if(!$errlocationshortname==''){echo('r');} ?>" value="<?php echo($locationshortname); ?>" maxlength="50"></td> </tr> <?php if(!$errlocationlongname=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$errlocationlongname.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>Location Long Name: <span class="red_star">*</span> </td> <td><input name="LocationLongName" id="LocationLongName" type="text" class="input2<?php if(!$errlocationlongname==''){echo('r');} ?>" value="<?php echo($locationlongname); ?>" maxlength="50"></td> </tr> <?php if(!$erraddress=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$erraddress.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>Street Address: <span class="red_star">*</span> </td> <td><input name="Address1" id="Address1" type="text" class="input2<?php if(!$erraddress==''){echo('r');} ?>" value="<?php echo($address); ?>"></td> </tr> <?php if(!$errcsz=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$errcsz.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>City, State, Zip: <span class="red_star">*</span> </td> <td><input name="CityStateZip" id="CityStateZip" type="text" class="input2<?php if(!$errcsz==''){echo('r');} ?>" value="<?php echo($csz); ?>"></td> </tr> <?php if(!$errphone=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$errphone.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>Location Phone Number: <span class="red_star">*</span> </td> <td><input name="Phone" id="Phone" type="text" class="input2<?php if(!$errphone==''){echo('r');} ?>" value="<?php echo($phone); ?>" maxlength="20"></td> </tr> <?php if(!$errmaplink=='' ){echo(' <tr> <td width="60">&nbsp;</td> <td width="185">&nbsp;</td> <td width="342"><span class="redtxterror">'.$errmaplink.'</span></td> </tr>');} ?> <tr> <td>&nbsp;</td> <td>Paste Link to Map: <span class="red_star">*</span> </td> <td><input name="MapLink" id="MapLink" type="text" class="input2<?php if(!$errmaplink==''){echo('r');} ?>" value="<?php echo($maplink); ?>" maxlength="125"></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><div align="right" style="padding-right:25px"> <input type="hidden" id="action" name="action" value="submitform" /> <input type="submit" id="savenew" name="savenew" value="Save & New" /> <input type="submit" id="submit" name="submit" value="Save & Close" /> <?php if(!isset($_POST['action'])) {?> <input type="reset" id="reset" name="reset" value="Reset" /> <?php } ?> </div></td> </tr><tr> <td>&nbsp;</td> <td>&nbsp;</td> <td class="main_d"><div align="right" style="padding-right:25px">Your IP Address is Logged as: <?php echo($ip); ?></div></td> </tr> </table> </form>

    Read the article

  • Parsing HTML using HTTP Agility Pack

    - by Pajci
    Here is one table out of 5: <h3>marec - maj 2009</h3> <div class="graf_table"> <table summary="layout table"> <tr> <th>DATUM</th> <td class="datum">10.03.2009</td> <td class="datum">24.03.2009</td> <td class="datum">07.04.2009</td> <td class="datum">21.04.2009</td> <td class="datum">05.05.2009</td> <td class="datum">06.05.2009</td> </tr> <tr> <th>Maloprodajna cena [EUR/L]</th> <td>0,96000</td> <td>0,97000</td> <td>0,99600</td> <td>1,00800</td> <td>1,00800</td> <td>1,01000</td> </tr> <tr> <th>Maloprodajna cena [SIT/L]</th> <td>230,054</td> <td>232,451</td> <td>238,681</td> <td>241,557</td> <td>241,557</td> <td>242,036</td> </tr> <tr> <th>Prodajna cena brez dajatev</th> <td>0,33795</td> <td>0,34628</td> <td>0,36795</td> <td>0,37795</td> <td>0,37795</td> <td>0,37962</td> </tr> <tr> <th>Trošarina</th> <td>0,46205</td> <td>0,46205</td> <td>0,46205</td> <td>0,46205</td> <td>0,46205</td> <td>0,46205</td> </tr> <tr> <th>DDV</th> <td>0,16000</td> <td>0,16167</td> <td>0,16600</td> <td>0,16800</td> <td>0,16800</td> <td>0,16833</td> </tr> </table> </div> I have to extract out values, where table header is DATUM and Maloprodajna cena [EUR/L]. I am using Agility HTML pack. this.htmlDoc = new HtmlAgilityPack.HtmlDocument(); this.htmlDoc.OptionCheckSyntax = true; this.htmlDoc.OptionFixNestedTags = true; this.htmlDoc.OptionAutoCloseOnEnd = true; this.htmlDoc.OptionOutputAsXml = true; // is this necessary ?? this.htmlDoc.OptionDefaultStreamEncoding = System.Text.Encoding.Default; I had a lot of trouble with getting those values out. I started with: var query = from html in doc.DocumentNode.SelectNodes("//div[@class='graf_table']").Cast<HtmlNode>() from table in html.SelectNodes("//table").Cast<HtmlNode>() from row in table.SelectNodes("tr").Cast<HtmlNode>() from cell in row.SelectNodes("th|td").Cast<HtmlNode>() select new { Table = table.Id, CellText = cell.InnerHtml }; but could not figure out a way to select only values where table header is DATUM and Maloprodajna cena[EUR/L]. Is it possible to do that with where clause? Then I ended with those two queries: var date = (from d in htmlDoc.DocumentNode.SelectNodes("//div[@class='graf_table']//table//tr[1]/td") select DateTime.Parse(d.InnerText)).ToArray(); var price = (from p in htmlDoc.DocumentNode.SelectNodes("//div[@class='graf_table']//table//tr[2]/td") select double.Parse(p.InnerText)).ToArray(); Is it possible to combine those two queries? And how would I convert that to lambda expression? I just started to learn those things and I would like to know how it is done so that in the future I would not have those question. O, one more question ... does anybody know any graph control, cause I have to show those values in graph. I started with Microsoft Chart Controls, but I am having trouble with setting it. So if anyone has any experience with it I would like to know how to set it, so that x axle will show all values not every second ... example: if I have: 10.03.2009, 24.03.2009, 07.04.2009, 21.04.2009, 05.05.2009, 06.05.2009 it show only: 10.03.2009, 07.04.2009, 05.05.2009, ect. I bind data to graph like that: chart1.Series["Series1"].Points.DataBindXY(date, price); I lot of questions for my fist post ... hehe, hope that I was not indistinct or something. Thank's for any reply!

    Read the article

  • Hi i am creating a php calendar i have a Problem in that

    - by udaya
    Hi i am creating a calendar i which i filled the year and date like this <<<<< Year <<<<< month by clicking on the arrow marks the year and month can be increased and decreased now i have to fill the dates for the year and month selected I calculated the first day of month and last date of the month The dates must be start filling from the first day Say if the first day is thursday the date 1 must be on thursday and the next days must follow that till the last date These are my functions in my controller " function phpcal() { $month=04; $day=01; $year=2010; echo date("D", mktime(0,0,0,$month,$day,$year)); //here i am calculating the first day of the month echo '<br>lastdate'.date("t", strtotime($year . "-" . $month . "-01"));'' here i am calculating the lasdt date of the month //echo '<br>'.$date_end = $this->lastOfMonth(); $this->load->view('phpcal'); } function firstOfMonth($m1,$y1) { return date("m/d/Y", strtotime($m1.'/01/'.$y1.' 00:00:00')); } function lastOfMonth() { return date("m/d/Y", strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00')))); } function phpcalview() { $year = $this->input->post('yearvv'); $data['year'] = $this->adminmodel->selectyear(); $data['date'] = $this->adminmodel->selectmonth(); //print_r($data['date'] ); $this->load->view('phpcal',$data); } This is my view page <table cellpadding="2" cellspacing="0" border="1" bgcolor="#CCFFCC" align="center" class="table_Style_Border"> <? if(isset($date)) { foreach($date as $row) {?> <tr> <td><?= $row['dbDate1'];?></td> <td><?= $row['dbDate2'];?></td> <td><?= $row['dbDate3'];?></td> <td><?= $row['dbDate4'];?></td> <td><?= $row['dbDate5'];?></td> <td><?= $row['dbDate6'];?></td> <td><?= $row['dbDate7'];?></td> </tr> <tr bgcolor="#FFFFFF"> <td><?= $row['dbDate8'];?></td> <td><?= $row['dbDate9'];?></td> <td><?= $row['dbDate10'];?></td> <td><?= $row['dbDate11'];?></td> <td><?= $row['dbDate12'];?></td> <td><?= $row['dbDate13'];?></td> <td><?= $row['dbDate14'];?></td> </tr> <tr> <td><?= $row['dbDate15'];?></td> <td><?= $row['dbDate16'];?></td> <td><?= $row['dbDate17'];?></td> <td><?= $row['dbDate18'];?></td> <td><?= $row['dbDate19'];?></td> <td><?= $row['dbDate20'];?></td> <td><?= $row['dbDate21'];?></td> </tr> <tr bgcolor="#FFFFFF"> <td><?= $row['dbDate22'];?></td> <td><?= $row['dbDate23'];?></td> <td><?= $row['dbDate24'];?></td> <td><?= $row['dbDate25'];?></td> <td><?= $row['dbDate26'];?></td> <td><?= $row['dbDate27'];?></td> <td><?= $row['dbDate28'];?></td> </tr> <tr> <td><?= $row['dbDate29'];?></td> <td><?= $row['dbDate30'];?></td> <td><?= $row['dbDate31'];?></td> <td><?= $row['dbDate1'];?></td> <td><?= $row['dbDate1'];?></td> <td><?= $row['dbDate1'];?></td> <td><?= $row['dbDate1'];?></td> </tr> </tr> <? }} ?> </table> How can i insert the dates starting from the day i have calculated in the function phpcal

    Read the article

  • How to make a table that looks like this in html or make a tableless one

    - by Sithelo
    I have a to present data in html with headers. Below is the image of part of the header which i am struggling with. I have managed to rotate the text but the problem is there overlap. This is the code of the whole structure. <style type="text/css"> .text-rotation { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; height:inherit; } </style> </head> <body> <table width="100%" border="1" align="center" cellpadding="3" cellspacing="1"> <tr> <td rowspan="5">&nbsp;</td> <td rowspan="5" align="center" valign="bottom">Code</td> <td rowspan="5" align="center" valign="bottom">Change</td> <td rowspan="5" align="center" valign="bottom">Description</td> <td colspan="6" align="center" bgcolor="#FF6666">STOCK RANGE</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> <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> <td colspan="2" align="center" bgcolor="#66CC00" >SPHERICAL</td> <td colspan="2" align="center" bgcolor="#FFCC00" >SPH/CYL-/-</td> <td colspan="2" align="center" bgcolor="#0066CC">SPH/CYL+/-</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> <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> <td rowspan="3" align="center" bgcolor="#66CC00" class="text-rotation">MINUS</td> <td rowspan="3" align="center" bgcolor="#66CC00" class="text-rotation">PLUS</td> <td rowspan="3" align="center" bgcolor="#FFCC00" class="text-rotation">MINUS</td> <td rowspan="3" align="center" bgcolor="#FFCC00" class="text-rotation">PLUS</td> <td rowspan="3" align="center" bgcolor="#0066CC" class="text-rotation">PLUS</td> <td rowspan="3" align="center" bgcolor="#0066CC" class="text-rotation">MINUS</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> <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> <td>&nbsp;</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> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</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> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</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> <td>&nbsp;</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> <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> </table> </body>

    Read the article

  • jQuery table replace

    - by Happy
    We have a table: <table> <tr> <td width="10">1</td> <td>text 1</td> </tr> <tr> <td width="10">2</td> <td>text 2</td> </tr> <tr> <td width="10">3</td> <td>text 3</td> </tr> <tr> <td width="10">4</td> <td>text 4</td> </tr> <tr> <td width="10">5</td> <td>text 5</td> </tr> <tr> <td width="10">6</td> <td>text 6</td> </tr> <tr> <td width="10">7</td> <td>text 7</td> </tr> <tr> <td width="10">8</td> <td>text 8</td> </tr> <tr> <td width="10">9</td> <td>text 9</td> </tr> <tr> <td width="10">10</td> <td>text 10</td> </tr> </table> We update this table by throwing into each <tr> 3 <td>, each <td> with width="10" attribute must be deleted. It must look like: <table> <tr> <td>text 1</td> <td>text 2</td> <td>text 3</td> </tr> <tr> <td>text 4</td> <td>text 5</td> <td>text 6</td> </tr> <tr> <td>text 7</td> <td>text 8</td> <td>text 9</td> </tr> <tr> <td>text 10</td> </tr> </table> How can we do this? Thanks.

    Read the article

  • making query from different related tables using codeigniter

    - by fatemeh karam
    I'm using codeigniter as i mentioned this is a part of my view code foreach($projects_query as $row)// $row indicates the projects { ?> <tr><td><h3><button type="submit" class="button red-gradient glossy" name = "project_click" > <?php echo $row->txtTaskName; ?></button></h3></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> <?php foreach($tasks_query as $row2) { // if( $row->txtTaskName == "TestProject") if($row->intTaskID == $row2->intInside)// intInside indicades that the current task($row2) is the subset of which task (system , subsystem or project) { if($row2->intSummary == 0)//if the task(the system) is an executable task & doesn't have any subtask: { $query_team_user_id = $this->admin_in_out_model->get_user_team_task_query($row2->intTaskID);//runs the function and generates a query from tbl_userteamtask where intTaskID equals to the selected row's intTaskID foreach($query_team_user_id as $row_teamid) { $query_teamname = $this->admin_in_out_model->get_team_name($row_teamid->intTeamID); $query_fn_ln = $this->admin_in_out_model->get_fn_ln_from_userid($row_teamid->intUserID); foreach($query_teamname as $row_teamname) {?> <tr><td></td><td></td><td><h4> <?php echo $row2->txtTaskName;?></h4></td> <td><b><font color='#F33558'><?php echo $row_teamname->txtTeamName;?></font></b></td> <?php } foreach($query_fn_ln as $row_f_l_name) {?> <td> <?php echo $row_f_l_name->txtFirstname." ".$row_f_l_name->txtLastname;?></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> <?php }?> </tr> <?php } } else{ ?> <tr><td></td><td></td><td><h4> <?php echo $row2->txtTaskName;?></h4></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><?php } foreach($tasks_query as $row_subsystems) { if($row_subsystems->intInside == $row2->intTaskID )//if the task is the subtask of a system(it means the task is a subsystem) { if($row_subsystems->intSummary == 0)//if the task is an executable task & doesn't have any subtask: { $query_team_user_id = $this->admin_in_out_model->get_user_team_task_query($row_subsystems->intTaskID); foreach($query_team_user_id as $row_teamid) {?> <tr><?php $query_teamname = $this->admin_in_out_model->get_team_name($row_teamid->intTeamID); $query_fn_ln = $this->admin_in_out_model->get_fn_ln_from_userid($row_teamid->intUserID); foreach($query_teamname as $row_teamname) {?> <td></td><td></td><td><h5><?php echo $row_subsystems->txtTaskName?></h5><br/></td> <td><b><font color='#F33558'><?php echo $row_teamname->txtTeamName;?></font></b></td><?php } foreach($query_fn_ln as $row_f_l_name) {?> <td><?php echo $row_f_l_name->txtFirstname." ".$row_f_l_name->txtLastname;?></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><?php }?> </tr><?php } } else{ ?><tr><td></td><td></td><td><h5><?php echo $row_subsystems->txtTaskName?></h5></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><?php } foreach($tasks_query as $row_tasks) { if($row_tasks->intInside == $row_subsystems->intTaskID )//if the task is the subtask of a subsystem { if($row_tasks->intSummary == 0)//if the task is an executable task & doesn't have any subtask: { $query_team_user_id = $this->admin_in_out_model->get_user_team_task_query($row_tasks->intTaskID); foreach($query_team_user_id as $row_teamid) {?> <tr><?php $query_teamname = $this->admin_in_out_model->get_team_name($row_teamid->intTeamID); $query_fn_ln = $this->admin_in_out_model->get_fn_ln_from_userid($row_teamid->intUserID); foreach($query_teamname as $row_teamname) {?> <td></td><td></td><td><b><?php echo $row_tasks->txtTaskName;?></b></td> <td><b><font color='#F33558'><?php echo $row_teamname->txtTeamName;?></font></b></td><?php } foreach($query_fn_ln as $row_f_l_name) {?> <td><?php echo $row_f_l_name->txtFirstname." ".$row_f_l_name->txtLastname;?></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><?php }?> </tr><?php } } } } } } } } }?> and in controller i have $projects_query = $this->admin_in_out_model->get_projects(); $tasks_query = $this->admin_in_out_model->get_systems(); $userteamtask = $this->admin_in_out_model->get_user_team_task(); $data['tasks_query'] = $tasks_query; $data['projects_query'] = $projects_query; $this->load->view('project_view',$data); but as you see I'm calling my model functions within the view how can i do something else to do this i mean not calling my model function in my view I have to add that, my model function have parameters these are the model functions: function get_projects() { $this -> db -> select('*'); $this -> db -> from('tbl_task'); $this -> db -> where('intInside','0'); $query = $this->db->get(); return $query->result(); } function get_systems() { $this -> db -> select('*'); $this -> db -> from('tbl_task '); $this -> db -> where('intInside <> ','0'); $query = $this->db->get(); return $query->result(); } function get_user_team_task_query($task_id)//gets information from tbl_userteamtask where the field intTaskID is equal to $task_id { $this -> db -> select('*'); $this -> db -> from('tbl_userteamtask'); $this -> db -> where('intTaskID',$task_id); $query_teamid = $this->db->get(); return $query_teamid->result(); } function get_user_team_task()//gets information from tbl_userteamtask where the field intTaskID is equal to $task_id { $this -> db -> select('*'); $this -> db -> from('tbl_userteamtask'); // $this -> db -> where('intTaskID',$task_id); $query_teamid = $this->db->get(); return $query_teamid->result(); } function get_team_name($query_teamid) { $this -> db -> select('*'); $this -> db -> from('tbl_team'); $this -> db -> where('intTeamID',$query_teamid); $query_teamname = $this->db->get(); return $query_teamname->result(); } function get_user_name($query_userid) { $this -> db -> select('*'); $this -> db -> from('tbl_user'); $this -> db -> where('intUserID',$query_userid); $query_username = $this->db->get(); return $query_username->result(); } function get_fn_ln_from_userid($selected_id) { $this -> db -> select('tbl_user.intUserID, tbl_user.intPersonID,tbl_person.intPersonID,tbl_person.txtFirstname, tbl_person.txtLastname'); $this -> db -> from('tbl_user , tbl_person'); $where = "tbl_user.intPersonID = tbl_person.intPersonID "; $this -> db -> where($where); $this -> db -> where('tbl_user.intUserID', $selected_id); $query = $this -> db -> get();//makes query from DB return $query->result(); } do I have to use subquery ? is this true? i mean can i do this? foreach( $data as $key => $each ) { $data[$key]['team_id'] = $this->get_user_team_task_query( $each['intTaskID'] ); foreach($data[$key]['team_id'] as $key_teamname => $each) { $data[$key_teamname]['team_name'] = $this->get_team_name( $each['intTeamID'] ); } } the model code: foreach( $data as $key => $each ) { $data[$key]['intTaskID'] = $each['intTaskID']; $data[$key]['team_id'] = $this->get_user_team_task_query( $each['intTaskID'] ); foreach($data[$key]['team_id'] as $key => $each) { $data[$key]['team_name'] = $this->get_team_name( $each['intTeamID'] ); #fetching of the teamname and saving in the array $data[$key]['user_name'] = $this->get_fn_ln_from_userid( $each['intUserID'] ); foreach($data[$key]['user_name'] as $key => $each) { $data[$key]['first_name'] = $each['txtFirstname'] ; $data[$key]['last_name'] = $each['txtLastname'] ; } $data[$key]['first_name'] = $data[$key]['first_name']; $data[$key]['last_name'] = $data[$key]['last_name']; } }

    Read the article

  • Array from HTML forms - Internal Server Error

    - by user1392411
    I try to make a requestform for our school. But if I transmit this form I get a "Internal Server Error". I searched but I found nothing like that. Also I don't get a only this error message "Internal Server Error", nothing more. Any ideas why? <!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"> <meta name="description" content=""> <link rel="stylesheet" href="../css/normalize.css" /> <link rel="stylesheet" href="../css/bestellformular.css" /> <!-- HTML 5 in Internet Explorer 9 und kleiner aktivieren --> <!--[if lt IE 9]> <script type="textt/javascript" src="js/html5shiv.js"></script> <![endif]--> </head> <body> <section id="head"> </section> <form action="../php/einlesen.php" method="post"> <section id="body"> <h1>Bestellung</h1> <table> <colgroup> <col width="10%"> <col width="80%"> <col width="10%"> </colgroup> <tr> <th> Artikel-Nr. </th> <th> Artikel </th> <th> Menge </th> </tr> <tr> <td> <input type="number" placeholder="Artikel-Nr." name="articelnr[]" required /> </td> <td> <input type="text" placeholder="Name des Artikels" name="articelname[]" required /> </td> <td> <input type="number" placeholder="Menge" name="quantity[]" required /> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> <tr> <td> <input type="number" name="articelnr[]" /> </td> <td> <input type="text" name="articelname[]" /> </td> <td> <input type="number" name="quantity[]"/> </td> </tr> </table> </section> <section id="info"> <div class="left"> <hr /> <p> Kundennummer <input type="text" /> </p> </div> <div class="right"> <table> <tr> <td>Firma</td> <td><input type="text" name="company"required /></td> </tr> <tr> <td>Ort, PLZ</td> <td><input type="text" name="place" required /></td> <td><input type="number" name="plz" class="number" required /></td> </tr> <tr> <td>Straße, Nr.</td> <td><input type="text" name="street"required /></td> <td><input type="number" name="streetnr" class="number" required /></td> </tr> <tr> <td>Telefon</td> <td><input type="tel" name="tel" required /></td> </tr> <tr> <td>Fax</td> <td><input type="text" name="fax" required /></td> </tr> <tr> <td>E-Mail</td> <td><input type="email" name="email" required /></td> </tr> <tr> <td>Datum</td> <td><input type="date" name="date" required placeholder="tt.mm.jj"/></td> </tr> </table> </div> </section> <section id="submit"> <input type="checkbox" name="agb" required /> Ich habe die <a href="../docs/agb.pdf">AGB</a> gelesen und akzeptiere diese. <input type="submit" value="Bestellung Abschicken"/> </section> </form> <section id="footer"> <hr /> </section> </body> </html> Any Ideas why? The data is sent to a yet empty PHP document. The bracelets in the name tag are used to get an array. My PHP version is 5.3.8

    Read the article

  • Print a HTML page in landscape mode?

    - by yoz1k
    Is it possible to print a simple page in landscape mode? (without the need for the user to go to printer settings?) <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css" media="print"/> @page { size: landscape; margin: 2cm; } body { color: red; } </style> <style type="text/css" media="all" > body { font-size: 10pt; font-family: Arial; } table td { padding: 2em; } </style> </head> <body> <table> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> <tr> <td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td><td>g</td><td>h</td><td>i</td><td>j</td><td>k</td><td>l</td><td>m</td><td>n</td><td>o</td><td>p</td><td>q</td><td>r</td><td>s</td><td>t</td><td>u</td><td>v</td><td>w</td><td>x</td><td>y</td><td>z</td> </tr> </table> </body> </html> the solution @page size: landscape didn't help. any ideas?

    Read the article

  • aligning divs in <td> to top of <td>

    - by twitter
    update: added jsfiddle: http://jsfiddle.net/WgzgF/11/ I have a table with a bunch of <td>. Each td has a div .tdcont which is like a wrapper of all content in that td. In .tdcont, I have 2 groups of divs .alwaystop and .below-at. <td class="table-td"> <div class="tdcont"> <div class="alwaystop"> <div class="at1">at1</div> <div class="at2">at2</div> <div class="at3">at3</div> </div> <div class="below-at"> <div class="bat1">bat1</div> <div class="bat2">bat2</div> <div class="bat3">bat3</div> </div> </div> </td> The problem I'm having is that alwaystop is supposed to align itself to the top border of the cell and below-at is supposed to come right under it like this _____________________________________________________ at1 at2 at3 | at1 at2 at3 | at1 at2 at3 | bat1 bat2 bat3 | bat1 bat2 bat3 | bat1 bat2 bat3 | small image here | big image here | | | is taking lots | | | of space | | __________________|_________________|________________| What I'm finding is that alwaystop and below-at center themselves vertically like you see in this fiddle http://jsfiddle.net/WgzgF/11/ so if one of the adjacent cells in this row is long, alwaystop centers itself to this row's height like this _____________________________________________________ | at1 at2 at3 | | | bat1 bat2 bat3 | | at1 at2 at3 | big image here | at1 at2 at3 | bat1 bat2 bat3 | is taking lots | bat1 bat2 bat3 | small image here | of space | | __________________|_________________|________________| What I want to do is make alwaystop always start from the top of the cell regardless of adjacent cells' heights, then the below-at comes under it. How can I do this? I should add that I have the content of alwaystop is floated left, so is the content of below-at, so they're supposed to be like 2 rows inside that td. .at1, .at2, .at3{ float:left; } .bat1, .bat2, .bat3{ float:left; } The css for alwaystop and below-at is empty. I tried a whole bunch of stuff like vertical-align and absolute positioning, but nothing worked and I just gave up and deleted them. .alwaystop{ } .below-at{ }

    Read the article

  • jquery access sibling TD in table

    - by Rob
    I have the following HTML Code. What I'm try to do is to have the div named javaRatingDiv to be displayed once the checkbox with the name java is checked. I can't seem to figure out how to navigate to the next TD in a table via jquery. <div id="languages"> <table style="width:inherit"> <tr style="height:50px; vertical-align:top"> <td>Select the languages that you are familiar with and rate your knowledge:</td> </tr> <tr> <table style="width:75%;" align="center"> <tr id="tableRow"> <td id="firstTD"><input type="checkbox" name="java" value="java" />&nbsp;Java</td> <td id="secondTD" style="width:200px;"> <div id="javaRatingDiv" style="display:none"> <input name="javaRating" type="radio" value="1" class="star"/> <input name="javaRating" type="radio" value="2" class="star"/> </div> </td> </tr> </table> </tr> </table> </div>

    Read the article

  • Problem with changing td's html in JQuery.

    - by bugbug
    I want to change text in table td from 1,1,1 to 1,2,3 with following code, But it not seem to work. what is wrong in my code? This is my JavaScript function. function reorder(targetId){ var i = 1; jQuery.find(targetId).each(function(){ jQuery(this).attr("innerHTML", i); i ++; }); } My html code. <form> <input type="button" onClick="reorder('#index');" value="test"/> <table> <tr><td id="index">1</td></tr> <tr><td id="index">1</td></tr> <tr><td id="index">1</td></tr> </table> </form>

    Read the article

  • php/html add link to table <TD>

    - by Stefan
    How can i add a link to my td tag from a table? onclick doesnt work for me :S, or maybe a good example :P my td tag: $world .= ('<td background="images/world/Heli.jpg" border="1"></td>'); link: <a href="?site=world&action=showvillage&id=' . getVillageID(($xm2), ($ym2)) . '"></a> thnx :D

    Read the article

  • The requested resource is not available

    - by James Pj
    I have written a Java servlet program and run it through local Tomcat 7, But it was showing following error : HTTP Status 404 - /skypark/registration type Status report message /skypark/registration description The requested resource is not available. Apache Tomcat/7.0.33 I don't know what was the reason for it my Html page is <html> <head> <title> User registration </title> </head> <body> <form action="registration" method="post"> <center> <h2><b>Skypark User Registration</b></h2> <table border="0"> <tr><td> First Name </td><td> <input type="text" name="fname"/></br> </td></tr><tr><td> Last Name </td><td> <input type="text" name="lname"/></br> </td></tr><tr><td> UserName </td><td> <input type="text" name="uname"></br> </td></tr><tr><td> Enter Password </td><td> <input type="password" name="pass"></br> </td></tr><tr><td> Re-Type Password </td><td> <input type="password" name="pass1"></br> </td></tr><tr><td> Enter Email ID </td><td> <input type="email" name="email1"></br> </td></tr><tr><td> Phone Number </td><td> <input type="number" name="phone"> </td></tr><tr><td> Gender<br> </td></tr><tr><td> <input type="radio" name="gender" value="Male">Male</input></br> </td></tr><tr><td> <input type="radio" name="gender" value="Female">Female</input></br> </td></tr><tr><td> Enter Your Date of Birth<br> </td><td> <Table Border=0> <tr> <td> Date </td> <td>Month</td> <td>Year</td> </tr><tr> <td> <select name="date"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> . . . have some code . . . </table> <input type="submit" value="Submit"></br> </center> </form> </body> </html> My servlet is : package skypark; import skypark.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class Registration extends HttpServlet { public static Connection prepareConnection()throws ClassNotFoundException,SQLException { String dcn="oracle.jdbc.driver.OracleDriver"; String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark"; String usname="system"; String pass="tiger"; Class.forName(dcn); return DriverManager.getConnection(url,usname,pass); } public void doPost(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); try { String phone1,uname,fname,lname,dob,address,city,state,country,pin,email,password,gender,lang,qual,relegion,privacy,hobbies,fav; uname=req.getParameter("uname"); fname=req.getParameter("fname"); lname=req.getParameter("lname"); dob=req.getParameter("date"); address=req.getParameter("address"); city=req.getParameter("city"); state=req.getParameter("state"); country=req.getParameter("country"); pin=req.getParameter("pin"); email=req.getParameter("email1"); password=req.getParameter("password"); gender=req.getParameter("gender"); phone1=req.getParameter("phone"); lang=""; qual=""; relegion=""; privacy=""; hobbies=""; fav=""; int phone=Integer.parseInt(phone1); Connection con=prepareConnection(); String Query="Insert into regdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; PreparedStatement ps=con.prepareStatement(Query); ps.setString(1,uname); ps.setString(2,fname); ps.setString(3,lname); ps.setString(4,dob); ps.setString(5,address); ps.setString(6,city); ps.setString(7,state); ps.setString(8,country); ps.setString(9,pin); ps.setString(10,lang); ps.setString(11,qual); ps.setString(12,relegion); ps.setString(13,privacy); ps.setString(14,hobbies); ps.setString(15,fav); ps.setString(16,gender); int c=ps.executeUpdate(); String query="insert into passmanager values(?,?,?,?)"; PreparedStatement ps1=con.prepareStatement(query); ps1.setString(1,uname); ps1.setString(2,password); ps1.setString(3,email); ps1.setInt(4,phone); int i=ps1.executeUpdate(); if(c==1||c==Statement.SUCCESS_NO_INFO && i==1||i==Statement.SUCCESS_NO_INFO) { out.println("<html><head><title>Login</title></head><body>"); out.println("<center><h2>Skypark.com</h2>"); out.println("<table border=0><tr>"); out.println("<td>UserName/E-Mail</td>"); out.println("<form action=login method=post"); out.println("<td><input type=text name=uname></td>"); out.println("</tr><tr><td>Password</td>"); out.println("<td><input type=password name=pass></td></tr></table>"); out.println("<input type=submit value=Login>"); out.println("</form></body></html>"); } else { out.println("<html><head><title>Error!</title></head><body>"); out.println("<center><b>Given details are incorrect</b>"); out.println(" Please try again</center></body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } } catch(Exception e) { out.println("<html><head><title>Error!</title><body>"); out.println("<b><i>Unable to process try after some time</i></b>"); out.println("</body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } out.flush(); out.close(); } } And the web.xml file is <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>reg</servlet-name> <servlet-class>skypark.Registration</servlet-class> </servlet> <servlet-mapping> <servlet-name>reg</servlet-name> <url-pattern>/registration</url-pattern> </servlet-mapping> This i kept in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\web.xml and servlet class in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\classes\skypark and registration.html in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\ if any mistake in this makes above error means please help me.Thanks in advance....

    Read the article

  • the requested resource is not available [closed]

    - by James Pj
    I have written a Java servlet program and run it through local Tomcat 7, But it was showing following error : HTTP Status 404 - /skypark/registration type Status report message /skypark/registration description The requested resource is not available. Apache Tomcat/7.0.33 I don't know what was the reason for it my Html page is <html> <head> <title> User registration </title> </head> <body> <form action="registration" method="post"> <center> <h2><b>Skypark User Registration</b></h2> <table border="0"> <tr><td> First Name </td><td> <input type="text" name="fname"/></br> </td></tr><tr><td> Last Name </td><td> <input type="text" name="lname"/></br> </td></tr><tr><td> UserName </td><td> <input type="text" name="uname"></br> </td></tr><tr><td> Enter Password </td><td> <input type="password" name="pass"></br> </td></tr><tr><td> Re-Type Password </td><td> <input type="password" name="pass1"></br> </td></tr><tr><td> Enter Email ID </td><td> <input type="email" name="email1"></br> </td></tr><tr><td> Phone Number </td><td> <input type="number" name="phone"> </td></tr><tr><td> Gender<br> </td></tr><tr><td> <input type="radio" name="gender" value="Male">Male</input></br> </td></tr><tr><td> <input type="radio" name="gender" value="Female">Female</input></br> </td></tr><tr><td> Enter Your Date of Birth<br> </td><td> <Table Border=0> <tr> <td> Date </td> <td>Month</td> <td>Year</td> </tr><tr> <td> <select name="date"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> . . . have some code . . . </table> <input type="submit" value="Submit"></br> </center> </form> </body> </html> My servlet is : package skypark; import skypark.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class Registration extends HttpServlet { public static Connection prepareConnection()throws ClassNotFoundException,SQLException { String dcn="oracle.jdbc.driver.OracleDriver"; String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark"; String usname="system"; String pass="tiger"; Class.forName(dcn); return DriverManager.getConnection(url,usname,pass); } public void doPost(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { resp.setContentType("text/html"); PrintWriter out=resp.getWriter(); try { String phone1,uname,fname,lname,dob,address,city,state,country,pin,email,password,gender,lang,qual,relegion,privacy,hobbies,fav; uname=req.getParameter("uname"); fname=req.getParameter("fname"); lname=req.getParameter("lname"); dob=req.getParameter("date"); address=req.getParameter("address"); city=req.getParameter("city"); state=req.getParameter("state"); country=req.getParameter("country"); pin=req.getParameter("pin"); email=req.getParameter("email1"); password=req.getParameter("password"); gender=req.getParameter("gender"); phone1=req.getParameter("phone"); lang=""; qual=""; relegion=""; privacy=""; hobbies=""; fav=""; int phone=Integer.parseInt(phone1); Connection con=prepareConnection(); String Query="Insert into regdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; PreparedStatement ps=con.prepareStatement(Query); ps.setString(1,uname); ps.setString(2,fname); ps.setString(3,lname); ps.setString(4,dob); ps.setString(5,address); ps.setString(6,city); ps.setString(7,state); ps.setString(8,country); ps.setString(9,pin); ps.setString(10,lang); ps.setString(11,qual); ps.setString(12,relegion); ps.setString(13,privacy); ps.setString(14,hobbies); ps.setString(15,fav); ps.setString(16,gender); int c=ps.executeUpdate(); String query="insert into passmanager values(?,?,?,?)"; PreparedStatement ps1=con.prepareStatement(query); ps1.setString(1,uname); ps1.setString(2,password); ps1.setString(3,email); ps1.setInt(4,phone); int i=ps1.executeUpdate(); if(c==1||c==Statement.SUCCESS_NO_INFO && i==1||i==Statement.SUCCESS_NO_INFO) { out.println("<html><head><title>Login</title></head><body>"); out.println("<center><h2>Skypark.com</h2>"); out.println("<table border=0><tr>"); out.println("<td>UserName/E-Mail</td>"); out.println("<form action=login method=post"); out.println("<td><input type=text name=uname></td>"); out.println("</tr><tr><td>Password</td>"); out.println("<td><input type=password name=pass></td></tr></table>"); out.println("<input type=submit value=Login>"); out.println("</form></body></html>"); } else { out.println("<html><head><title>Error!</title></head><body>"); out.println("<center><b>Given details are incorrect</b>"); out.println(" Please try again</center></body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } } catch(Exception e) { out.println("<html><head><title>Error!</title><body>"); out.println("<b><i>Unable to process try after some time</i></b>"); out.println("</body></html>"); RequestDispatcher rd=req.getRequestDispatcher("registration.html"); rd.include(req,resp); return; } out.flush(); out.close(); } } And the web.xml file is <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <servlet-name>reg</servlet-name> <servlet-class>skypark.Registration</servlet-class> </servlet> <servlet-mapping> <servlet-name>reg</servlet-name> <url-pattern>/registration</url-pattern> </servlet-mapping> This i kept in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\web.xml and servlet class in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\WEB_INF\classes\skypark and registration.html in C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\skypark\ if any mistake in this makes above error means please help me.Thanks in advance....

    Read the article

  • Getting a value of td of a selected tr in jquery

    - by jaeyun
    Below is my table <table> <tr class=chargeTR> <td id=chargeTD> charge1 </td> </tr class=chargeTR> <td id=chargeTD> charge2 </td> </tr> <table> Below is my jquery call $(".chargeTR").each(function() { // this line works fine $.get("process.php", { value: $(this).find("#chargeTD").val(), // I must be doing something wrong here... }, function(theXML){ alert(theXML); }); }); I cannot get the value "charge1" and "charge2". Can somebody please correct me in this? Thank you,

    Read the article

  • Edit value of n number of <td> using jquery or javascript [on hold]

    - by Yousaf
    Hello Guys I am trying to edit the value of n number of td but i am onlt able to edit 1 value how can edit n number of tds i dont know how many rows could be in table here is my current code i want to do it dynamically HTML <input type="text" name="editValue" id="editValue" value="" /> <br> <table id="testing"> <tr> <td id="tdid">Value1</td> <td><a href="#" id="button" >Edit</a></td> </tr> <tr> <td >Value2</td> <td><a href="#">Edit</a></td> </tr> </table> Jquery $("#button").on('click', function(){ var r = $("#tdid").text(); $("#editValue").val(r); }); Here is working example http://jsfiddle.net/M5Gkb/6/

    Read the article

  • How to set incremental CSS classes in each Table Cell with jQuery?

    - by Mark Rapp
    I have a table populated via a DB and it renders like so (it could have any number of columns referring to "time", 5 columns, 8 columns, 2 columns, etc): <table id="eventInfo"> <tr> <td class="name">John</td> <td class="date">Dec 20</td> <td class="**time**">2pm</td> <td class="**time**">3pm</td> <td class="**time**">4pm</td> <td class="event">Birthday</td> </tr> <tr> <td class="name">Billy</td> <td class="date">Dec 19</td> <td class="**time**">6pm</td> <td class="**time**">7pm</td> <td class="**time**">8pm</td> <td class="event">Birthday</td> </tr> With jQuery, I'd like to go through each Table Row and incrementally set an additional class-name on only the Table Cells where "class='time'" so that the result would be: John Dec 20 2pm 3pm 4pm Birthday Billy Dec 19 6pm 7pm 8pm Birthday I've only been able to get it to count all of the Table Cells where "class='time'" and not each set within its own Table Row. This is what I've tried with jQuery: $(document).ready(function() { $("table#eventInfo tr").each(function() { var tcount = 0; $("td.time").attr("class", function() { return "timenum-" + tcount++; }) //writes out the results in each TD .each(function() { $("span", this).html("(class = '<b>" + this.className + "</b>')"); }); }); }); Unfortunately, this only results in: <table id="eventInfo"> <tr> <td class="name">John</td> <td class="date">Dec 20</td> <td class="**time** **timenum-1**">2pm</td> <td class="**time** **timenum-2**">3pm</td> <td class="**time** **timenum-3**">4pm</td> <td class="event">Birthday</td> </tr> <tr> <td class="name">Billy</td> <td class="date">Dec 19</td> <td class="**time** **timenum-4**">6pm</td> <td class="**time** **timenum-5**">7pm</td> <td class="**time** **timenum-6**">8pm</td> <td class="event">Birthday</td> </tr> Thanks for your help!

    Read the article

  • Contact Form ASP.net

    - by kwek-kwek
    This is my first time creating a from in ASP.NET I am following a tutorial here It is easy to follow but I get this error. But, if I take out this code : <%@ Page Language="C#" AutoEventWireup="true" CodeFile="contact-form.aspx.cs" Inherits="_Emailer" %> it works like a charm. What am I doing wrong? Here is my code full HTML: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="contact-form.aspx.cs" Inherits="_Emailer" %> <!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>&Eacute;cole Marc Favreau</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body id="benevolat"> <asp:label id="lblOutcome" runat="server" /> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td>Nom du Parent</td> <td><label> <input type="text" name="c_Name" id="c_Name" /> </label></td> </tr> <tr> <td>Nom de votre enfant</td> <td><input type="text" name="c_Enfant" id="c_Enfant" /></td> </tr> <tr> <td>Groupe</td> <td><input type="text" name="c_Groupe" id="c_Groupe" /></td> </tr> <tr> <td>Num&eacute;ro de t&eacute;l&eacute;phone</td> <td><input type="text" name="c_Tel" id="c_Tel" /></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td colspan="2"><strong>J'aimerais &ecirc;tre bénévole pour:</strong></td> </tr> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="5%"><label> <input type="checkbox" name="La biblioth&egrave;que " id="La biblioth&egrave;que " /> </label></td> <td colspan="2">La biblioth&egrave;que </td> </tr> <tr> <td><input type="checkbox" name="Aide en classe " id="Aide en classe " /></td> <td colspan="2">Aide en classe </td> </tr> <tr> <td><input type="checkbox" name="Aide pour les dîners pizza  " id="Aide pour les dîners pizza  " /></td> <td colspan="2">Aide pour les d&icirc;ners pizza&nbsp; </td> </tr> <tr> <td><input type="checkbox" name="Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole" id="Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole" /></td> <td colspan="2">Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole </td> </tr> <tr> <td><input type="checkbox" name="Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;)" id="Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;)" /></td> <td colspan="2">Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;) </td> </tr> <tr> <td><input type="checkbox" name="Photo scolaire" id="Photo scolaire" /></td> <td colspan="2">Photo scolaire </td> </tr> <tr> <td><input type="checkbox" name="Accompagner les &eacute;l&egrave;ves lors des sorties" id="Accompagner les &eacute;l&egrave;ves lors des sorties" /></td> <td colspan="2">Accompagner les &eacute;l&egrave;ves lors des sorties </td> </tr> <tr> <td><input type="checkbox" name="Venir parler de votre m&eacute;tier dans une classe ou monter un atelier" id="Venir parler de votre m&eacute;tier dans une classe ou monter un atelier" /></td> <td colspan="2">Venir parler de votre m&eacute;tier dans une classe ou monter un atelier </td> </tr> <tr> <td><input type="checkbox" name="Autres" id="Autres" /></td> <td>Autres</td> <td><label> <input type="text" name="c_Autre" id="c_Autre" /> </label></td> </tr> </table></td> </tr> <tr> <td colspan="2"><label> <input type="submit" name="button" id="button" value="Soumettre" /> <input type="submit" name="button2" id="button2" value="Effacer" /> </label></td> </tr> </table> </form> </div> </div> </div> <!-- #include file="footer.aspx"--> </div> </body> </html>

    Read the article

  • Jquery set tr with empty td lower than with text in td

    - by PavelBY
    I have html, and jquery for sorting my table (also there is non-standart sorting (with multi-tbody)). My code could be found here: http://jsfiddle.net/GuRxj/ As you can see there, td with prices (on russian ????) are sorted ascending (but tech-as not!? why? (it a question too))... But as you see, i need to send this tr's with prices to top of this tbody (now there are in the bottom), while empty-price-tr send to bottom... How to do this? part of js: $('.prcol').click(function(e) { var $sort = this; var $table = $('#articles-table'); var $rows = $('tbody.analogs_art > tr',$table); $rows.sort(function(a, b){ var keyA = $('td:eq(3)',a).text(); var keyB = $('td:eq(3)',b).text(); if (keyA.length > 0 && keyB.length > 0) { if($($sort).hasClass('asc')){ console.log("bbb"); return (keyA > keyB) ? 1 : 0; } else { console.log(keyA+"-"+keyB); return (keyA > keyB) ? 1 : 0; } } }); $.each($rows, function(index, row){ //console.log(row); $table.append(row); //$("table.123").append(row); }); e.preventDefault(); });

    Read the article

  • HttpClient POST fails to submit the form + resulting string is cut-off (incomplete)

    - by Jayomat
    Hi, I'm writing an app to check for the bus timetable's. Therefor I need to post some data to a html page, submit it, and parse the resulting page with htmlparser. Though it may be asked a lot, can some one help me identify if 1) this page does support post/get (I think it does) 2) which fields I need to use? 3) How to make the actual request? this is my code so far: String url = "http://busspur02.aseag.de/bs.exe?Cmd=RV&Karten=true&DatumT=30&DatumM=4&DatumJ=2010&ZeitH=&ZeitM=&Suchen=%28S%29uchen&GT0=&HT0=&GT1=&HT1="; String charset = "CP1252"; System.out.println("startFrom: "+start_from); System.out.println("goTo: "+destination); //String tag.v List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("HTO", start_from)); params.add(new BasicNameValuePair("HT1", destination)); params.add(new BasicNameValuePair("GTO", "Aachen")); params.add(new BasicNameValuePair("GT1", "Aachen")); params.add(new BasicNameValuePair("DatumT", day)); params.add(new BasicNameValuePair("DatumM", month)); params.add(new BasicNameValuePair("DatumJ", year)); params.add(new BasicNameValuePair("ZeitH", hour)); params.add(new BasicNameValuePair("ZeitM", min)); UrlEncodedFormEntity query = new UrlEncodedFormEntity(params, charset); HttpPost post = new HttpPost(url); post.setEntity(query); InputStream response = new DefaultHttpClient().execute(post).getEntity().getContent(); // Now do your thing with the facebook response. String source = readText(response,"CP1252"); Log.d(TAG_AVV,response.toString()); System.out.println("STREAM "+source); EDIT: This is my new code: try { HttpClient client = new DefaultHttpClient(); String getURL = "http://busspur02.aseag.de/bs.exe?SID=5FC39&ScreenX=1440&ScreenY=900&CMD=CR&Karten=true&DatumT="+day+"&DatumM="+month+"&DatumJ="+year+"&ZeitH="+hour+"&ZeitM="+min+"&Intervall=60&Suchen=(S)uchen&GT0=Aachen&T0=H&HT0="+start_from+"&GT1=Aachen&T0=H&HT1="+destination+""; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i("GET RESPONSE",EntityUtils.toString(resEntityGet)); } } catch (Exception e) { e.printStackTrace(); } But the output file is cut-off. If I do the same request in a browser I get like 14 different routes. Now the file suddenly stops and I only get 3 routes.... what's wrong? 04-30 12:19:12.362: INFO/GET RESPONSE(256): <!-- Ausgabebereich (automatisch erzeugt) --> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <div align="center"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p></p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p>Ihr Fahrplan für die Verbindung von Aachen, Kaiserplatz nach Aachen, Karlsgraben am Freitag, den 30.04.2010 (Koniginnedag), Abfahrten ab 12:19 Uhr</p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <table class="Result"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fussnote">Fussnote</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeug">Fahrzeug</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="abfahrt">Abfahrt</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestellean">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="linie">Linie</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestelleab">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="ankunft">Ankunft</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeit">Fahrzeit/Tarif</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:23</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>45</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:34</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=0&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:26</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>22</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:37</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=1&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:28</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>25</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:39</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=2&amp;SID=5FC39">Fahrtbegl

    Read the article

  • 2 javascripts problem

    - by pradeep
    <?php global $user; $userId = $user->uid; /* start with default */ $myresult = ""; /* All Includes - start */ include_once('db.php'); include_once('valid-scripts/validateData.php'); /* All Includes - end */ /* Build All required Variables - start */ $alias = $_GET['alias']; $product = $_GET['product']; $product = strtolower(substr($product,0,-1)); $master_table = $product.'_master'; $rating_master_table = $product.'_rating_master'; $rating_table = $product.'_rating'; $numProperties = 15; /* Build All required Variables - end */ /* Add all Styles required - start */ $myresult .= '<link href="/jquery.rating.css" type="text/css" rel="stylesheet"/>'; /* Add all Styles required - end */ /* Show Hide Variables/parameters - start */ include_once('all_include_files/show_hide.php'); /* Show Hide Variables/parameters - end */ /* All Javascript - start */ //$myresult .= '<script src="/jquery.rating.js" type="text/javascript" language="javascript"></script>'; ?> <style> #tabs { //font-size: 90%; //margin: 20px 0; margin: 2px 0; } #tabs ul { float: right; background: #E3FEFA; width: 600px; //padding-top: 4px; } #tabs li { margin-left: 8px; list-style: none; } * html #tabs li { display: inline; /* ie6 double float margin bug */ } #tabs li, #tabs li a { float: left; } #tabs ul li a { text-decoration: none; //padding: 8px; color: #0073BF; font-weight: bold; } #tabs ul li.active { background: #CEE1EF url(/all_include_files/img/nav-right.gif) no-repeat right top; } #tabs ul li.active a { background: url(/all_include_files/img/nav-left.gif) no-repeat left top; color: #333333; } #tabs div { //background: #CEE1EF; clear: both; //padding: 20px; min-height: 200px; } #tabs div h3 { text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px; #tabs div p { line-height: 150%; } </style> <script src="/jquery.rating.js" type="text/javascript" language="javascript"></script> <script src="/jquery.metadata.js" type="text/javascript" language="javascript"></script> <script type='text/javascript'> function openComment(number) { alert('working'); $('#comment'+number).css('display',''); } $('.star').rating({ callback: function(value, link){ alert(value); } }); $(document).ready(function() { //$('#tabs div').hide(); //$('#tabs div:first').show(); $('#tabs ul li:first').addClass('active'); $('#tabs ul li a').click(function() { $('#tabs ul li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tabs div').hide(); $(currentTab).show(); return false; }); $("#clickit").click(function() { $.post("/mobile/tablechange.php",{ p1:'<?php echo $brand ?>',p2:'<?php echo $model ?>',userid:'<?php echo $userid ?>' } ,function(data){ $("#changetable").html(data); }); }); $('div.expandable p').expander({ slicePoint: 200, // default is 100 expandText: 'more &raquo;', // default is 'read more...' collapseTimer: 0, // re-collapses after 5 seconds; default is 0, so no re-collapsing userCollapseText: '[^]' // default is '[collapse expanded text]' }); }); </script> <?php /* All Javascript - end */ /* Form Processing after submit - start */ /* Form Processing after submit - end */ /* Actual Form or Page - start */ /*fetch all data needed */ /* initial query */ $result_product = query_product_table($product,$alias); /*fetch property names of product */ $product_properties = master_table($master_table); /*rating table query */ $master_rating_properties = master_rating_table($rating_master_table); /*get user ratings*/ $user_ratings = user_ratings($userId,$alias,$rating_table); $myresult .= '<div class=\'Services\'>'; //$myresult .="<form name ='form1' id='form1' method = 'POST' action='".$_SERVER['php_self'] ."'>"; if(!$result_product) { header('Location: /page-not-found'); } else { $row_product = mysql_fetch_array($result_product); $myresult .= "<h3 class='newstyle'>".$row_product['alias']." <a style='float:right;padding-right:20px;color:white;text-decoration:underline;' href='/'>Back</a> </h3>"; /* start actual product display - start*/ $myresult .= "<div class=\"product\">"; /* start table 1*/ $myresult .= '<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\' style=\'width:580px; table-layout:fixed;\'>'; $myresult .= '<tr>'; $myresult .='<td valign=\'top\'>'; /* start table 2*/ $myresult .='<table width=\'100%\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>'; $myresult .= '<tr>'; $myresult .= '<td valign=\'top\' style=\'width:164px;\'>'; /* start table 3*/ $myresult .= '<table style=\'width:164px;\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>'; $myresult .= "<tr>"; /* start of the pic row */ $myresult .= '<td align=\'center\' class=\'various_product\'>'; if($row_product['pic'] != "") { $myresult .= '<ul id=\'mycarousel\' style=\'display:\';>'; $myresult .= '<li><a href=\'/all_image_scripts/origpicdisplay.php?product='.rawurlencode($product).'&alias='.rawurlencode($alias).'&picid=pic&p= \'rel=\'lightbox[roadtrip]\'><img src=\'/all_image_scripts/picdisplay1.php?product='.rawurlencode($product).'&alias='.rawurlencode($alias).'\'></img></a></li>'; for($p = 1; $p <= 4; $p++) { if($row_product['pic'.$p] != "") { $myresult .= '<li><a href=\'/all_image_scripts/origpicdisplay.php?product='.rawurlencode($product).'&alias='.rawurlencode($alias).'&picid=pic'.rawurlencode($p).'&p='.rawurlencode($p).'\' rel=\'lightbox[roadtrip]\'><img src=\'/all_image_scripts/thumbpicdisplay.php?product='.rawurlencode($product).'&alias='.rawurlencode($alias).'&picid=pic'.rawurlencode($p).'\'></img></a></li>'; } } $myresult .= '</ul>'; } else { $myresult .= "<img width='50' height='70' src='/images/no-image.gif'></img>"; } jcarousel_add('#mycarousel', array('horizontal' => TRUE,'scroll' => 1,'visible' => 1)); $myresult .= "</td>"; /* end display of pic td*/ $myresult .= "</tr>"; /* end display of pic tr*/ $myresult .= "</table></td>"; /* end display of pic table and earlier td - Still 1 open TR td table tr -hint*/ $myresult .= '<td style=\'width:450px;\'>'; /*table - 4*/ $myresult .= '<table width=\'100%\' border=\'0\' cellspacing=\'0\' cellpadding=\'0\' style=\'display:block;\'>'; /* Start showing property and values */ $myresult .= '<tr>'; $myresult .= '<td class=\'tick\'><img src=\'/images/ul_li_bg.gif\' width=\'12\' height=\'12\' /></td>'; $myresult .= '<td class=\'leftText\'>'.ucfirst($product).':</td>'; $myresult .= '<td class=\'rightText\'>'.$row_product['alias'] .'</td>'; $myresult .= "</tr>"; for($j = 3; $j <= 5 ; $j++){ if($product_properties['property'.$j.'_name'] != "") { if($row_product['property'.$j] != "") { $myresult .= '<tr>'; $myresult .= '<td class=\'tick\'><img src=\'/images/ul_li_bg.gif\' width=\'12\' height=\'12\' /></td>'; $myresult .= '<td class=\'leftText\'>'.$product_properties['property'.$j.'_name'].':</td>'; $myresult .= '<td class=\'rightText\'>'.$row_product['property'.$j] .'</td>'; $myresult .= '</tr>'; } /* end if*/ } /* end if*/ } /* end for*/ /* show hide block */ $myresult .= '<tbody id=\'extra_properties\' style=\'display: none;\'>'; for($j = 6; $j <= 15 ; $j++){ if($product_properties['property'.$j.'_name'] != "") { if($row_product['property'.$j] != "") { $myresult .= '<tr>'; $myresult .= '<td class=\'tick\'><img src=\'/images/ul_li_bg.gif\' width=\'12\' height=\'12\' /></td>'; $myresult .= '<td class=\'leftText\'>'.$produtc_properties['property'.$j.'_name'].':</td>'; $myresult .= '<td class=\'rightText\'>'.$row_product['property'.$j] .'</td>'; $myresult .= '</tr>'; } /* end if*/ } /* end if*/ } /* end for */ $myresult .= '</tbody>'; /* end show/hide tbody */ $myresult .= '<tr>'; $myresult .= '<td>'; $myresult .= '&nbsp;'; $myresult .= '</td>'; $myresult .= '<td>'; $myresult .= '&nbsp;'; $myresult .= '</td>'; $myresult .= '<td align=\'right\' style=\'text-align:right;text-decoration:underline;\'>'; $myresult .= '<a class=\'right_link\' href=\'javascript:showMore()\'>Show Additional Details...</a>'; $myresult .= '</td>'; $myresult .= '</tr>'; /* End showing property and values */ $showreview = 'display:'; /* review show hide */ /*$myresult .= '<tbody '.$showreview.'>'; $myresult .= '<tr>'; $myresult .= '<td colspan=\'2\'><span class=\'reviews\'>'; //check //$numreviews = getreviewcount($brand,$model,'mobile_user_reviews'); if($numreviews > 0) { $myresult .= '<a href=\'mobilereviews?alias='.rawurlencode($alias).'\'> <span>$numreviews Reviews</span></a>'; } else { $myresult .= " $numreviews Reviews"; } $myresult .= "</span></td>"; $myresult .= "</tr>"; */ $myresult .= "</tbody>"; /* review show hide - end */ /* count show hide */ $myresult .= '<tbody '.$showcount.'>'; $myresult .= '<tr>'; $myresult .= '<td colspan=\'2\'><span class=\'reviews\'>'; //check //$totalvotes = gettotalvotes($row['property1'],$row['property2'],'mobile_rating'); $myresult .= "</td>"; $myresult .= "</tr>"; $myresult .= "</tbody>"; /* count show hide - end */ $myresult .= "</table></td>"; /* end table 4 */ $myresult .= '</tr>'; /* end 1 row and remaining tr , td ,table */ $myresult .= '</table></td>'; $myresult .= '</tr>'; /* remianing only 1 table */ /* ratings - positive last section starts here */ $max= array(); for ($l = 1 ; $l < 15; $l++){ if($row_product['property'.$l.'_avg']){ $maxarray = 0; $maxarray = $row_product['property'.$l.'_avg']; $max['rating'.$l.'_name'] = $maxarray; } } if(count($max) >0 ) { include('all_include_files/min_max_properties.php'); } if(($row_product['freshness'] <= strtotime("-3 month"))) { $image_type= 'old'; } else if(($row_product['freshness'] <= strtotime("-2 month"))) { $image_type= 'bitold'; } else if(($row_product['freshness'] <= strtotime("-1 month")) || ($row_product['freshness'] > strtotime("-1 month"))) { $image_type= 'new'; } $img_name = $image_type; $myresult .= "<tr>"; $myresult .= "<td>"; $myresult .= "<table width='100%' border='0'>"; $myresult .= "<tr>"; $myresult .= "<td width='170' class=\"ratingz\"><span><u>Overall rating</u></span></td>"; $myresult .= "<td width='150' class=\"ratingz\"><span><u>Positive</u></span></td>"; $myresult .= "<td width='150' class=\"ratingz\"><span><u>Negative</u></span></td>"; if($img_name == 'new'){ $images = "<img src='/sites/default/files/battery-discharging-100.png' width='40' height='40'></img>"; } else if($img_name == 'bitold'){ $images = "<img src='/sites/default/files/battery-discharging-80.png' width='40' height='40'></img>"; } else if($img_name == 'old'){ $images = "<img src='/sites/default/files/battery-discharging-0.png' width='40' height='40'></img>"; } else { $images = ""; } $myresult .= "<td rowspan='2'><p ".$showbattery.">". $images ."</p></td>"; $myresult .= "</tr>"; $myresult .= "<tr>"; $myresult .= "<td>"; $i++; for($k = 0.5; $k <= 10.0; $k+=0.5) { $overall = roundOff($row_product['overall_rating']); if($overall == $k) { $chk ="checked"; } else { $chk = ""; } $myresult .= '<input class=\'star {split:2}\' type=\'radio\' value=\''. $k .'\' '.$chk.' title=\''. $k.' out of 10 \' disabled />'; } $myresult .= '</td>'; $myresult .= '<td ><span>'.$positive.'</span></td>'; $myresult .= '<td ><span>'.$negative.'</span></td>'; $myresult .= '</tr>'; $myresult .= '</table></td>'; $myresult .= '</tr>'; /* ratings - positive last section ends here */ $myresult .= '<tr>'; if($row_product['description'] != ""){ if(words_count($row_product['description']) > 8){ $myresult .= '<td><p><span class=\'description\'><strong><u>Description</u>:</strong></span>&nbsp;&nbsp; <div class=\'expandable\'><p>'.$row_product['description'].'</div></p></p></td>'; } else { $myresult .= '<td><p><span class=\'description\'><strong><u>Description</u>:</strong></span>&nbsp;&nbsp;'. $row_product['description'] .'</p></td>'; } } $myresult .= '</tr>'; $myresult .= '</table>'; /* end 1st table */ $myresult .= '</div>'; /* start actual product display - end*/ /*start the form to take ratings */ $myresult .= '<div id=\'tabs\'>'; $myresult .= '<ul>'; $myresult .= '<li><a href=\'#tab-1\'>Ratings</a></li>'; $myresult .= '<li><a href=\'#tab-2\'>Click here to rate</a></li>'; $myresult .= '</ul>'; $myresult .= '<div id=\'tab-1\'>'; /* actual rating table - start - jsut display ratings */ $myresult .= '<table id=\'rounded-corner\'>'; /* thead - start */ $myresult .= '<thead>'; $myresult .= '<tr>'; $myresult .= '<th width=\'30%\' class=\'rounded-company\' scope=\'col\'><span style=\'font: normal 18px Arial, Helvetica, sans-serif; color:#FFF;\'>Ratings</span></th>'; $myresult .= '<th width=\'70%\' colspan=\'2\'class=\'rounded-q4\' scope=\'col\'><a href=\'#rounded-corner\' id=\'clickit\' style=\'color:white;text-decoration:underline;\' $disabled ></a></th> '; /*$myresult .= '<th width=\'70%\' colspan=\'2\'class=\'rounded-q4\' scope=\'col\'><a href=\'#rounded-corner\' id=\'clickit\' style=\'color:white;text-decoration:underline;\' $disabled >Click here to rate</a></th> ';*/ $myresult .= '</tr>'; $myresult .= '</thead>'; /* thead - end */ /* tbody - start */ $myresult .= '<tbody>'; /*start printing the table wth feature and ratings */ for ($i = 1 ; $i < $numProperties; $i++){ if($master_rating_properties['rating'.$i.'_name']){ $myresult .= '<tr>'; $myresult .= '<td width=\'22%\'>'; $indfeature = 0; $indfeature = $row_product['property'.$i.'_avg']; $myresult .= $master_rating_properties['rating'.$i.'_name'].' ( '.$indfeature .')'; $myresult .= '</td>'; $myresult .= '<td colspan=\'0\' width=\'38%\' >'; $tocheck = $indfeature; for($k = 0.5; $k <= 10.0; $k+=0.5){ $tocheck = roundOff($tocheck); if(($tocheck) == $k) { $chk = "checked"; } else { $chk = ""; } $myresult .= '<input class=\'star {split:2}\' type=\'radio\' name=\'drating'.$i.'\' id=\'drating'.$i.''.$k.'\' value=\''. $k .'\' '.$chk.' title=\''. $k.' out of 10 \' disabled \'/>'; } /* for k loop end */ $myresult .= '</tr>'; } /* end if loop */ } /* end i for loop */ $myresult .= '</tbody>'; /* end tbody */ /* footer round corner start */ $myresult .= '<tfoot>'; $myresult .= '<tr>'; $myresult .= '<td class=\'rounded-foot-left\'>&nbsp;</td>'; $myresult .= '<td class=\'rounded-foot-right\' colspan=\'4\' >'; $myresult .= '</td>'; $myresult .= '</tr>'; $myresult .= '</tfoot>'; $myresult .= '</table>'; /*round corner table end */ $myresult .= '</div>'; /*end 1st tab */ /*start 2nd tab */ $myresult .= '<div id=\'tab-2\'>'; $myresult .= '<form name =\'form1\' id=\'form1\' method = \'POST\' action=\''.$_SERVER['php_self'] .'\'>'; /* actual rating table - start - actual rate/update */ $myresult .= '<table id=\'rounded-corner\'>'; /* thead - start */ $myresult .= '<thead>'; $myresult .= '<tr>'; $myresult .= '<th width=\'30%\' class=\'rounded-company\' scope=\'col\'><span style=\'font: normal 18px Arial, Helvetica, sans-serif; color:#FFF;\'>Ratings</span></th>'; $myresult .= '<th width=\'70%\' colspan=\'2\'class=\'rounded-q4\' scope=\'col\'></th>'; $myresult .= '</tr>'; $myresult .= '</thead>'; /* thead - end */ /* tbody - start */ $myresult .= '<tbody>'; unset($i); /*start printing the table wth feature and ratings */ for ($i = 1 ; $i < $numProperties; $i++){ if($master_rating_properties['rating'.$i.'_name']){ $myresult .= '<tr>'; /*fetch ratings and comments - 1st make it to null */ $indfeature = 0; $comment = ''; $indfeature = $user_ratings['rating'.$i]; if($indfeature == NULL){ $indfeature = 0; } $comment = $user_ratings['rating'.$i.'_comment']; $myresult .= '<td width=\'22%\'>'; $myresult .= $master_rating_properties['rating'.$i.'_name'].' ( '.$indfeature.' )'; $myresult .= '</td>'; $myresult .= '<td colspan=\'0\' width=\'38%\' >'; if(($userId != '0') && (is_array($user_ratings))) { $tocheck = $indfeature; } else { $tocheck = '0'; } for($k = 0.5; $k <= 10.0; $k+=0.5){ $tocheck = roundOff($tocheck); if(($tocheck) == $k) { $chk = "checked"; } else { $chk = ""; } $myresult .= '<input class=\'star {split:2}\' type=\'radio\' name=\'rating'.$i.'\' id=\'rating'.$i.''.$k.'\' value=\''. $k .'\' '.$chk.' title=\''. $k.' out of 10 \' '.$disabled.' \' />'; } /* for k loop end */ $myresult .= '</td>'; $myresult .= '<td width=\'40%\'>'; $myresult .= '<input title=\'Reason for this Rating.. \'type=\'text\' size=\'25\' name=\'comment'.$i.'\' id=\'comment'.$i.'\' style=\'display:;\' maxlength=\'255\' value="'.$comment.'">'; $myresult .= '</td>'; $myresult .= '</tr>'; } /* end if loop */ } /* end i for loop */ $myresult .= '</tbody>'; /* end tbody */ /* footer round corner start */ $myresult .= '<tfoot>'; $myresult .= '<tr>'; $myresult .= '<td class=\'rounded-foot-left\'>&nbsp;</td>'; $myresult .= '<td class=\'rounded-foot-right\' colspan=\'4\' >'; if(($userId != '0') && (is_array($user_ratings))) { $myresult .= '<input type=\'button\' id=\'update_form\' value=\'Update\'>'; } else { $myresult .= '<input type=\'button\' id=\'save_form\' value=\'Save\'>'; } $myresult .= '</td>'; $myresult .= '</tr>'; $myresult .= '</tfoot>'; $myresult .= '</table>'; /*round corner table end */ $myresult .= '</form>'; /*end the form to take ratings */ $myresult .= '</div>'; /*end 2nd tab */ $myresult .= '</div>'; /*end tabs div */ /* actual rating table - end */ /* 1st form ends here id- ratings_form */ } /* end of if loop result_product loop */ /* start table 3 - overall comment*/ $myresult .= '<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\' style=\'width:580px; table-layout:fixed;\' id=\'rounded-corner\'>'; $myresult .= '<tbody>'; /* thead - start */ $myresult .= '<thead>'; $myresult .= '<tr>'; $myresult .= '<th width=\'100%\' colspan=\'2\' class=\'rounded-company\' scope=\'col\'><span style=\'font: normal 18px Arial, Helvetica, sans-serif; color:#FFF;\'>Overall Comments</span></th>'; $myresult .= '<th colspan=\'3\' class=\'rounded-q4\' scope=\'col\'></th>'; $myresult .= '</tr>'; $myresult .= '</thead>'; /* thead - end */ $myresult .= '<tr>'; $myresult .= '<td colspan=\'4\'>'; $myresult .= '<textarea title=\'OverAll Comment\' name=\'overall_comment\' cols=\'65\'></textarea>'; $myresult .= '</td>'; $myresult .= '</tr>'; $myresult .= '<tbody>'; $myresult .= '</table>'; /* end table 3 - overall comment*/ /* start table 4 - summary*/ $myresult .= '<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\' style=\'width:580px; table-layout:fixed;\' id=\'rounded-corner\'>'; $myresult .= '<tbody>'; /* thead - start */ $myresult .= '<thead>'; $myresult .= '<tr>'; $myresult .= '<th colspan=\'2\' class=\'rounded-company\' scope=\'col\'><span style=\'font: normal 18px Arial, Helvetica, sans-serif; color:#FFF;\'>Your Opinion</span></th>'; $myresult .= '<th colspan=\'2\'class=\'rounded-q4\' scope=\'col\'></th>'; $myresult .= '</tr>'; $myresult .= '</thead>'; /* thead - end */ $myresult .= '<tr>'; $myresult .= '<td colspan=\'2\'>'; $myresult .= 'Do you Agree with the Ratings'; $myresult .= '</td>'; $myresult .= '<td colspan=\'2\'>'; $myresult .= 'Was the Information Helpful'; $myresult .= '</td>'; $myresult .= '</tr>'; $myresult .= '<tr>'; $myresult .= '<form name=\'form2\' id=\'form2\' method=\'post\'>'; $myresult .= '<td>'; $myresult .= '<input type=\'button\' class=\'agree\' value=\'agree\'>'; $myresult .= '</td>'; $myresult .= '<td>'; $myresult .= '<input type=\'button\' class=\'disagree\' value=\'disagree\'>'; $myresult .= '</td>'; $myresult .= '<input type=\'hidden\' name=\'agree_disagree\' id=\'agree_disagree\'>'; $myresult .= '</form>'; $myresult .= '<form name=\'form3\' id=\'form3\' method=\'post\'>'; $myresult .= '<td>'; $myresult .= '<input type=\'button\' class=\'helpful\' value=\'Helpful\'>'; $myresult .= '</td>'; $myresult .= '<td>'; $myresult .= '<input type=\'button\' class=\'nothelpful\' value=\'Not Helpful\'>'; $myresult .= '</td>'; $myresult .= '<input type=\'hidden\' name=\'help_nohelp\' id=\'help_nohelp\'>'; $myresult .= '</form>'; $myresult .= '</tr>'; $myresult .= '</tbody>'; $myresult .= '</table>'; /*end table 4 summary table */ $myresult .= '</div>'; /* Actual Form or Page - end */ echo $myresult; //echo 'Product: '.$product; //echo '<br/>Alias: '.$alias; ?> hey this code is working fine for me . as required. the star class code is taken from http://www.fyneworks.com/jquery/star-rating/ ... it works well.. but when i insert code to add tabs for content ,the starts is not visible at all. but when i check source code. the stars are actually there . dono whats the prob. any suggestions on this this is the tabs code $('#tabs div').hide(); ('#tabs div:first').show(); $('#tabs ul li:first').addClass('active'); $('#tabs ul li a').click(function() { $('#tabs ul li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tabs div').hide(); $(currentTab).show(); return false; });

    Read the article

  • Jquery Session & Table Filtering

    - by Bry4n
    This is my Jquery <script type="text/javascript"> $(function() { var from = $.session("from"); var to = $.session("to"); var $th = $('#theTable').find('th'); // had to add the classes here to not grab the "td" inside those tables var $td = $('#theTable').find('td.bluedata,td.yellowdata'); $th.hide(); $td.hide(); if (to == "Select" || from == "Select") { // shortcut - nothing set, show everything $th.add($td).show(); return; } var filterArray = new Array(); filterArray[0] = to; filterArray[1] = from; $.each(filterArray, function(i){ if (filterArray[i].toString() == "Select") { filterArray[i] = ""; } }); $($th).each(function(){ if ($( this,":eq(0):contains('" + filterArray[0].toString() + "')") != null && $(this,":eq(1):contains('" + filterArray[1].toString() + "')") != null) { $(this).show(); } }); $($td).each(function(){ if ($( this,":eq(0):contains('" + filterArray[0].toString() + "')") != null && $(this,":eq(1):contains('" + filterArray[1].toString() + "')") != null) { $(this).show(); } }); }); </script> This is my table <table border="1" id="theTable"> <tr class="headers"> <th class="bluedata"height="20px" valign="top">63rd St. &amp; Malvern Av. Loop<BR/></th> <th class="yellowdata"height="20px" valign="top">52nd St. &amp; Lansdowne Av.<BR/></th> <th class="bluedata"height="20px" valign="top">Lancaster &amp; Girard Avs<BR/></th> <th class="yellowdata"height="20px" valign="top">40th St. &amp; Lancaster Av.<BR/></th> <th class="bluedata"height="20px" valign="top">36th &amp; Market Sts<BR/></th> <th class="bluedata"height="20px" valign="top">6th &amp; Market Sts<BR/></th> <th class="yellowdata"height="20px" valign="top">Juniper Station<BR/></th> </tr> <tr> <td class="bluedata"height="20px" title="63rd St. &amp; Malvern Av. Loop"> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="yellowdata"height="20px" title="52nd St. &amp; Lansdowne Av."> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="bluedata"height="20px" title="Lancaster &amp; Girard Avs"> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="yellowdata"height="20px" title="40th St. &amp; Lancaster Av."> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="bluedata"height="20px" title="36th &amp; Market Sts"> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="bluedata"height="20px" title="6th &amp; Market Sts"> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> <td class="bluedata"height="20px" title="Juniper Station"> <table width="100%"><tr><td>12:17am</td></tr><tr><td>12:17am</td></tr><tr><td>12:47am</td></tr></table> </td> </tr> </table> I have asked questions on here before and I have had success in converting textbox values to dropdown changes. However this is a bit different. I am using the sessions plugin (which works fine). On one page I have a set of normal drop downs, on submit you get taken to a separate page which runs the function above, however the rows/columns all show and they don't seem to filter at all.

    Read the article

  • How to get these values with BeautifulSoup?

    - by Damiano
    Hello everybody, I have this html table: <table> <tr> <td class="datax">a</td> <td class="datax">b</td> <td class="datax">c</td> <td class="datax">d</td> </tr> <tr> <td class="datax">e</td> <td class="datax">f</td> <td class="datax">g</td> <td class="datax">h</td> </tr> </table> How to get the second and the fourth value of each <tr> ? If i do: bs.findAll('td', {'class':'datax'}) I get: <td class="datax">a</td> <td class="datax">b</td> <td class="datax">c</td> <td class="datax">d</td> <td class="datax">e</td> <td class="datax">f</td> <td class="datax">g</td> <td class="datax">h</td> it's correct! but I would like to have this result: <td class="datax">b</td> <td class="datax">d</td> <td class="datax">f</td> <td class="datax">h</td> so, the values I want are - b - d - f - h (the second and the forth <td> of each <tr>) Is it possible with BeautifulSoup module? Thank you very much!

    Read the article

  • Hide table row based on content of table cell

    - by timkl
    I want to make some jQuery that shows some table rows and hides others based on the content of the first table cell in each row. When I click a list item I want jQuery to check if the first letter of the item matches the first letter in any table cell in my markup, if so the parent table row should be shown and other rows should be hidden. This is my markup: <ul> <li>A</li> <li>B</li> <li>G</li> </ul> <table> <tr> <td>Alpha1</td> <td>Some content</td> </tr> <tr> <td>Alpha2</td> <td>Some content</td> </tr> <tr> <td>Alpha3</td> <td>Some content</td> </tr> <tr> <td>Beta1</td> <td>Some content</td> </tr> <tr> <td>Beta2</td> <td>Some content</td> </tr> <tr> <td>Beta3</td> <td>Some content</td> </tr> <tr> <td>Gamma1</td> <td>Some content</td> </tr> <tr> <td>Gamma2</td> <td>Some content</td> </tr> <tr> <td>Gamma3</td> <td>Some content</td> </tr> </table> So if I press "A" this is what is rendered in the browser: <ul> <li>A</li> <li>B</li> <li>G</li> </ul> <table> <tr> <td>Alpha1</td> <td>Some content</td> </tr> <tr> <td>Alpha2</td> <td>Some content</td> </tr> <tr> <td>Alpha3</td> <td>Some content</td> </tr> </table> I'm really new to jQuery so any hint on how to go about a problem like this would be appreciated :)

    Read the article

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