|
-
Nov 28th, 2006, 10:13 AM
#1
Thread Starter
Hyperactive Member
Showing hiding form elements
I'm currently developing a PHP/MySQL site and I've come to a small problem...
What I have is a post and there is a little option box next to it with 'flag' inside it as well as a few other options. All I want to do is if the user chooses 'flag' a textarea appears, if not - it disappears...
At the moment what I'm doing is when they choose 'flag' it takes them to another page with the textarea on it, but of course the above method would save all that hassle...
As far as I understand (I'm a relative newbie to all this) JS can do this? But I've been looking on the net and it's not clear whether there are browser problems doing this or not..
Does anyone have a good way of handling this or should I not bother?
Thx
-
Nov 28th, 2006, 10:41 AM
#2
Re: Showing hiding form elements
Yes, but there are various methods of referencing the element in question. Which you use depends on how you need it to function. How many of these are there? You can use document.getElementById('elID').style.display='none'; or = 'block'; or ='inline';
-
Nov 29th, 2006, 03:12 PM
#3
Thread Starter
Hyperactive Member
Re: Showing hiding form elements
I decided against using this method as I thought it would be better to make the user go to another page where I could explain the purpose of the form... Thanks for the advice though!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|