Believe it or not, JavaScript DOES work with RunBASIC.

Here's a simple example:

 html "<script type='text/JavaScript'>"
 html "document.write(""This is Javascript!"");"
 html "</script>"

That will print 'This is Javascript!' on the screen.


Very simple, but it shows JavaScript is executable. If there are any limits to JS, I haven't found them. One problem is having to use only javascript for handling it's variables, though.

However, this should help implement forms and such that aren't available in RunBASIC yet.


- Chris Iverson - thedarkfreak thedarkfreak



More Javascript

Change color of scrollbars - - JanetTerra JanetTerra Dec 18, 2007
    Cls
    Textarea #t, "Changing scrollbar colors with JavaScript", 10, 10
    Html "<Script Type='Text/Javascript'>"
    Html "function ScrollColor(){
        document.body.style.scrollbarFaceColor='Red';
        }"
    Html "ScrollColor()"
    Html "</Script>"
    Print: Print
    Link #quit, "Exit", [quit]
Wait
 
[quit]
    Cls
End


Identify Browser
Cls
Html "<Script Language='JavaScript'>"
Html "document.write('Your browser is ' + navigator.appName+ ', ');"
Html "document.write('Version number ' + navigator.appVersion+ '.');"
Html "</script>"
End