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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:23:37+00:00 2026-05-22T03:23:37+00:00

I have a webpage with a link on it. You click on the link,

  • 0

I have a webpage with a link on it. You click on the link, and it generates a table inside of a <div> with AJAX. Along with the table, when this <div> loads it calls some javascript into play so that the user can up/down vote on items in the table. My problem is, if the user clicks that same link to regenerate the <div>, it reloads a SECOND javascript, so that clicking the upvote arrow once actually runs +1 twice. I don’t know if you’ll need to see any specific code, or if there is some general way to fix this, but here is a clearer picture of my file setup.

mainpage.php with link called “show table”

voting.js

getTable.php

*Click on “show table” on main page, getTable.php is called.

*getTable.php calls voting.js so that user can vote on items

*Click “show table” again and ANOTHER voting.js is called

*Now clicking upvote arrow passes through twice the +1 code.

What can a guy do?

  • 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-22T03:23:37+00:00Added an answer on May 22, 2026 at 3:23 am

    You could include the voting.js on mainpage.php instead of getTable.php. It would be loaded once, but getTable could still use it.

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

Sidebar

Related Questions

I have a link on webpage. When I click this link a pop is
I have a web page which executes some javascript upon a link click. The
I have a webpage and if I click a link in the page, it
I have a working webpage which just displays external html files inside a div
I have a 940x520px JPG on my webpage inside of a DIV and I
I have an ASP.NET 2.0 (C#) webpage with a link that pulls a blob
I have the following line of code in a link on my webpage: <a
I have a webpage (say www.example.com/a.asp) .. I am having an iframe in this
I have a webpage on my site that displays a table, reloads the XML
I have a webpage at http://www.optiekmeulemeester.be/normal with sliding navigation. This happens with the following

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.