HighDots Forums  

DIV encompassing TD

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss DIV encompassing TD in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default DIV encompassing TD - 06-01-2004 , 06:42 PM






Can anyone tell me how I can make the following work...

<table>
<div id="1">
<tr><td>testing</td></tr>
</div>

<input type="button" value="test" onClick="javascipt:removeQuestion('1','1')">
</table>

The Javascript will not recognize the div because it is wrapped in TR and TD.

Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: DIV encompassing TD - 06-01-2004 , 06:50 PM






Falc2199 wrote:

Quote:
Can anyone tell me how I can make the following work...

table
div id="1"
tr><td>testing</td></tr
/div

input type="button" value="test" onClick="javascipt:removeQuestion('1','1')"
/table

The Javascript will not recognize the div because it is wrapped in TR and TD.
No, the div isn't wrapped in TR and TD.
You wrapped the TR and TD in the div.
I have absolutely now idea what you are trying to do here,
but I do know that correct markup would be putting the div
inside the td. You can't put anything between the table and
its rows.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #3  
Old   
Knud Gert Ellentoft
 
Posts: n/a

Default Re: DIV encompassing TD - 06-01-2004 , 06:52 PM



JehanNYNJ (AT) aol (DOT) com (Falc2199) skrev :

Quote:
table
div id="1"
tr><td>testing</td></tr
/div

input type="button" value="test" onClick="javascipt:removeQuestion('1','1')"
/table

The Javascript will not recognize the div because it is wrapped in TR and TD.
You can't have a <div> or a input between <table> and <tr>, try
it in the <td>.

<table>
<tr>
<td>
<div id="1">testing</div>
<div><input type="button" value="test"</div>
onClick="javascipt:removeQuestion('1','1')">
</td>
</tr>
<table
--
Knud


Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: DIV encompassing TD - 06-02-2004 , 01:52 AM



Falc2199 wrote:

Quote:
Can anyone tell me how I can make the following work...

table
div id="1"
tr><td>testing</td></tr
/div
input type="button" value="test"
onClick="javascipt:removeQuestion('1','1')"> </table
Use the validator and get your HTML straight before worrying about the
JavaScript.

http://validator.w3.org/

(1) <table> can directly contain ONLY <tbody>, <thead>, <tfoot>, or <tr> NOT
<div> or <input>
(2) Ids of elements MUST begin with a LETTER.

It would also help to know what you are trying to do, <div> elements are not
magic, its possible that you could script the row itself (depending on what
you are trying to do).

You seem to have chosen an odd forum for this question -
comp.lang.javascript would seen more suited to it (although the problem
itself (your HTML isn't HTML) is better directed to
comp.infosystems.www.authoring.html.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.