Results 1 to 7 of 7

Thread: Netscape 4.7 problem

  1. #1

    Thread Starter
    Addicted Member MrPresident2k's Avatar
    Join Date
    May 2002
    Location
    INDIA
    Posts
    167

    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.

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    can't you use a layer instead of a div?
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    <Div ID="GenericID" STYLE="position: absolute; x: 100; y: 200; width: 300; height: 60">

    Something like this, NS 4.7 is outdated...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Addicted Member MrPresident2k's Avatar
    Join Date
    May 2002
    Location
    INDIA
    Posts
    167

    I'll try

    I'll try this.

    Thanks,
    Pres

  5. #5
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Originally posted by CornedBee
    <Div ID="GenericID" STYLE="position: absolute; x: 100; y: 200; width: 300; height: 60">

    Something like this, NS 4.7 is outdated...
    You need a unit (i.e. px) on the co-ordinates otherwise it's invalid and probably won't work in Mozilla or Opera. So it should look more like this:

    Code:
    <Div ID="GenericID" STYLE="position: absolute; x: 100px; y: 200px; width: 300px; height: 60px">

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Yeah, right.

    Maybe I should do more HTML to remain trained. Or maybe I should just rely on Dreamweaver and not give any advice anymore
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Hehe, nah it's alright, at least you don't start shouting when someone corrects you, I probably would

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width