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 6773043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:37:12+00:00 2026-05-26T15:37:12+00:00

I have a web page with a tiny space for users to submit some

  • 0

I have a web page with a tiny space for users to submit some comments.
just one line of text and a button.
if they use it, after pressing the button I have a bit of javascript which disables the button and thanks them.

The next bit is how to send their comment to the server.

The way I have done it is the following:

in the javascript which handles the ‘submit’ I create a new javascript like this:

var script = document.createElement('script');
script.src = 'usercomment.js?'+commentValue;
document.body.appendChild(script); 

I don’t have any usercomment.js script so the call fails silently.
However the advantage is that I get a call to the server which is logged and then I can read all of the comments.

I am happy with this solution but I was wondering if there is a better way to achieve the same thing. Somehow it seems quite convoluted and a bit of hack.

so my question is what’s the standard way to record something as simple as an action from the browser to the server ?

p.s.
I am not allowed to modify the server side. So I can only rely on its logs to retrieve this type of information.

p.s.
please don’t suggest an event in google analytics that would be breaching their legals.

  • 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-26T15:37:13+00:00Added an answer on May 26, 2026 at 3:37 pm

    Looks like my solution is plausible:
    That is

    var script = document.createElement('script');
    script.src = 'usercomment.js?'+commentValue;
    document.body.appendChild(script); 
    

    I will accept that. If somebody has a better way please add it up and I will vote it.

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

Sidebar

Related Questions

I have a web page with 3 forms on it. Not nested, just one
i have an tiny editor web page where my users can use this editor
I have a web page with one button and one div. If you click
I have a web page that displays a long line graph inside a div
I have this web page that works fine in one webhost but not in
I have a web page where users upload&watch videos. Last week I asked what
I have web page that looks like this: Image on the left - text
I have Web page in share-point 2010 ,its has two web parts one for
I have a web page with HTML as below: <head> <script type="text/javascript" src="jquery-1.5.1.js"></script> <style
I have one web page MyWebPage.aspx which while loading has to show data from

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.