Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 888373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:23:12+00:00 2026-05-15T13:23:12+00:00

I’m completely new to Javascript and Greasemonkey, so feel free to correct me if

  • 0

I’m completely new to Javascript and Greasemonkey, so feel free to correct me if I’m doing this inefficiently or incorrectly.

In this forum that I post in, clicking the “reply” button brings up a new window with just text form to post in. I want to create a greasemonkey script that adds the script for the reply form onto the actual thread page.

So the program goes through the table which stores the discussion, and appends a childNode to the end of the table. I want that childNode to be the form that is created in the reply page.

Here’s the skeleton of my script:

// ==UserScript== 
// @name QuickEeply 
// @namespace  http://userscripts.org/users/181447 
// @description    Adds "QuickReply" forms to TCC discussion posts 
// @include        * 
// ==/UserScript==


var tables = document.getElementsByTagName("td");  


for (var i = 0; i < tables.length; i++) {

 if (tables[i].className == "content") 
 {    var editTable = tables[i];
 } 

}

editTable.appendChild = ''

Here’s the script I copied and pasted from the “reply page”

<form method="POST" action="http://dl.tccd.edu/index.php/classforums/posts/event=saveReply">
 <input type="hidden" name="subject" size="45" id="txt_subject" maxlength="200" value="">
 <br>
 Message:<br>
 <textarea rows="20" style="width:70%;" name="message" id="message"></textarea>

 <br>
 <br>
 <input type="submit" id="submit_post" value="Post Reply">
 <input type="hidden" name="post_id" value="1010815">
 <input type="hidden" name="thread_id" value="1010815">
</form>

So how can I go about creating a script that finds the thread_id of the current page, and creates a replybox for each page on the page where the thread is actually located.

Edit: Here is the Source Code-

http://pastebin.com/2UaUVGJA (the main discussion page)
http://pastebin.com/hAx2SPUu (the reply page)

EDIT 2:

I've used Brock's template, and it's not working.  What do I need to do to correct it?

// ==UserScript==
// @name           Quick_ReplyTest
// @namespace      http://userscripts.org/users/181447
// @description    Inserts QuickReply
// @include        *
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==


/* Optional:
window.addEventListener ("load", Greasemonkey_main, false);
*/

$(document).ready (Greasemonkey_main);


function Greasemonkey_main ()
{
    /*--- Get the first node inside the id="main" span (Google.com)
        If that's not there, then get the first node of the html body.
    */
    var TargetNode  = $("a[href*='event=reply/post']");
    if (!TargetNode)
        TargetNode  = $("body *:first");


  $(TargetNode).after
    (
        "<form method="POST" action="http://dl.tccd.edu/index.php/classforums/posts/event=saveReply">
        + "<input type="hidden" name="subject" size="45" id="txt_subject" maxlength="200" value="">"
        + "<br> Message:<br>"
        + "<textarea rows="20" style="width:70%;" name="message" id="message"></textarea>"
        + "<br> <br>"
        + "<input type="submit" id="submit_post" value="Post Reply">"
        + "<input type="hidden" name="post_id" value="1010815">"
        +"<input type="hidden" name="thread_id" value="1010815">"
        +"</form>"
    );
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:23:13+00:00Added an answer on May 15, 2026 at 1:23 pm

    Go to this answer and get the Greasemonkey template.

    It shows you how to insert HTML, like your form, at specific node(s).

    Replace that sample’s table HTML with your form HTML. Then your TargetNode will be something like $("a[href*='event=reply/post']") — based on the referenced page. Note that this should insert the form at every post entry.

    Warning: the form will not necessarily be where you want it, and we haven’t synced the form to each post yet.

    Do what you can, but those next stages should be asked in a new question after you get the first part working and your accept-rate up. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.