Dear All,
I have function where I read from a mysql table a set of value. Part of my codes is like this
echo "<tr id='gridRow'>
<td >$count</td>
<td> <input type='checkbox' onClick=selectAndUpdate('$row1[size]')></td>
<td> {$row1[SerialNo]}</td>
<td> {$row1[InHouseBranding]}</td>
<td> {$row1[BrandCode]}</td>
<td> {$row1[size]}</td>
<td> {$row1[Pattern]}</td>
<td> {$row1[EntryStatus]}</td>
</tr>";
A sample row generated is as below can you notice this line <input type=“checkbox” 22.567’)=“” onclick=“selectAndUpdate('21060R”> why the same value appear properly in the <td> 21060R 22.567</td> but in the previous line is showing me like this 22.567’)=“” onclick=“selectAndUpdate('21060R”> any idea?
<tr id="gridRow">
<td>1</td>
<td>
<input type="checkbox" 22.567')="" onclick="selectAndUpdate('21060R">
</td>
<td> EA12</td>
<td> BOR1</td>
<td> GY</td>
<td> 21060R 22.567</td>
<td> HMG 2020</td>
<td> New</td>
</tr>
newtomysql:
Dear All,
I have function where I read from a mysql table a set of value. Part of my codes is like this
echo "<tr id='gridRow'>
<td >$count</td>
<td> <input type='checkbox' onClick=selectAndUpdate('$row1[size]')></td>
<td> {$row1[SerialNo]}</td>
<td> {$row1[InHouseBranding]}</td>
<td> {$row1[BrandCode]}</td>
<td> {$row1[size]}</td>
<td> {$row1[Pattern]}</td>
<td> {$row1[EntryStatus]}</td>
</tr>";
A sample row generated is as below can you notice this line <input type=“checkbox” 22.567’)=“” onclick=“selectAndUpdate('21060R”> why the same value appear properly in the <td> 21060R 22.567</td> but in the previous line is showing me like this 22.567’)=“” onclick=“selectAndUpdate('21060R”> any idea?
<tr id="gridRow">
<td>1</td>
<td>
<input type="checkbox" 22.567')="" onclick="selectAndUpdate('21060R">
</td>
<td> EA12</td>
<td> BOR1</td>
<td> GY</td>
<td> 21060R 22.567</td>
<td> HMG 2020</td>
<td> New</td>
</tr>
you may try like this
<input type=‘checkbox’ onClick=“selectAndUpdate(‘<?php echo $row1[size]?>’)”>
i think cause of double quotes problem
Dear Sona,
The problem this values are generated via an ajax call the page is just a php page. So I have modified like this now. It is still showing the same thing.
echo “<tr id=‘gridRow’>”;
echo “<td >$count</td>”;
echo “<td> <input type=‘checkbox’ onClick=selectAndUpdate('”;
echo $row1[size];
echo “')></td>”;
echo “<td> {$row1[SerialNo]}</td>”;
echo “<td> {$row1[InHouseBranding]}</td>”;
echo “<td> {$row1[BrandCode]}</td>”;
echo “<td> {$row1[size]}</td>”;
echo “<td> {$row1[Pattern]}</td>”;
echo “<td> {$row1[EntryStatus]}</td>”;
echo “</tr>”;
newtomysql:
Dear Sona,
The problem this values are generated via an ajax call the page is just a php page. So I have modified like this now. It is still showing the same thing.
echo “<tr id=‘gridRow’>”;
echo “<td >$count</td>”;
echo “<td> <input type=‘checkbox’ onClick=selectAndUpdate('”;
echo $row1[size];
echo “')></td>”;
echo “<td> {$row1[SerialNo]}</td>”;
echo “<td> {$row1[InHouseBranding]}</td>”;
echo “<td> {$row1[BrandCode]}</td>”;
echo “<td> {$row1[size]}</td>”;
echo “<td> {$row1[Pattern]}</td>”;
echo “<td> {$row1[EntryStatus]}</td>”;
echo “</tr>”;
use the below code it will work. why you split the input tag , i think this would help to you
echo "<tr id='gridRow'>";
echo "<td >$count</td>";
echo "<td> <input type='checkbox' onClick=selectAndUpdate('".$row1[size]."')";
echo "</td>";
echo "<td>". $row1[SerialNo]."</td>";
echo "<td>".$row1[InHouseBranding]."</td>";
echo "<td> ".$row1[BrandCode]."</td>";
echo "<td> ".$row1[size]."</td>";
echo "<td> ".$row1[Pattern]."</td>";
echo "<td> ".$row1[EntryStatus]."</td>";
echo "</tr>";
Dear Sona,
For the benefit of everyone this helped solve it echo “<input type=\“checkbox\” onClick=\“selectAndUpdate('” . $row1[size] . “')\”>”;
hi newtomysql
fine.did you use my above code is it work?