Thanks guys, i have found the solution by myself. it is easy. actually i am very very new to oop. since no one answered my question, i searched. thanks for not answering.
Thanks guys, i have found the solution by myself. it is easy. actually i am very very new to oop. since no one answered my question, i searched. thanks for not answering.
You are right, I have made a mistake. I corrected it, I have changed qty to $n. Initially i wanted to call "product" instead of service so I named it qtySelectProd. It is no more in use. I am able to make out the check box checked or not, but unable to select the corresponding dropdown list values! Thanks for your reply
Here is what I am trying todo
<?php
echo "<table id=serTable border=1 width=100%>";
echo "<tr>";
echo "<td>Nom de service</td>";
echo "<td>Quantité</td>";
echo "<td>Choix</td>";
echo "</tr>";
$servicenom = new Services();
$serviceListe = $servicenom->getAllServices();
foreach ($serviceListe as $service){
echo "<tr>";
echo "<input type=hidden name=serId value=".$service->serId.">";
echo "<td>" .$service->serTheme."</td>";
echo "<td>";
echo "<select name=qtySelectSer>";
echo "<option selected=selected>0</option>";
for ($n=0; $n<11; $n++){
echo "<option value=qty>".$n."</option>";
}
echo "<select>";
echo "</td>";
echo "<td><input type=checkbox name=choixSer[] value=" . $service->serId ."> </td>";
echo "</tr>";
}
echo "</table>";
?>
when I try to get checkbox value like this
$qtySer = $_POST['qtySelectSer'];
$qtyProd= $_POST['qtySelectProd'];
if (isset($_POST['choixSer'])) {
echo "Vous avez choisi service :";
for ($i = 0, $c = count($_POST['choixSer']); $i < $c; $i++) {
echo "<br/><b>" . $_POST['choixSer'][$i] . "</b>";
echo "<br>";
}
}
But I am not able to get the corresponding
$qtySer = $_POST;
$qtyProd= $_POST;
Any idea or help?
here is an example
CREATE TABLE products
( product_id numeric(10) not null,
supplier_id numeric(10) not null,
CONSTRAINT fk_supplier
FOREIGN KEY (supplier_id)
REFERENCES supplier(supplier_id)
);
Hello,
I have a table with 10 rows. each row has 3 columns. column1 is product name column2 is a drop down box with values from 1to10. column3 is a check box. When the checkbox is checked I would like to get the entire row value (product name, quantity) Can anybody help me how can I do this?
Thanks for your help
One problem is the files produced by imp and exp are not backwardly compatible. That is if you use the 10g version of exp to create a dump file, you can't use the 9i version of imp to import the data.
In this case you need to use the 9i version of exp, connected to the 10g database, then use the 9i version of imp to import the data.
Oracle does not accepts the "-" sign for the columns. If you want your column to be called e-mail then make it "e-mail".
And your foreign key declaration is not good,
I would have done that if it is possible. If you read my post I am generating rows dynamically. Number of variables depands on number of rows. Do I have to increase the variable values dynamically. That is the reason why i am writing like this (bRow+x)
Thanks David for your reply.
1. Yes I am trying to declare bRow. Actually what I wanted to do is to declare 2 variable bRow1 abd bRow2. This is what I don't know to do. So I am trying to increase the variable in this way. You are right this is not the correct way to declare.
2. The variable lastRow, I declared it for another purpouse. But I am not using it anymore. Just to answer you, it has the value of 3.
If you have to calculate the total number of hours, use the function SUM with group by.
Hello,
I am new to javascript. I am trying to get the cell values of a html table in the following way, but I am not able to increase the variable dynamically! Does any one see where is my problem
Sorry for my english!!
function validateRow(frm)
{
var oTBL = document.getElementById('myTable');
var lastRow = oTBL.rows.length - 1;
var i;
for (var x = 1; x < oTBL.rows.length; x++) {
var y = 1;
//I am getting error here
var (bRow+x) = (oTBL.rows[x].cells[y].firstChild.data);
var aRow = document.getElementById('txtRow' + x);
if (aRow.value.length <= 0) {
alert('Row ' + x + ' is empty');
return;
}
}
openInNewWindow(frm);
}
function openInNewWindow(frm)
{
// open a blank window
var aWindow = window.open('', 'TableAddRowNewWindow',
'scrollbars=yes,menubar=yes,resizable=yes,toolbar=no,width=400,height=400');
// set the target to the blank window
frm.target = 'TableAddRowNewWindow';
// submit
frm.submit();
}