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.
I agree. Here's the link:
subject: Display problem
Not achieving space between div blocks containing lists
Problem with struts-menu for second level submenu
HTML drop downs not working
Question on how to implement multi level menu (navigation bar) in html/css
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