LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2005, 06:29 PM   #1
The Oate
Member
 
Registered: May 2004
Location: Massachusetts
Posts: 134

Rep: Reputation: 16
java script support for browser


I've just started writing a simple web browser in Java and one thing I've noticed is that on google's website, for example, hitting enter or clicking on the search button doesn't actually do anything. I've read that this is because these are based on javascript and currently since I'm using a JEditorPane for my browser window, I can't support this.

First of all, someone confirm that this is the issue with things like this. And, in order to get this to work, is there any way I can do it with the JEditorPane or am I going to have to go a different way? And if I have to go a different way, what direction should I look?
 
Old 10-20-2005, 07:04 PM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
It will be easier for you to base your work on jdic browser.
Judging by the questions you are asking, sorry but i must tell you that doing it all by your own IS NOT a medium/beginner task... if it was you would see lots of feature-full java based browsers...

screenshot
http://javadesktop.org/articles/jdic...rowser_jds.jpg

to run the demo
http://javadesktop.org/jdic/demo/Browser/browser.jnlp

An article
http://javadesktop.org/articles/jdic/index.html

Homepage
https://jdic.dev.java.net/
 
Old 10-20-2005, 07:16 PM   #3
The Oate
Member
 
Registered: May 2004
Location: Massachusetts
Posts: 134

Original Poster
Rep: Reputation: 16
Well, thanks for the info, but is there an answer to be had for my other questions?
 
Old 10-20-2005, 10:54 PM   #4
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
If the button doesn't nothing, it is because you didn't code an event for it :-). There is no magic, you write the events for button click, keyboard mappings,mouse behaviour(right click), url navigation.

This page might help you :
http://www.apl.jhu.edu/~hall/java/Sw...ditorPane.html

There is an effort for a swing xhtml renderer at https://xhtmlrenderer.dev.java.net/. Indeed, jeditorpane only support html 3.x, old css,etc. so it doesn't play well with lots of pages.

You will have to investigate for the real part(javascript, flash and the rest).

FYI:
The browser from sun microsystems(who create java you know) called hotjava which is at version 3.0, i think, is far from being complete. The css, html support is old and won't work for some web sites. I don't know if they supported flash and the recent css specifications.

hotjava is supposed to be opensource by Sun someday. When it will be you can try to improve it for your needs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java support and programming with java sharapchi Slackware 8 11-14-2005 05:47 PM
browser that support xsl demmylls Linux - Software 0 02-08-2004 10:48 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM
If browser doesn't support Javascipt mikeshn Programming 5 10-09-2003 01:37 PM
jse java script for browser andox Linux - Newbie 0 07-04-2003 06:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration