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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:05:58+00:00 2026-05-13T14:05:58+00:00

I have a page that allows users to edit a record from the DB.

  • 0

I have a page that allows users to edit a record from the DB. Simple.

The html source looks like this:

<form id="prize_modify_form" enctype="multipart/form-data" action="" method="POST" accept-charset="utf-8"> 
   <p><label for="header">Header</label><input type="text" name="header" value="More Tvs!" id="header"></p> 
   <p><label for="description">Description</label><input type="text" name="description" value="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." id="description"></p> 
   <p><label for="short_description">Short Description</label><input type="text" name="short_description" value="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure d" id="short_description"></p> 
   <p><label for="expiration_date">Expiration Date</label><input type="text" name="expiration_date" value="0000-00-00" id="expiration_date"></p> 
   <p><label for="image">Image</label> 
         <a href="#" id="change_image_link">Change Image</a> 
      <input type="hidden" name="photo" value="png8.png" id="photo"> 
   </p> 
   <p><input type="submit" value="Save"></p> 
</form> 

<link rel="stylesheet" href="../../css/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" title="no title" charset="utf-8"> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script> 
<script src="../../js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script> 
<script src="../../js/additional-methods.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript" charset="utf-8"> 
   $(document).ready(function(){
      alert('inside');

    // Set up the validations
    $('#prize_modify_form').validate({
        rules: {
            header: {
                required: true,
                minlength: 2
            },
            description: {
                required: true,
                minlength: 2
            },
            short_description: {
                required: true,
                minlength: 2,
                maxlengh: 250
            }
            image: {
                required: true,
                accept: "jpg|jpeg|gif|png"
            },
            expiration_date: {
                required: true,
                dateITA: true
            }
        }
    });
    // Add the date picker to expiration date
    $('#expiration_date').datepicker();

    // Redirect the page and create a popup for the change image link
    $('#change_image_link').click(function(){
        $id = $('#id').attr('value');
        $prize_id = $("#prize_id").attr('value');

        window.open("image.upload.php?id=" + $id,"Upload Image",
        "menubar=no,width=430,height=100,toolbar=no");
    });
   });
</script>

Inside of my jQuery code, nothing ever gets run.
The biggest problem is that this page is pretty much a copy-paste of another page…which works perfectly.
I can’t quite see where the problem is.

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

    At least 1 problem is the missing comma here:

                maxlengh: 250
            }
            image: {
    

    should be:

                maxlengh: 250
            },
            image: {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.