Combobox not working
Below, is a code I've been working on where the user searches and selects an item in the drop-down list, and it'll automatically open that page in a new window. It doesn't seem to work at all! :confused:
Can anybody correct this?
Here's the code:
Suggest you look at your code and make some corrections. You do not have a doctype. From some of your tags I think you want html5 so I added that and everything goes to hell.
Maybe because you have inline tags that should be css.
You have two <body> tags both have depreciated attributes or unknown attributes.
The biggest thing you can do for yourself is to start using div's to position html elements and not tables. Even when tables were the only way to do things putting tables inside of a table slowed loading time and was never recommended.
Lastly you do not have a combobox drop down list in your code.
RE: tables. As I understand it, every table is parsed twice by the browser - once for structure/format, then again for content. Not efficient.
Table-less design/development has a bit of a high learning curve, but it's much better for performance.
Thanks for your swift response.
Would anybody be able to rewrite my code though to make the URLs work?
I've been unsuccessful as I haven't much knowledge on this. :(
Many thanks. :s
In this code that I gave you:
It will *NEVER* work if you try to use *BOTH*.
Go back and read my message on this again.
Apologies, I've removed the second part but it still doesn't appear to be working. What have I done wrong?
Would you be able to re-write it for me please? :rolleyes:
Sorry to be a pest. :confused:
Isn't it time you learned to use a DEBUGGER????
As soon as I opened the page up and tried it in a debugger (happened to be using Chrome, but would have been same in MSIE 8+ or FireFox with Firebug) I got an error on this line:
And of course that is true! That's because parent is null!
THIS PAGE is *ALREADY* the top window. There is *NO PARENT* for the top window!
On top of that, you said "...it'll automatically open that page in a new window".
WHAT NEW WINDOW????
You have ZERO code there that even *TRIES* to create a new window!
CHANGE that line to THIS:
I have to tell you, that is some very very disorganized and ugly HTML code.
<font> tags are obsolete. And in any case, a <font> tag does *NOT* affect the size of text in an <input> that it encloses. (You are doing <font size="3"><input></font>, which is pointless.)
And why why why do this:
You really really need to learn to use CSS. Stop coding inline styles into everything.
But mainly, you need to try to stop using nested tables for page layout. That went out of fashion about 1999.
Finally, as a general rule, if you only have one <form> on a page, you should put the <form> tag right after <body> and the </form> tag just before </body>. Only change that if you need to have multiples forms on a page.
|All times are GMT +1. The time now is 04:17 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.