[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Javascript problem
From:       Vadim Plessky <lucy-ples () mtu-net ! ru>
Date:       2001-10-23 10:48:03
[Download RAW message or body]

On Monday 22 October 2001 22:49, Thomas Bennett wrote:
|   I am having a problem on KDE 2.2.1 running javascript functions from the
|   <body> tag. It sometimes works, sometimes does not but I don't know why.
|
|   The following html will never work in Konqueror  but does in IE. (I have
| also attached it).
|

try
<body id="aaa" onload="startup();">
and
<script language=javascript>
function startup() {
//š document.bgColor="00FFFF";
// get BODY element
 el = document.getElementById("aaa");
 el.style.background="#00FFFF";
// or it can be el.style.backgroundColor, don't rememebr for 100%
}

</script>
|   <html>
|   <head>
|   <title>test page</title>
|   <meta http-equiv="pragma" content="nocache"></meta>
|   <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
|
|   <script language=javascript>
|     var junk;
|
|   function startup() {
|     document.bgColor="00FFFF";
|   }
|
|   </script>
|   </head>
|
|   <body onload="startup();">
|
|   <center>
|   <h2>Result</h2>
|
|   </body>
|   </html>
|
|   Regard
|   Thomas

-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic