GuildPortal will be going offline (permanently) by the end of the month.
Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Feature Discussion > java script forum post
Bardockzen (New Admin) 4/26/2009 4:49 PM EST : java script forum post

Posts: 488
Fingers of Fury!

Hello everyone,
                      I am writing a page that uses javascript and forms to collect data from the viewer of the page as a way for them to apply to our guild. We had been having them copy our form, paste it into a post and then fill in the blanks. This way would be much smoother for people to apply to our guild. But my question is "is there a way to post onto the forums using javascript?". I am close to figuring it out by looking over the forum page but I dont have it working yet. I am trying to use java script to change the content of the text box i am typing in now but thats the only place where my project fails. Thankyou for your help in advance.

Mottie (MVP) 4/26/2009 6:41 PM EST : RE: java script forum post
GuildPortal MVP
Posts: 3884
Zomgawsh Poster

Hi Bardockzen!

If you want to modify the contents of a text box with javascript or jQuery, change the "value" of it.
<textarea id="mytextbox" value=""/>
<input id="myinputbox" type="text">

document.getElementById('mytextbox').value = "this goes into the text box"
document.getElementById('myinputbox').value = "this goes into the input box"

$('#mytextbox').attr('value','this goes into the text box');
$('#myinputbox').attr('value','this goes into the input box');

Bardockzen (New Admin) 4/27/2009 8:51 AM EST : RE: java script forum post

Posts: 488
Fingers of Fury!

Thank you Mottie,

I appreciate your help. I had been doing pretty much that:

document.getElementById('RadEContentTextareactl00_ContentPlaceHolder1_ctl01_ctl00_txtEditor_txtEditor').value = "testing";
document.getElementById('RadEContentHiddenTextareactl00_ContentPlaceHolder1_ctl01_ctl00_txtEditor_txtEditor').value = "testing";

I had tested this out on my own simple form to make sure it worked. So my problem is that I don't completely understand how the guildportal forums works. There are only two text areas. One is labeled hidden and the other is not. In no combination of changing them in javascript do I see any change on screen or when I click to post. In the HTML form part if I add test directly into the text areas... If I add to the hidden one then I can see its text on the screen in the normal box you'd type into, but if i add to the non-hidden one the text I give it doesnt show up on the screen. And still I cannot change it with javascript.

The only two textareas in the form have the display property set to None.

Thankyou again Mottie I appreciate the help. =)


Mottie (MVP) 4/27/2009 9:16 AM EST : RE: java script forum post
GuildPortal MVP
Posts: 3884
Zomgawsh Poster

Hey Bardockzen!

Yeah, The Rad Editor that Gp uses has two windows, one for design mode and the other for HTML mode. The best way to add content to these windows is to use the function that GP uses, and that I used in my forum modules, is "emoticon()". The function has one variable passed to it which should contain the HTML you want to add.
emoticon('<b>Hello World</b>');

Admins Online
There are   members online.
So-and-so has logged on!