Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select in Layer tag not appearing properly 2

Status
Not open for further replies.

wood

MIS
Aug 3, 2000
139
CA
I have the following code:

...
<table>
<tr>

<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;><b>Frequency of Report:</b></font>
</td>

<td align=&quot;left&quot;>
<select name=&quot;RptFreq&quot; onChange=&quot;listOptions(this.form)&quot;>
<option value=&quot;*WEEKLY&quot;>Weekly</option>
<option value=&quot;*MONTHLY&quot; selected>Monthly</option>
</select>
</td>
</tr>

<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;><b>Scheduled Day:</b></font>
</td>
<td align=&quot;left&quot;>
<select name=&quot;SchDay&quot;>
<option value=&quot;*MON&quot;>Monday</option>
<option value=&quot;*TUE&quot;>Tuesday</option>
<option value=&quot;*WED&quot;>Wednesday</option>
<option value=&quot;*THU&quot;>Thursday</option>
<option value=&quot;*FRI&quot;>Friday</option>
<option value=&quot;*NONE&quot;>None</option>
</select>
</td>
</tr>

<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;><b>Relative Day:</b></font>
</td>
<td align=&quot;left&quot;>
<ilayer name=&quot;LastSelect&quot;>
<select name=&quot;RelDay&quot;>
<option value=&quot;*LAST&quot; selected>Last</option>
<option value=&quot;1&quot;>1</option>
<option value=&quot;2&quot;>2</option>
<option value=&quot;3&quot;>3</option>
<option value=&quot;4&quot;>4</option>
<option value=&quot;5&quot;>5</option>
</select>
</ilayer>
</td>
</tr>
</table>
...

What I am doing is having a layer so that I can make it visible/invisible based on the first select box. The code to make it visible/invisible works fine in both IE and NS.

The problem is that in NS the select doesn't show as a dropdown box. It just displays the text values in the options. It displays: &quot;*LAST 1 2 3 4 5&quot;, as text. In IE there is no problem.

Does anyone have any ideas?
 
Odd, I copied your code and tried it and it works for me in IE 5.5 and Netscape 4.7.

Try clearing your cache and refreshing the page.
 
hey, wood, r u here?
catch! it works, but i've broken ur page layout - u shuld fix it.. :)

<html>
<head>
<script>

function showIt(layerName){
if (document.getElementById){
document.getElementById(layerName).style.visibility=&quot;visible&quot;; }
else { document.layers[layerName].visibility = &quot;show&quot;; }
}

function hideIt(layerName){
if (document.getElementById){
document.getElementById(layerName).style.visibility=&quot;hidden&quot;; }
else{ document.layers[layerName].visibility = &quot;hide&quot;; }
}

function listOptions(formobj){
//Check the browser version.
if (navigator.appName==&quot;Netscape&quot;){ var browser=&quot;ns&quot;; }
else { var browser=&quot;ie&quot;; }
//here is right syntax for select in netscrap:
var optchosen=document.reports.RptFreq[document.reports.RptFreq.selectedIndex].value
if (optchosen!=&quot;*MONTHLY&quot;) {
//weekly
//hide the last select box.
if (browser==&quot;ns&quot;){ hideIt('thirdSelect') }
else{ document.all.thirdSelecttb.style.display = 'none' }}
else {//monthly
//show the last select box.
if (browser==&quot;ns&quot;){ showIt('thirdSelect') }
else{ document.all.thirdSelecttb.style.display = 'block' }}}
</script>
</head>
<body>
<br>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<table>
<tr><td>
<form name=&quot;reports&quot; method=&quot;post&quot; action=&quot;scheduler&quot;>
<table>
<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Frequency of Report:</b>
</font>
</td>
<td align=&quot;left&quot;>
<select name=&quot;RptFreq&quot; onChange=&quot;listOptions(this.form)&quot;>
<option value=&quot;*WEEKLY&quot;>Weekly</option>
<option value=&quot;*MONTHLY&quot; selected>Monthly</option>
</select>
</td>
</tr>
<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Scheduled Day:</b>
</font>
</td>
<td align=&quot;left&quot;>
<select name=&quot;SchDay&quot;>
<option value=&quot;*MON&quot;>Monday</option>
<option value=&quot;*TUE&quot;>Tuesday</option>
<option value=&quot;*WED&quot;>Wednesday</option>
<option value=&quot;*THU&quot;>Thursday</option>
<option value=&quot;*FRI&quot;>Friday</option>
<option value=&quot;*NONE&quot;>None</option>
</select>
</td>
</tr><tr><td>
<input type=&quot;hidden&quot; name=&quot;RelativeDay&quot; value=&quot;&quot;> </td></tr></table>
</form>
</td></tr>
<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Relative Day:</b>
</font>
</td>
<td align=&quot;left&quot; style=&quot;display:block;&quot; id=&quot;thirdSelecttb&quot; name=&quot;thirdSelecttb&quot;>
<div style=&quot;position:relative;display:block;width:250;visibility:visible&quot; id=&quot;thirdSelect&quot; name=&quot;thirdSelect&quot;>
<form name=&quot;form2&quot;>
<select name=&quot;RelDay&quot;>
<option value=&quot;*LAST&quot; selected>Last</option>
<option value=&quot;1&quot;>1</option>
<option value=&quot;2&quot;>2</option>
<option value=&quot;3&quot;>3</option>
<option value=&quot;4&quot;>4</option>
<option value=&quot;5&quot;>5</option>
</select>
</form>
</div>
</td>
</tr>
</table>
</font>
</body></html>

enjoy.. ;-) regards, vic
 
ok, here is ur fixed layout:

<body>
<br>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<table width=&quot;257&quot;>
<tr>
<td height=&quot;95&quot;>
<form name=&quot;reports&quot; method=&quot;post&quot; action=&quot;scheduler&quot;>
<table>
<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Frequency of Report:</b>
</font>
</td>
<td align=&quot;left&quot;>
<select name=&quot;RptFreq&quot; onChange=&quot;listOptions(this.form)&quot;>
<option value=&quot;*WEEKLY&quot;>Weekly</option>
<option value=&quot;*MONTHLY&quot; selected>Monthly</option>
</select>
</td>
</tr>
<tr>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Scheduled Day:</b>
</font>
</td>
<td align=&quot;left&quot;>
<select name=&quot;SchDay&quot;>
<option value=&quot;*MON&quot;>Monday</option>
<option value=&quot;*TUE&quot;>Tuesday</option>
<option value=&quot;*WED&quot;>Wednesday</option>
<option value=&quot;*THU&quot;>Thursday</option>
<option value=&quot;*FRI&quot;>Friday</option>
<option value=&quot;*NONE&quot;>None</option>
</select>
</td>
</tr><tr><td>
<input type=&quot;hidden&quot; name=&quot;RelativeDay&quot; value=&quot;&quot;> </td></tr></table>
</form>
</td></tr>
<tr >

<td height=&quot;69&quot; >
<table width=&quot;257&quot;>
<tr valign=&quot;top&quot; ><td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot; color=&quot;black&quot;>
<b>Relative Day:</b>
</font>
</td>
<td align=&quot;left&quot; style=&quot;display:block;&quot; id=&quot;thirdSelecttb&quot; name=&quot;thirdSelecttb&quot; >
<div style=&quot;position:relative;display:block;width:250;visibility:visible&quot; id=&quot;thirdSelect&quot; name=&quot;thirdSelect&quot;>
<form name=&quot;form2&quot;>
<select name=&quot;RelDay&quot;>
<option value=&quot;*LAST&quot; selected>Last</option>
<option value=&quot;1&quot;>1</option>
<option value=&quot;2&quot;>2</option>
<option value=&quot;3&quot;>3</option>
<option value=&quot;4&quot;>4</option>
<option value=&quot;5&quot;>5</option>
</select>
</form>
</div>
</td>
</tr></table></td></tr>
</table>

</font>
</body>

i did my best.. (i guess so) :) regards, vic
 
DANG THATS A LOT OF CODE! Regards,
Anth:cool:ny
----------------------------------------
&quot;You say [red]insanity[/red] like it's a BAD THING!&quot;
 
To Vituz and Mithrilhall,

Thank you, oh so much. This did the trick. I guess the tables were causing a problem as well.

Thank you again.

To WhiteTiger,

You haven't even seen the whole thing, this is just a scetin of it. All to code totals 4772 lines so far, and I'm not even done yet.


Thanks to everyone who helped. I will make sure I vote your responses helpful.

Beverly
 
Wood

Sorry about not responding yesterday. We lost our DSL yesterday at work and I was unable to respond. Glad to see Vic got it though. It took me quite a bit to find the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top