Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:48 PM
Falc2199
Guest
 
Posts: n/a
Default DIV encompassing TD

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.
  #2  
Old July 20th, 2005, 11:48 PM
Els
Guest
 
Posts: n/a
Default Re: DIV encompassing TD

Falc2199 wrote:
[color=blue]
> 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.[/color]

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 -

  #3  
Old July 20th, 2005, 11:48 PM
Knud Gert Ellentoft
Guest
 
Posts: n/a
Default Re: DIV encompassing TD

JehanNYNJ@aol.com (Falc2199) skrev :
[color=blue]
><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.[/color]

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
  #4  
Old July 20th, 2005, 11:48 PM
David Dorward
Guest
 
Posts: n/a
Default Re: DIV encompassing TD

Falc2199 wrote:
[color=blue]
> 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>[/color]

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
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles