Results 1 to 3 of 3

Thread: new to java, help! *RESOLVED*

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2001
    Posts
    525

    new to java, help! *RESOLVED*

    Is there another way to express the line: ('sTOC'+number).style.display = "none"; ??? i keep getting an error: 'style' is null or not an object

    Code:
    function figEnable(choice, number)
        {
        	if(choice == "No")
        	{
        		('sTOC'+number).style.display = "none";
        		("sQty"+number).style.display = "none";
        		("sRate"+number).style.display = "none";
        		("scalcTotalCost"+number).style.display = "none";
        	}
        	else
        	{
        		('sTOC'+number).style.display = "";
        		("sQty"+number).style.display = "";
        		("sRate"+number).style.display = "";
        		("scalcTotalCost"+number).style.display = "";
        	}
        }
    Last edited by jsun9; Jan 13th, 2003 at 12:43 PM.

  2. #2
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65
    use the eval() fumction...

    eval('sTOC'+number'+'.style.display = "none";')

    etc...
    if you choose not to decide you still have made a choice!

    RUSH rocks!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2001
    Posts
    525

    Talking

    works great! thank you very much.

    Code:
    eval('sTOC'+number+'.style.display = "none";')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width