File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jan 17, 2009
Jan 19, 2009 00:44:58
i m using this code & trying to display "Showing List" using x.value = "Showing List"; but its not displaying. please suggest me how will it work?
x.value = "Showing List";
x.text = "Showing list"
var y = document.getElementById('A1');
y.add(x, null); // standards compliant; doesn't work in IE
y.add(x); // IE only
<ul id= 'A1'>
Joined: Nov 08, 2001
Jan 19, 2009 05:58:04
li elements do not have text and value properties. You can set the attributes, but they are not going to do anything. If you want to add text to an li, you wither need to add a textNode or you have to use innerHTML.
It is sorta covered in the
JavaRanch Style Guide
subject: Display problem
Question on how to implement multi level menu (navigation bar) in html/css
HTML drop downs not working
Problem with struts-menu for second level submenu
Not achieving space between div blocks containing lists
Struts Taglibs issues while including html in jsp
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014