Link to home
Start Free TrialLog in
Avatar of Canders_12
Canders_12Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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.
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Check this thread : http://forum./viewtopic.php?id=5117
onloadRegister(function() {document.getElementById('answerSequence').setStyle('display', 'none');});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Canders_12

ASKER

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

I need to get myself on some course!!!