Results 1 to 3 of 3

Thread: Font color inside document.write()??

  1. #1

    Thread Starter
    Lively Member CagedConfession's Avatar
    Join Date
    Oct 2002
    Posts
    98

    Font color inside document.write()??

    I'm kinda new at editing javascript tags and I'm trying to change the font color inside the tag
    Code:
    document.write( <font color='#000000'>width +"&#215;"+ height )
    I have treid numerous combinations but I'm still coming up with an error. Could u please inform me of the correct way to write this. Here is the complete code. This is just a simple screen resolution code.

    Code:
    <SCRIPT LANGUAGE="Javascript"><!--
       
    if (self.screen) {     // for NN4 and IE4
            width = screen.width
            height = screen.height
    // Testing this first prevents firing the slow Java of NN4
    }
    else if (self.java) {   // for NN3 with enabled Java
           var jkit = java.awt.Toolkit.getDefaultToolkit();
           var scrsize = jkit.getScreenSize();       
           width = scrsize.width; 
           height = scrsize.height; 
    }
    else{
     width = height = '?' // N2, E3, N3 w/Java off, probably Opera and WebTV
    
    }
    document.write(" Screen Resolution:");
    document.write( <font color='#000000'>width +"&#215;"+ height )
    //or whatever based on the above results
    
    //--></SCRIPT>

    Thanks in Advance
    [vbcode]Private Sub Form_Load()
    I would rather be hated for who I am than loved for who I'm not.[/vbcode]
    End Sub

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Try asking in the appropriate forum

    You'll probably get a better response there.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Lively Member CagedConfession's Avatar
    Join Date
    Oct 2002
    Posts
    98
    Ahh I see now, sorry about that .
    Last edited by CagedConfession; Mar 18th, 2003 at 07:32 PM.
    [vbcode]Private Sub Form_Load()
    I would rather be hated for who I am than loved for who I'm not.[/vbcode]
    End Sub

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