Solved

Facebook & Javascript - Set textfield to hide by default

Posted on 2010-09-06
5
322 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:Canders_12
5 Comments
 
LVL 82

Expert Comment

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

Open in new window

0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 33613074
just set it to hidden initially
<input type=''text' style='display:none'>
0
 

Author Comment

by:Canders_12
ID: 33613082
sorry, but that thread does not seem in full? am i missing something? :(
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33613104
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
 

Author Closing Comment

by:Canders_12
ID: 33613110
That seemed too easy lol

I need to get myself on some course!!!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question