Agreed! HTML is a bastard language, mainly because its just a markup language and developers have taught browsers to ignore things they dont understand so you could put almost anything in a page without blowing it up. But we are slowing moving in the right directions with XHTML standards and technologies such as ASP.NET. Looking at the code in your page, its not right either, your point exactly
You have a form element when its not really necessary because you are taking care of the submitting yourself by catching the onClick event...plus you dont close the form element and you have the Go Button stuck outside a table cell, that really should be inside of TD tags...anyways enough ranting.
If you'd like to put that code in a menu item its very possible. As you will notice, there is a search menu item on the Milonic homepage. Looking at the source code for that you will see how its done...(all on one line)
Code: Select all
aI("text=<FORM METHOD=GET ACTION=/search.php name=search><table><tr><td>Search Milonic</td></tr><tr><td><input name=q size=11></td></tr><tr><td><input type=submit value=Search></td></tr></table></form>;type=form;align=center;onbgcolor=;onborder=;");
Now we can try and port this with your code...remember, you need to keep tabs on quotes and escape things as necessary....(all on one line)
Code: Select all
aI("text=<FORM name=userinfo><table><tr><td align=right><font color='#990000'><u>Chattez live sur IRC QSC! Entrez votre Nickname:</u></font></td><td><input type=text name=nickname size=12></td><td><input type=button value='Go!' onClick='send()'></td></tr></table></form>;type=form;");
Notice I cleaned it up alittle, you need to put the ENTIRE menu item within its own self contained table because the menu itself is made of of tables and cells and if you just paste TDs and TRs into the text of a menu item it will screw with things. Also you can use single quotes in the menu text as I did, but no double quotes without escaping them. Also to put a form in a menu item you need that type=form on the end.
I did not test this code, but its definitely in the right direction...work with this. Hope it helps.