User Profile

Collapse

Profile Sidebar

Collapse
kelton5020
kelton5020
Last Activity: Dec 27 '07, 09:04 PM
Joined: Dec 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kelton5020
    replied to Add remove elements dynamically
    Through testing I discovered the solution to my problem that works on Opera, Firefox AND Internet Explorer.

    Here it is.

    Code:
    <html>
    	<head>
    		<script type="text/javascript">
    			function addButton(){
    				var newobj = document.createElement('div');
    				newobj.id = 'myid';
    				newobj.setAttribute('style', 'background-color: blue;');
    				document.body.appendChild(newobj);
    ...
    See more | Go to post

    Leave a comment:


  • kelton5020
    replied to Add remove elements dynamically
    CORRECTION...

    in IE when you use this instead
    Code:
    var newobj = document.createElement('<input type="button" name="myname">');
    it works...but when I try to do this with a unordered list it doesn't work.
    See more | Go to post

    Leave a comment:


  • kelton5020
    replied to Add remove elements dynamically
    still returning Undefined when I specify a specific element in the fElement array, and the length is still 0. I'd post my code but it's a bit lengthy and uncommented. So here is what I did...I used your code and created a sample page...works in Opera, Firefox, but not Internet Explorer...
    Code:
    <html>
    	<head>
    		<script type="text/javascript">
    			function addButton(){
    				var newobj = document.createElement('button');
    ...
    See more | Go to post

    Leave a comment:


  • kelton5020
    started a topic Add remove elements dynamically

    Add remove elements dynamically

    Hey, I am having problems adding/removing elements dynamically.
    I know why it's not working, I just don't know a work-around for the problem.

    Problem:
    I am dynamically creating elements, naming them, and then later searching for them so I can eather append them, or delete them. Works in firefox of course. I know this isn't supposed to work, and I have no idea how to make it work.
    Basically when I do this:
    ...
    See more | Go to post
No activity results to display
Show More
Working...