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

  • Home
  • SEARCH
  • 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 9277843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:12:39+00:00 2026-06-18T17:12:39+00:00

I have recently created a website that allows users to upload images and then

  • 0

I have recently created a website that allows users to upload images and then let that user and other users of the website rate the images from 1-10. Everything is working correctly. When the user rates an image this is saved and then another random box is generated and presented to the user. This works by adding the new box id (randomly generated) to the query string. This allows for the user to navigate back to the images that they have just seen.

My problem comes with updating the page. Currently my code processes the rating and saves it within the database then redirects the user to the same page where I have some code to find a random image id from the database and then using that id redirects them again to the same page with the id in the querystring. This works fine however i would like to make it so that only the image and the images information (image name rating etc..) are updated and the rest of the HTML (Header, Navigation, Side bars, Footer, etc…) is not.

From my understanding you can upload part of a website using JQuery/Javascrip/AJAX? However this would not allow the user to redirect back to the previously viewed image?

If you would like any more information please ask.

EDIT

I have took some of the information on board and have altered my code to use hash values my code is below:

HTML

<img id="design" alt="" width="300" height="300"  />
<input type="button" id="GetImage" value="Get Image" />

JQUERY

$(document).ready(function(){

    $("#GetImage").click(function() {

        $.ajax({ //Make the Ajax Request
                 type: "POST",
                 url: "testimagelook.php", //file name
                 success: function(server_response){
                    var id = server_response;
                    document.location.hash = id;
                    $('#design').attr('src','img/boxes/'+id+'.png');
                 }
        });
    });

});

The php file testimagelook.php connects to the database and brings back a random id of one of my images. This code works fine for showing the image and saving the id of the image in the hash of the URL allowing me to preserve the users history of images. However I am unsure on how I would retrieve the previous hash value and reload the image with the correct id when the user clicks the back button. Any ideas?

  • 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-06-18T17:12:40+00:00Added an answer on June 18, 2026 at 5:12 pm

    Yes you can achieve this using jQuery AJAX method
    For your simplicity use this

    $.post('pageURL.php', {data1: value1}, function(result) {
      // Update the portion of the page you wish to
    
    });  
    

    UPDATED

    $.ajax({
      type: "POST",
      url: "PageName.aspx/MethodName",
      data: "{}",
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function(data) {
        // Now receive the data (information) in the form of JSON
        // In this JSON you can pass the imageID or anything to proceed your logic
        // and update the portion of the page you wish to
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently created a directory for a customer of mine. The website is
I have recently just created Java project using Eclipse that requires 2 JAR files
I have recently created a student organization website (i.e. www-sc.xxx.edu/studentorganizations/ourorganization). Our college does not
I have a belonging model that allows user to post objects to be sold
I recently created a website that has a voting/upvoting feature that uses jQuery's AJAX
I have recently created a website for a client. He has asked repeatedly if
So I have an ASP.NET MVC 3 website that allows people to advertise certain
I have recently created a new dropdown menu for an existing website purely with
I have recently created a HTML5 canvas animation (also using Processing.js). The problem is
I have recently created an application for wp7. Now i am ready submit an

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.