|
-
Oct 25th, 2002, 06:18 AM
#1
Thread Starter
Addicted Member
Netscape 4.7 problem
Hi,
Have a look at the following code
Code:
<html>
<body>
<SCRIPT LANGUAGE="JavaScript"><!--
var hidden = false;
var mytext = "<form name=form1><SELECT Name='Sample'><OPTION Value='This is option 1'>This is option 1</OPTION><OPTION Value='This is option 2'>This is option 2</OPTION><OPTION Value='This is option 3'>This is option 3</OPTION><OPTION Value='This is option 4'>This is option 4</OPTION></SELECT></form>";
function changeit() {
if (hidden) {
if (document.layers) {
document.layers['GenericID'].document.open();
document.layers['GenericID'].document.writeln(mytext);
document.layers['GenericID'].document.close();
}
else if (document.all)
document.all("GenericID").innerHTML= mytext;
}
else {
if (document.layers) {
document.layers['GenericID'].document.open();
document.layers['GenericID'].document.writeln('');
document.layers['GenericID'].document.close();
}
else if (document.all)
document.all("GenericID").innerHTML= '';
}
hidden = !hidden;
}
function getMe()
{
alert(document.form1.Sample.value);
}
//--></SCRIPT>
<table>
<TD>
<Div ID="GenericID" STYLE="position: absolute">
<SCRIPT LANGUAGE="JavaScript"><!--
document.write(mytext);
//--></SCRIPT>
</DIV>
</td>
</table>
<BR><BR><FORM>
<br>
<br>
<INPUT TYPE="BUTTON" VALUE="Click Me" onClick="changeit()">
<Input type="Button" Value="option" OnClick="getMe()">
</FORM>
</body>
</html>
Here I want the DIV tag to be inside a TD. But this works in netscape 4.7,but the contents appear only at the top of the page. But if I remove the position:absolute, it doesn't work. Is there any way that I can position this DIV anywhere I like on the page.
Thanks,
Pres.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|