Code: Select all
<div id="inOne" style="visibility:hidden; display:inline;">
<tr>
<td class="text">
Text here:
</td>
<td class="text">
<input type="text" name="cars_month" size="3">
</td>
</tr>
</div>Moderator: General Moderators
Code: Select all
<div id="inOne" style="visibility:hidden; display:inline;">
<tr>
<td class="text">
Text here:
</td>
<td class="text">
<input type="text" name="cars_month" size="3">
</td>
</tr>
</div>Indeed.shiznatix wrote: thats a segment of the table i want to be hidden. problem is, its not hidden. the div tags dont work when you put a <tr> or a <td> inside of the divs. any sugestions?
Code: Select all
<!-- in <head> -->
<script type="text/javascript">
document.getElementById("inOne").style.display = "table-inline";
</script>
<!-- /in head -->
<div id="inOne" style="visibility:hidden; display:none;">
<tr>
<td class="text">
Text here:
</td>
<td class="text">
<input type="text" name="cars_month" size="3">
</td>
</tr>
</div>Code: Select all
<div id="inOne" style="display: none;">
<tr style="display: none;">
<td>
</td>
</tr>
</div>Code: Select all
<table id="tbl">
<tr>
<td class="text">
Text here:
</td>
<td class="text">
<input type="text" name="cars_month" size="3">
</td>
</tr>
</table>
<script>
Tbl = document.getElementById("tbl");
//suppose want to hide row no. 2
Tbl.rows[1].style.display = "none";
</script>Code: Select all
<table id="info" border="0" align="left" cellpadding="4" cellspacing="0">
<tr>
<td class="text" colspan="2">
<b>Please supply at least 1 verifiable reference.</b><br><br><br>
</td>
</tr>
<tr>
<td class="text" colspan="2">
<b>Reference #1</b>
</td>
</tr>
<tr>
<td class="text" width="33%">
Production Company/Studio:
</td>
<td class="text" width="67%">
<input type="text" name="agency1" value="<?= $info1['agency'] ?>">
</td>
</tr>
<!-- START HERE FOR THE INVISIBLE STUFF AND THIS IS WHERE I HAVE PROBLEMS -->
<tr>
<td class="text" width="33%">
<b>Bookers For Vehicles</b>
</td>
<td class="text" width="67%">
</td>
</tr>
<tr>
<td class="text">
Approximate number of cars needed per month:
</td>
<td class="text">
<input type="text" name="cars_month" value="<?= $info9['cars_month'] ?>" size="3">
</td>
</tr>
</table>Are you using Firefox? I had that problem when I used AJAX to write incoming posts into a div. If I remember correctly, this could be "solved" by making overflow: visible;. But that meant the text went past the div. One solution was to have a fixed height in pixels; another was to re-set the size after each post was added, or in your case, after each toggling of visibility.shiznatix wrote:also whenever i go back and forth between hidden and viewed with javascript it adds a blank space, 1 space for each time i go back and forth. whats up with that?
Okay, seriously, it doesnt even have an html tag!shiznatix wrote:ok here goes. half of it works in IE and the other half works in firefox. what i need is for the whole thing to work in both!
http://www.carsforfilms.com/test.html
please take a look at that in both browsers. notice how IE just goes crazy with the javascript but firefox does it just fine. But then notice how firefox will put in a extra space or two whenever you go between the "yes" and "no" and the row spacing is messed up, IE does not have those last 2 problems.
PLEASE! im super desperate here. any solutions?
Ok it was a test page where I just threw a very simple version of it on there. Chill. Second, I made it perfect html passed all the awesome tests, did nothing.Roja wrote:Okay, seriously, it doesnt even have an html tag!
Take your snippet, and make it into valid html. Until you do, there is absolutely no way to ensure consistent behavior across multiple browsers.
Using php code tags on the forum doesn't fix your code - it helps us see where the problems are easier. Same thing for fixing the html issues. It just gets the noise out of the way.shiznatix wrote:Second, I made it perfect html passed all the awesome tests, did nothing.
I will admit, I dont see whats causing it. Its definitely something in the javascript (and ff throws an error about myform not being defined), but I don't know what specifically. Sorry I can't help more.shiznatix wrote:Now I tried foobars ideas for the Firefox issues but to no avail. Im not sure what he means by resetting the height, but it keeps putting in blank spaces.
Warning: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
Source File: http://www.carsforfilms.com/test.html
Line: 1
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">Code: Select all
table{
border-collapse: collapse;
}