...

View Full Version : Making a <td> but not showing it



Ge64
12-18-2006, 08:34 AM
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.

_Aerospace_Eng_
12-18-2006, 08:41 AM
What about a hidden input field?

Ge64
12-18-2006, 09:04 AM
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...

koyama
12-18-2006, 09:26 AM
How about an ordinary <div id="storage">. You could assign


#storage {
display: none;
}

still being accessible through scripting. Or am I wrong?

Ge64
12-18-2006, 09:32 AM
How about an ordinary <div id="storage">. You could assign


#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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum