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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:52:52+00:00 2026-05-28T14:52:52+00:00

I have a website where I want the following page to function – it

  • 0

I have a website where I want the following page to function – it currently works fine on a full page refresh (since each div is populated from a database) – but I’m starting to build in AJAX to update the database behind the page without the browser leaving the page. The following image shows what I want to achieve. Refreshing the whole page can be a bit slow due to the header information and item information might have a lot of images etc.

https://i.stack.imgur.com/eo9p3.jpg

I can get it working OK by having my form submit button write out the results in each div area, however when a user returns to the page I want it to show the latest version of the page. Is there a way to change what my submit button on the form does (i.e. when pressed – refresh the “guess” and “guess_info” div areas of the webpage?

My AJAX/Jquery for the form is:

<script type="text/javascript">
$(document).ready(function(){
    $("#myform").validate({
        debug: false,
        rules: {
            guess: {
                min: 0,
                number: true
            }
        },
        messages: {
            guess: "Please enter a valid guess.",
        },
        submitHandler: function(form) {
            // do other stuff for a valid form
            $.post('process.php', $("#myform").serialize(), function(data) {
                $('#results').html(data);
            });
        }
    });
});
</script>

process.php just takes the form inputs (e.g. item_id, user_id, guess), and updates the database for new information.

I’m also having difficulties with the CSS side of things, my header and footer are generated by wordpress, however all the dividers detailed below are my own, (which i put inside the “content” divider.

I have managed to split the “content” into 3 columns, but I’m struggling to split my middle column into the divisions shown..

So my “content” divider is 900px, so I have the “middle” as 500px and each column as 200px.

So now I’m looking to divide up my 500px column into 3 rows (which can be as long as needed), first row one column 500px, second row 2 columns, say 150px (the thumbnail is 100px wide) and 350px, the final row would be split, say 100px, 100px, 300px. Can anyone advise me on this? I’ve tried following a lot of CSS tutorials, but I seem to struggle getting them to sit on top of each other!! 🙁

  • 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-28T14:52:52+00:00Added an answer on May 28, 2026 at 2:52 pm

    Regarding the submit button there are some ways of disabling the default of it.

    The first one is

    <form action="whatever" method="whatever" onsubmit="return myJSFunction();return false;">
    

    Or, for keeping your code cleaner you can do:

    <form action="whatever" method="whatever" onsubmit="return myJSFunction();">
    

    For the last one you will need to add in your myJSFunction the following code at the start of it:

    if(!event) var event = window.event //to prevent browser problems
    event.preventDefault();
    

    Remember that if everything works in your js function you need to return false. If you return true it might trigger the default call of your submit button.
    Once you did this you should call your AJAX request and write/override your html in js.

    Regarding the css I don’t see why it doesn’t work so I will give you a default solution (the following divs should be placed in your “middle” container):

    <div id="item_info" style="width:500px; height:50px;background-color:green"></div>
    <div id="description" style="float:right;width:350px;height:100px;background-color:blue"></div>
    <div id="thumbnail" style="width:150px;height:100px;background-color:red"></div>
    <div id="guess_info" style="float:right;width:300px;height:100px;background-color:black"></div>
    <div id="item2" style="float:left;width:100px;height:100px;background-color:yellow"></div>
    <div id="guess" style="float:left;width:100px;height:100px;background-color:pink"></div>
    

    I tested this in my editor and it seems to work. Don’t bother the colors I used them to get some visibility.
    Sorry for the CSS being inlined but just copy the style attribute and put in in your .css page.

    If you want each of your rows (the ones that are splitted) to have the same height as their neighbourgs you’ll need to change the css a little bit and use some different tricks (but you will have to chose which one could have the biggest height).

    Hope this helped.

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

Sidebar

Related Questions

I am making a website and I want to use the following design: Each
I am creating the contacts page of a website and want the div element
I want to have a feature for my website which can print the page
Hi people i want the functionality of the following website page in my site
I have a website I want to regexp on, say http://www.ru.wikipedia.org/wiki/perl . The site
I have a photo website and i want to support tags as my original
I want my website to have a checkbox that users can click so that
I have a website project that I want to build using CruiseControl.net. On one
I have a website built with ASP.NET (3.5) and want add some level of
I have a website with friendly urls. I want all url´s that end with

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.