question: 'onclick' within 'onmouseover' within 'form' within 'table' - how is it possible?
I have the HTML4 code below that renders, displays and links as wanted (Epiphany and Iceweasel) with one exception but I need more which I can't work out due to my insufficient experience. The exception is that the </form> tag creates a space between consecutive FORMS, how can I avoid that?
Code:
function toggle_visibility(id) { It displays this result (ignoring fonts and colors effect): Quote:
Quote:
Put in another way, what I need to add (html css javascript) is the effect of invalid code like this if it was working: Code:
<table> |
Quote:
Changing the display attribute on the forms to 'block' results in space between them. Change that to 'inline' and/or define some CSS rules for form elements which set the desired spacing. An HTML/CSS validator will likely complain about the unclosed input elements. Change <input ...> to <input ... /> to silence those. Also the break elements, <br> should be <br />. And get rid of the always evil <font ...> elements! Replace those with <p> or something else, and use CSS rules to set the color and other font attributes. The validator will likely complain loudly about those! Quote:
And you rightly described the example <table> code as invlaid... you cannot nest <tr>, <td> elements inside the form elements and text. That is badly broken. If you use a table for formatting, then <tr> should be a child of <table> and <td> should be a child of <tr>, and everything else must be inside the <td>'s. So your table structure would be something like this... Code:
<table> With 100 forms nested in the table along with visible identifiers and javascript rules to control their visibility, you would be well served to generate that HTML with a scripting language such as PHP rather than hard-coding it into a page. I would suggest searching sources such as W3Schools and the many online tutorials for web design and scripting methods. It really is not difficult once you catch on to it, but it is complex enough that you will need to understand the basics yourself in order to really benefit from the help of others. Hope this helps! |
i just have an aside question:
op defines this as html4 - but i'm pretty sure i'm seeing javascript at the top there, no? - so by definition it is not (pure) html, not html4 or anything else? or does the "html4 specification" include usage of javascript? |
Quote:
But that is a very good question - did HTML4 actually say anything about javascript? So I looked, and from the W3C HTML4 specification... Quote:
But as I said, I do not think strict HTML version has much relevance to this question (although the OP may care to comment if that is not correct). |
Frankly, I stopped-cold with the title of this post:
"OnClick" within(?!?!) "MouseOver?" Can't happen! Events are fired only one at a time. |
All times are GMT -5. The time now is 08:29 PM. |