Page 1 of 2
Problem with IE
Posted: Wed Oct 15, 2003 4:10 pm
by Dr.Pepper
Hi.
I have a PHP script that outputs a form based on a mysql recordset.
the form works perfectly with mozilla/netscape but IE doesn't do anything when I press "Submit"..
There are about 55 records being displayed, and for each there are like 5 form objects (text,hidden and submit types)
Does anyone know if the is a limit to the amount of info in a form in IE?
I know this is a bit off topic, if I'm out of line please tell me so.
Posted: Wed Oct 15, 2003 4:45 pm
by microthick
Can you post the url?
Posted: Wed Oct 15, 2003 6:00 pm
by JAM
I tried this (not sure it simulates your problem tho), and this works in IE and Mozilla Firebird. A total of 2001 input-fields within a form.
Code: Select all
<pre>
<?php
if (isset($_POST)) {
print_r($_POST);
}
?>
<form method="post">
<input type="submit"><br>
<?php
for($i=1;$i<1001;$i++) {
echo '<input type="text" name="name'.$i.'" value="value'.$i.'">';
echo '<input type="hidden" name="hidden'.$i.'" value="hidden'.$i.'">';
}
?>
</form>
Posted: Wed Oct 15, 2003 6:06 pm
by McGruff
Without looking at the code I'm just guessing. You said there are multiple forms on one page. That's OK in principle but do all the forms have a unique name?
Posted: Wed Oct 15, 2003 7:14 pm
by Dr.Pepper
Ok here is the code
it is only one form..
i put an if clause to limit the result and if i do only 35 it works ok in IE
Code: Select all
<head>
<LINK REL=STYLESHEET HREF='tfmdwell.css' TYPE='text/css'>
</head>
<?php
include_once 'date.inc';
echo "<h1>Arrived Units</h1>\n";
$msqlh = mysql_connect("xxx","xx","xx");
mysql_select_db("doublestackservices_com",$msqlh);
if ($submitted)
{
echo "entre";
$arraylen = sizeof($month);
for ($x=0 ; $x<$arraylen ;$x++)
{
if (strlen($yearї$x])==0)
$yearї$x]=2003;
/* $m=valid_month($monthї$x]);
$d=valid_day($dayї$x]);
$y=valid_year($yearї$x]);
//echo "$m , $d , $y<br>\n";*/
if ( valid_month($monthї$x]) and valid_day($dayї$x]) and valid_year($yearї$x]))
{
$query="update tfmdwell set grounded='$yearї$x]-$monthї$x]-$dayї$x]' where container='$contї$x]'";
//echo $query;
$result = mysql_query($query,$msqlh);
}
}
}
echo "<form action='show_arrived.php' method='get'>\n<INPUT type="submit" value="submit"><br><br>\n";
$rampasq = "select * from rampas order by aduana";
$rampas_result = mysql_query($rampasq,$msqlh);
while ($rampasrow = mysql_fetch_object($rampas_result))
{
$query = "select container,southbound_id,destination_ramp,status,arrived,nombre from tfmdwell,aduanas where destination_ramp=aduana and aduanas.seccion='0' and arrived!='0000-00-00 00:00:00' and grounded='0000-00-00 00:00:00' and aduana='$rampasrow->aduana' order by nombre,container";
$result = mysql_query($query,$msqlh);
$rsmex = mysql_num_rows($result);
if ($rsmex>0)
{
echo "<table border=1 cellpadding=1 cellspacing=0>\n<tr align=center>\n<th class=label colspan=4>$rampasrow->rampa</th>\n</tr>\n<tr>\n<th>Container</th><th>Status</th><th>Arrived</th><th>Grounded</th>\n</tr>\n";
$x=0;
while ($row = mysql_fetch_object($result))
{
$x++;
if(($x%2)==0)
$class='class=alt';
else
$class='';
//echo "<tr align=center>\n<td><input type=hidden name=contї] ></td><td></td><td></td><td><input type=text name=monthї] size=2 maxlength=2><input type=text name=dayї] size=2 maxlength=2><input type=text name=yearї] size=4 maxlength=4></td>\n</tr>\n";
//if ($x<35)
echo "<tr align=center {$class}>\n<td>{$row->container}<input type=hidden name=contї] value={$row->container}></td><td>{$row->status}</td><td>$row->arrived</td><td><input type=text name=monthї] size=2 maxlength=2><input type=text name=dayї] size=2 maxlength=2><input type=text name=yearї] size=4 maxlength=4></td>\n</tr>\n";
}
echo "<tr><td colspan=4 align=right>".$rsmex."</td></tr>";
echo "
</table>\n
<input type="hidden" name="submitted" value="T">\n
<INPUT type="submit" value="submit"><br><br>\n
";
}
}
/* echo "
</table>\n
<input type="hidden" name="submitted" value="T">\n
<INPUT type="submit" value="submit"><br><br>\n";*/
echo "</form>";
//}
?>
the url is
tumail.net/upmex
[/url]
Posted: Wed Oct 15, 2003 7:29 pm
by JAM
You are not following any standards writing the html. Try changing these (all of them) and try again.
Code: Select all
// bad
<input type=hidden name=contї] value={$row->container}>
// better
<input type="hidden" name="contї]" value="{$row->container}">
Posted: Thu Oct 16, 2003 11:29 am
by Dr.Pepper
Ok, I will do that.
Thanks everyone
Posted: Thu Oct 16, 2003 11:38 am
by qads
hmm...well you could add a search field there and the user would search by Container number, then you only need to show one item at a time...
this is what i had to do for a shopping cart, i would't even think of showing like 100+ item on a page, so i added a seach field, the user search for the item she/he wants to edit and BAM

Posted: Thu Oct 16, 2003 1:46 pm
by Dr.Pepper
I tried using correct html (.ie value="xxx" instead of value=xxx) but the result is the same. I guessing I'm going to have to paginate the data, Unless you guys have more suggestions
Posted: Thu Oct 16, 2003 1:57 pm
by liljester
when you run the page in IE, is there any HTML source?
Posted: Thu Oct 16, 2003 2:03 pm
by Dr.Pepper
yes, there is and it seems ok to me. except when you click "submit" nothing happens
This behavior only happens when I display over 35 rows.
when i limit the rows it works without a hitch.
Posted: Thu Oct 16, 2003 2:06 pm
by microthick
Hi Dr. Pepper,
I've been playing with the outputted code and it seems that it works when the form method is POST but not GET in Internet Explorer.
Posted: Thu Oct 16, 2003 4:29 pm
by Dr.Pepper
ok let me try to switch the method
Posted: Thu Oct 16, 2003 4:36 pm
by Dr.Pepper
you're right changing the method worked, but why is there a difference?
Posted: Thu Oct 16, 2003 4:43 pm
by qads
get method only allows up
80 characters in the address bar while post method has no limits!

.