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

List:       kde-bugs-dist
Subject:    Bug#17907: javascript and 'with' keyword
From:       rmiranda () solar ! com ! br
Date:       2000-12-31 13:55:14
[Download RAW message or body]

Package: kjs
Version: 2.0.1
Severity: normal
Installed from: Red Hat RPMS

When using "with" to set the default object, if I try to access any variable of other \
scope (such as a local variable), I get "null" as response.

The following code is adapted from \
http://technet.oracle.com/support/bboard/discussions.htm. In it, inside the with \
block, new_page get null as its value.

new_page="http://technet.oracle.com:89/cgi-bin/Ultimate.cgi?action=intro"
 
with(document){
        writeln('<frameset rows="142,*" cols="*" frameborder="0" framespacing="0" \
                border="0">');
      writeln('  <frame src="../../o_banner.htm" name="banner" marginwidth="10"
marginheight="7" scrolling="no" noresize>');
        writeln('  <frameset cols="130,*" rows="*">');
        writeln('    <frame src="../../toc.htm" name="toc" marginwidth="10" \
marginheight="0" scrolling="no" noresize>'); }
        writeln('    <frame src="' + new_page + '" name="content" marginwidth="0" \
marginheight="0">');  writeln('  </frameset>');
        writeln('</frameset>');
} 

	Robson.

(submitted via bugs.kde.org)


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

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