Facebook & Javascript - Set textfield to hide by default

Hello all,

I can use the following code to hide a textfield as follows:

    document.getElementById('answerSequence').setStyle('display', 'none');

I can then show it again using the code below:

    document.getElementById('answerSequence').setStyle('display', '');


However, I want the textfield to be hidden when the page loads initially.  Any ideas how this may be done?

Many thanks, in advance, Colin.
Canders_12Asked:
Who is Participating?
 
Gurvinder Pal SinghConnect With a Mentor Commented:
just set it to hidden initially
<input type=''text' style='display:none'>
0
 
leakim971PluritechnicianCommented:
Check this thread : http://forum./viewtopic.php?id=5117
onloadRegister(function() {document.getElementById('answerSequence').setStyle('display', 'none');});

Open in new window

0
 
Canders_12Author Commented:
sorry, but that thread does not seem in full? am i missing something? :(
0
 
rockiroadsCommented:
do what gurvinder says (best) or create a javascript function which hides it and use <body onLoad to call it (not so great lol)
0
 
Canders_12Author Commented:
That seemed too easy lol

I need to get myself on some course!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.