Javascript - Accesing text editor
3 posters
Page 1 of 1
Javascript - Accesing text editor
Hi, I'd like to acess textbox where members type messages by javascript. But how to do that? What is the name of form and the name of elelment? I must have those so I can acess first.
Light Elf- Forumember
- Posts : 144
Reputation : 11
Language : English
Re: Javascript - Accesing text editor
What do you mean by members type messages by javascript? Do you mean a Shoutbox?
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Javascript - Accesing text editor
'document.post' will access the form, 'document.post.message' will access the textbox.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Javascript - Accesing text editor
And when i add this:
- Code:
<input type="button" value="Click me" onClick="if(document.post.message.disabled==true)document.post.message.disabled = false
else if(document.post.message.disabled==false) document.post.message.disabled=true"></button>
Light Elf- Forumember
- Posts : 144
Reputation : 11
Language : English
Re: Javascript - Accesing text editor
There's a few issues which I can't really be bothered to explain.
So this should work:
So this should work:
- Code:
<input type="button" value="Click me" onClick="if(document.post.message.disabled){document.post.message.disabled =''}else{document.post.message.disabled='disabled'}"></button>
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum