473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

dhtml, java and dom

hi,
i'm trying to modify html in the browser via a java applet. i'm using the
org.w3c.dom.html and com.sun.java.browser.dom packages to do this. i can
get and set the title as per the sun example, but when i try something
like:

Element advForm = doc.getElementById("ourForm");
HTMLDivElement screen;
HTMLParagraphElement label;
HTMLInputElement field;

if (advForm == null)
throw new Exception("Cannot find 'ourForm' Id");

screen = (HTMLDivElement) doc.createElement("div");
advForm.appendChild(screen);

//try and add a label
label = (HTMLParagraphElement) doc.createElement("p");
screen.appendChild(label);
label.appendChild(doc.createTextNode("label"));

i get no errors, but neither does anything happen.

am i doing something wrong, or does java dom not work. i've read
previous posts saying this, but had hoped it was fixed by now.

i'm using mozilla 1.4.2 and java 1.5

thanks,
mike.
Jul 17 '05 #1
0 1255

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jag | last post by:
Hi, I am trying tolink a dynamic page which was HTML till now and has been converted to a JSP and has been included in the JS library and when I am trying to deploy the site on Sun One App...
14
by: Dafydd | last post by:
I have the following Script in my web page reduce to two pages. <script> function details() { document.getElementById('details').style.visibility='visible';...
2
by: Brett | last post by:
Both make use of DIV tags or layers. What are the main differences between DHTML and style sheets? Also, what type of problems might an author experience in the way of incompatibilities? For...
21
by: Nik Coughlin | last post by:
Are there methods for manipulating images in JavaScript that would allow me to write functions to rotate, skew, mask and resize images (bitmaps)? The functions need to be fast enough for use in a...
6
by: pete | last post by:
Hello, I need resources for the following and would be appreciative to anyone that can help!!!! 1. a free website that clearly & comprehensively explains the DOM 2. a free website that has...
18
by: Andromeda | last post by:
I've been trying to add a tree menu to my website with some luck (more or less). I came across a script on simplythebest.net, but I seem to be having a problem with it... and since they have no...
3
by: adrian suri | last post by:
Hi short question are selectors h1, h2 <script> p etc now case sensitive in the world of DHTML eg transitional / strict regards Adrian
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.