This is a discussion on "<form> tag in <table> is causing alignment issues - HELP!" within the Web Page Design section. This forum, and the thread "<form> tag in <table> is causing alignment issues - HELP! are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
<form> tag in <table> is causing alignment issues - HELP!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
I have an html table with rows of data. In one column there are text boxes in each row that will take input, then the user can select to submit one by clicking on an image next to the text box.
I'm using the onclick event which calls a javascript method that will get the value entered in the text box, then I use window.location.href = "somepage.html?value=somevalue"; to send the value and do some stuff. Here's the problem...within the <td> of the text box I have <form name="somename"> and the corresponding </form> tag...I've tested it with and without the <form> tags and come to find that the alignment of my data is different and better when the <form> tags aren't present. Can I access the value's of the text boxes via javascript another way besides calling them by using a <form>? Example : document.formname.textboxname.value; - works fine, but if I take out the <form> tags and try and get the value via document.textboxname.value; it doesn't work. I would actually prefer not to use the <form> tags, because the alignment is better...giving me the look I want. So can I get to the values of the text boxes some other way? |
|
|
|
#2
|
|||
|
|||
|
Re: <form> tag in <table> is causing alignment issues - HELP!
You got a link or some code? Would make things a bit easier.
I'm not brilliant with tables but I'll take a peek. Pete. |
|
#3
|
|||
|
|||
|
Re: <form> tag in <table> is causing alignment issues - HELP!
Thank you...sure, let me just type up a quick example of what I mean.
Here's the javascript code :
|
|
#4
|
|||
|
|||
|
Re: <form> tag in <table> is causing alignment issues - HELP!
|
|
#5
|
||||
|
||||
|
Re: <form> tag in <table> is causing alignment issues - HELP!
my suggestion would be to wrap your whole tabel setup in the form - because it is a block level element.
Then, if your javascript relies on the form name, just change the code to get the input name specifically. Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#6
|
|||
|
|||
|
Re: <form> tag in <table> is causing alignment issues - HELP!
Quote:
Quote:
|
![]() |
| Tags |
| alignment of data, form |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Css border causing issues. | Bocaj | Web Page Design | 6 | Jun 8th, 2008 20:17 |
| Vertical alignment issues in IE6. IE7 Won't center my page! | Itsumishi | Web Page Design | 5 | Mar 24th, 2008 20:28 |
| Table Content Alignment... | Wheelz | Web Page Design | 4 | Jul 3rd, 2006 09:54 |
| Vertical Table Alignment | Amphersand | Web Page Design | 6 | Mar 13th, 2006 01:34 |
| Alignment Issues | everlonggg | Web Page Design | 10 | Mar 9th, 2006 21:16 |