Form commit not working with IE

J

jah

I made the following code which works just fine in Firefox, but when I
tested it in IE nothing at all happens. The expected reaction would be
that my index.php file is called with the parameters specified when I
press the search button.

print ("<table class=\"MenuNormal\" border=\"0\" cellpadding=\"5\"
cellspacing=\"2\" width=\"100%\" \n") ;
printf("<form method=post
action=\"index.php?Menu=%s&Action=search\">", $Menu) ;
printf(" <tr><td><input type=\"text\" name=\"TextSearch\"
value=\"%s\" size=\"15\" maxlength=\"100\"></td></tr>\n", $searchdata)
;
printf(" <tr><td><input type=\"submit\"
value=\"S&oslash;g\" name=\"SearchData\"></td></tr>\n") ;
printf("</form>\n") ;
printf("</table>\n") ;


Anybody know what is wrong here ?
 
J

Jonathan N. Little

I made the following code which works just fine in Firefox, but when I
tested it in IE nothing at all happens. The expected reaction would be
that my index.php file is called with the parameters specified when I
press the search button.

Two errors:

1) You cannot nest the FORM between the TABLE and TR tags

WRONG:
<table><form><tr><td>...</td></tr></form></table>

CORRECT:
<form><table><form><tr><td>...</td></tr></form></table></form>

OR:
<table><tr><td><form>...</form></td></tr></table>

2) Markup error, you are missing the '>' on the opeing TABLE tag

print ("<table class=\"MenuNormal\" border=\"0\" cellpadding=\"5\"
cellspacing=\"2\" width=\"100%\" \n") ;
^
|
Missing '>' here------------------+
printf("<form method=post
action=\"index.php?Menu=%s&Action=search\">", $Menu) ;
printf(" <tr><td><input type=\"text\" name=\"TextSearch\"
value=\"%s\" size=\"15\" maxlength=\"100\"></td></tr>\n", $searchdata)
;
printf(" <tr><td><input type=\"submit\"
value=\"S&oslash;g\" name=\"SearchData\"></td></tr>\n") ;
printf("</form>\n") ;
printf("</table>\n") ;


Anybody know what is wrong here ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top