I have a Form in HTML, which contains a
However, when layers are present in the HTML, then Netscape doesn't display any inputs or submit buttons further down the page.
You can see what I mean at
and so people can't submit it.
I have a variable with the URL of the picture in, but whenever I put it in layer tags ( or ilayer ) then it fails. Also, <div> tags don't work!
If anyone has any method of displaying the picture, I would be very appreciative!
Thanks for your help!
You can't use a <div> inside a <td>. Try ending the table and having the remaining contents not be inside a table.
Thanks for getting back, but the <div> is fine, it doesn't bother netscape, but I still have the problems with the layers.
Removing it from a table is out of the question, so that I can keep the same layout.
Your help is appreciated, but do you have any more ideas?
why not just try a simple image swap?
Instead of using div's and ilayers in that table's cell, just put a gif colored the same thing as that cell's background color. then, change the onChange event handler associated with your select box to swap the image. Example:
*i'm labeling the selectbox "avatarselect" and the blank gif "thepic". You'll be able to switch between homer and barney pics*
none = new Image(); none.src = "none.gif";
barney = new Image(); barney.src = "barney.gif";
homer = new Image(); homer.src = "homer.gif";
// function to swap image
var swap = form.avatarselect.options[form.avatarselect.selectedIndex].value;
document.thepic.src = eval(swap + ".src");
<select name="avatarselect" size="1" onChange="selectSwap(this.form)">
<option value="none">Choose one</option>
then in the table cell:
<img src="none.gif" name="thepic">
i tested this, putting it inside table cells and it works perfectly fine in netscape 4.7x and ie. one thing you might want to do though is make sure that all the avatar's are sized the same, and that they have the same dimensions (w and h) as the blank gif. ie's forgiving and will swap any sized image, but netscape will resize the swapped image to fit the size of the blank gif.
Didn't you say that the <div> wasn't working?
I think it has to do with the fact that Netscape considers them to be block-level elements. The reason I pointed out the <div> inside a <td>, is because Netscape is strict about how your order/nest elements.
show and hide layers
Start a new page from scratch, with image. Then, one-by-one, surround the image with the other elements. This will show you what you can and can't do. There is a precise order of which tags can be enclosed by what tags. Also, whether or not you like it, Netscape won't display some things properly if you place them inside a table.
Also, you may want to consider not using <layer> or <ilayer>, if you wish to support Netscape Navigator 6.x:
Thanks for both of the replies, they have been really useful.
For some reason, I had never thought of an image swap???
pieux: Sorry if I sounded arrogant or not thankful, your help has been great, and I will get right on with trying to see what it will and won't do!
No problem, howdj. I understand - I've been there myself.
And even better (since there are no really web safe colors): use a transparent gif
The only problem with that, is that it will not print as "transparent" regardless if you print from Netscape or IE. Then again, printing may not be desired in this application.
I stumbled across this which does exactly what you want: