Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    New Mozilla Browser span write!

    I posted before regarding a problem I was having with the new Mozilla browser. The code below pastes to a span in every browser except Mozilla. Somebody asked that I post the entire script so they could get a better idea as to why it isn't working...

    Can someone please tell me what I put in to detect mozilla and what code pastes to the span in Mozilla.

    <html>
    <head>
    <script language="javascript">
    <!---
    function pasteit() {
    gloat="<b>yada</b>";
    if (document.layers) {
    document.layers.news.document.write(gloat)
    document.layers.news.document.close()
    } else if (document.all) {
    news.innerHTML=gloat;
    } else if (document.getElementById) {
    document.getElementById("news").innerHTML=gloat;
    } else {
    return;
    }
    }
    //-->
    </script>
    </head>
    <body onload="pasteit();">

    <TABLE BORDER="0" WIDTH="200" CELLPADDING="5" CELLSPACING="0" height="80">
    <tr>
    <tD width="100%" style="padding:5px;" align="center">
    <SPAN ID="news"></SPAN>
    </TD>
    </TR>
    </TABLE>
    </body>
    </html>

    thanxalot.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should really post this in the same thread and not start another one for the same question; span write for new Mozilla

    Second,whatever gave you the idea that it doesn't work in Mozilla?? It works fine.
    Btw,it doesnt paste anything,it just changes the innerhtml of the span.Paste means that it get the content of the clipboard.

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    yeah k

    fair enough,

    just I'm in aus and it seems most activity on this forum happens at my night, when I return next day my posts are on the back end of a long list of current posts, so I figure the chance of reply will be minimal....

    but okay.


    I see your point with the mozilla browser thing... when I tested the code I posted here it worked as well... however I simplified it greatly for this forum... so my problem must be in another area of my code...


    thanks for pointing out obvious.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I didn't want to sound harsh,sorry if I did.
    But if you reply to a thread,it automatically moves to the first page on the top of the list

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Basically what Bosko said - don't start a new thread for the same topic, and don't worry about being behind other threads - if all the new threads when I visit span across more than one page, I make sure to at least look at all the titles. I'm sure that I'm not the only one either.

    Closing thread.


  •  

    Posting Permissions

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