Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making a <td> but not showing it

    Is there any way you can make a <td> or a <p> somewhere that doesn't have any use at all except storing other code in for a javascript? like a hidden one with no width or height? This is useful for a javascript I am using. I need to store a peice of html code in a variable but javascript doesn't support multi line variables so it would become unreadable.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What about a hidden input field?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    What about a hidden input field?
    Edit: it won't work, a hidden input doesn't have any innerHTML, only a textarea does. And that isn't hidden...
    Last edited by Ge64; 12-18-2006 at 08:09 AM.

  • #4
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    How about an ordinary <div id="storage">. You could assign
    Code:
    #storage {
      display: none;
    }
    still being accessible through scripting. Or am I wrong?

  • #5
    New Coder
    Join Date
    Dec 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by koyama View Post
    How about an ordinary <div id="storage">. You could assign
    Code:
    #storage {
      display: none;
    }
    still being accessible through scripting. Or am I wrong?
    Yeah thats what I'm looking for, I'll try if it works Edit: Yep thats what I need, thanks! never heard of that before, display: none
    Last edited by Ge64; 12-18-2006 at 08:43 AM.


  •  

    Posting Permissions

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