The Artima Developer Community
Sponsored Link

Java Buzz Forum
DHTML scripting in Pnuts

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Toyokazu Tomatsu

Posts: 66
Nickname: tomatsu
Registered: Jul, 2003

Toyokazu Tomatsu is a developer of Pnuts.
DHTML scripting in Pnuts Posted: Jun 28, 2006 7:59 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Toyokazu Tomatsu.
Original Post: DHTML scripting in Pnuts
Feed Title: Pnuts Addict
Feed URL: http://jroller.com/tomatsu/feed/entries/rss
Feed Description: Toyokazu Tomatsu's Weblog
Latest Java Buzz Posts
Latest Java Buzz Posts by Toyokazu Tomatsu
Latest Posts From Pnuts Addict

Advertisement
Jacob is, as far as I know, the only Java-ActiveX bridge that supports COM event handling. I updated win32com.jacob module so that the following DHTML script works as expected. When you click the button, a Pnuts function of the script is called. As the result, the button is replaced with the message "Clicked".

Here is the script in Pnuts:

    use("win32com.jacob")
    ie = CreateObject("InternetExplorer.Application");
    ie.visible = true
    ie.navigate("file://c:/test.html")
    button = ie.document.getElementById("button")
    button.onclick = function (){
      ie.document.getElementById("target").innerHTML = "Clicked"
    }
and the HTML file:
    <html>
    <body>
    <span id="target">
    <input id="button" type="submit" value="click here"></input>
    </span>
    </body>
    </html>

All I've done so far is just an experiment. What I would like to see (eventually if possible) is Java API that provides essential features that allow DHTML/Ajax scripting in Java, which should include an implementation of DHTML object model, event handling, and XMLHttpRequest. It would be nice if such DHTML scripting API is distributed with JRE, installed as a browser's plugin, and runs without Swing/AWT. Once DHTML scripting can be done in Java, JSR-223 languages can also be used, although slow startup interpreters would not be useful for this purpose.

Read: DHTML scripting in Pnuts

Topic: PeopleOverProcess.com: links for 2006-06-23 Previous Topic   Next Topic Topic: Open Source SIP Tools

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use