473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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.
Jul 20 '05 #1
3 2413
Els
Falc2199 wrote:
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 -

Jul 20 '05 #2
Je*******@aol.com (Falc2199) skrev :
<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
Jul 20 '05 #3
Falc2199 wrote:
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
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
19
by: Jay | last post by:
I'm trying to refresh browser when some new information is available in DB. is there any way to force to refresh browser? Thanks. -Kev
12
by: Ferdi Smit | last post by:
I wanted to provide a template class with an optional data member. The most natural way to do this was to implement a member for a given template parameter, and in the case of 'void', then not. ...
9
by: Tom | last post by:
How do you programatically get a list of subfolders in a folder? Thanks! Tom
2
by: Alex Sedow | last post by:
Why explicit conversion from SomeType* to IntPtr is not ambiguous (according to standart)? Example: // System.IntPtr class IntPtr { public static explicit System.IntPtr (int); public...
0
by: Eric | last post by:
I want to be able to send a project I'm working on to someone else and have everything, including the VS.NET stuff, come over. I know how to set up an install to take the source, but what about all...
5
by: Digital | last post by:
Hi, I'm looking for links to the JS object model for the not-as-popular properties and methods. I've found things like hasOwnProperty, isEnumerable, ===, prototype, and others by searching for...
12
by: Mark | last post by:
In our web.config, we have changed the first line below to look like the second: OLD: <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> NEW: <globalization...
10
by: v4vijayakumar | last post by:
1. why the following program is not working as expected? #include <iostream> using namespace std; int main() { string t("test"); wcout << (wchar_t *) t.c_str() << endl; wcout << t.c_str()...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.