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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:14:31+00:00 2026-05-16T03:14:31+00:00

ajax code- … xmlhttp.open(GET,voting.php?qid=+qid+, uid=+uid+, type=+type,true); … is this the correct way to sent

  • 0

ajax code-

...  
xmlhttp.open("GET","voting.php?qid="+qid+", uid="+uid+", type="+type,true);
...

is this the correct way to sent three parameters??

html-

<td ><img src="images/up.jpeg" style="border:none;" title="Like" onclick="doVote($q_id,$_SESSION['UserId'],up)"></td>

when I am clicking on this image ajax script is not working.where should I fire onclick function???

  • 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-16T03:14:32+00:00Added an answer on May 16, 2026 at 3:14 am

    Three mistakes:

    • The correct notation for multiple GET parameters is separating them by & or, if used in HTML source, the correct HTML entity &amp;

      "voting.php?qid="+qid+"&amp;uid="+uid+"&amp;type="+type
      
    • To output a PHP variable, you need to wrap them around PHP tags:

      "doVote('<?php echo $q_id; ?>','<?php echo $_SESSION['UserId']; ?>',up)"
      
    • The third parameter to doVote(), “up”, needs to be enclosed in quotes if it’s meant to be a string:

       ..., 'up');
      

    other than that, the onclick event should fire. Check your error console for any errors.

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

Sidebar

Related Questions

I always see the code like this in the blogs: $.ajax({ type: POST, contentType:
i have this jQuery-AJAX code below and a form: <script type=text/javascript> $(document).ready(function () {
Why doesn't this simply jQuery ajax code not load pull.php into the div with
is there any way to get the radio button value by using ajax code.
I have this code that performs an ajax call and loads the results into
I have some jQuery code. I have called an Ajax function file, file.php, that
My AJAX code is passing QueryString to a PHP file. The QueryString looks like
I am writing jquery ajax code to call wcf service. In this case WCf
This is my ajax code, For example URL 1 : www.text1.com and URL 2
I have ajax code for asp.net (non-mvc) to call to a webMethod to get

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.