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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:27:51+00:00 2026-06-09T13:27:51+00:00

Okay.. this is the file lo_add.php: <div class=rowElem> <label>Item <? echo $i ?>:</label> <div

  • 0

Okay.. this is the file lo_add.php:

<div class="rowElem">
    <label>Item <? echo $i ?>:</label>
    <div class="formRight searchDrop">
        <select name="lo_item[]" class="chzn-select" data-placeholder="Choose an Item">
            <option value=""></option>
            <? $item_query = mysql_query("select id,code,title,price from items where domain_id='$domain_id' order by code");
            while ($items = mysql_fetch_array($item_query)) { ?>
                <option value="<? echo $items["id"] ?>"><? echo $items["code"]." - ".$items["title"]." - RM".$items["price"] ?></option>
            <? } ?>
        </select>
    </div>
    <label>Delivery Address :</label>
    <div class="formRight searchDrop">
        <select name="lo_site[]" class="chzn-select" data-placeholder="Choose a Delivery Address">
            <option value=""></option>
                <? $site_query = mysql_query("select id,name from sites where domain_id='$domain_id' order by name");
                while ($sites = mysql_fetch_array($site_query)) { ?>
                    <option value="<? echo $sites["id"] ?>"><? echo $sites["name"] ?></option>
                <? } ?>
        </select>
    </div>
    <div class="fix"></div>
    <label>Quantity:<span class="req">*</span></label>
    <div class="formRight onlyNums">
        <input type="text" name="lo_quantity[]" id="lo_quantity[]"/>
    </div>
    <div class="fix"></div>
</div>

And this is the html file that calls the css and what have you in the beginning:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Mecacom Technologies&reg; Maintenance System &copy; 2012</title>

<link href="/css/main.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Cuprum' rel='stylesheet' type='text/css' />

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.validate.js"></script>
<script type="text/javascript">
$(document).ready(function() {
  $('#addElement').click(function() {
    var data = '';
    $.get('/ajax/lo_add.php', data, function(response){
      $('#hello').append(response);
    });
  });
});
</script>

</head>
<body>
    <div class="content" id="container">
        <div class="title"><h5>Record New Local Order</h5></div>

        <form action="<? echo $PHP_SELF ?>?add=1" id="valid" class="mainForm" method="post" enctype="multipart/form-data">
            <fieldset>
                <div class="widget">
                    <div class="head"><h5 class="iLocked2">New Local Order Credentials</h5></div>

                    <div class="rowElem noborder">
                        <label>Order ID:<span class="req">*</span></label>
                        <div class="formRight">
                            <input type="text" class="validate[required]" name="order_id" id="order_id"/>
                        </div>
                        <div class="fix"></div>
                   </div>

                    <div class="rowElem noborder">
                        <label>Order Date:<span class="req">*</span></label>
                        <div class="formRight">
                            <input type="text" name="order_date" class="datepicker validate[required]" />
                        </div>
                        <div class="fix"></div>
                    </div>
                    <div id="hello"></div>

                    <div class="fix"></div>
                    <a href="#" id="addElement">Click To Append More Item</a>
                    <input type="submit" value="Next" class="greyishBtn submitForm" />
                    <div class="fix"><input type="hidden" name="addnow" value="1" /></div>
                </div>
            </fieldset>

        </form>
    </div>
</body>
</html>

sigh .. quite a handful … How do you think that the css aren’t being rendered correctly after the jquery append?

  • 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-09T13:27:53+00:00Added an answer on June 9, 2026 at 1:27 pm

    I can see from your live test page that you are using Chosen to process the dropdowns and jQuery validation plugin to validate the quantity field.

    The first thing is to make sure you call chosen() on the newly created dropdowns. This has to be called for new elements, because Chosen doesn’t only rely on CSS, but changes the entire HTML structure of the dropdowns. So add this line, following your append,

    $(".chzn-select").chosen()
    

    Second is to make sure you validate the newly created quantity textfields by calling validate() on them, or re-calling whatever javascript you called to initialize the validate plugin.

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

Sidebar

Related Questions

Okay, so I have this CSV file of products and all the products have
My OS environment is linux. I have a php file in this folder -
Okay this one's pretty straightforward. I'm creating a checkbox in my Page.xaml.cs file, and
Okay, I'm trying to load a file in Java using this code: String file
Okay this question is very simple: I have a facebook page, and a website.
Okay this is definitely a n00b question but here goes. The way I understand
Okay this is definitley an easy question and a stupid one but since I
Okay this may be a simple question but I have yet to come with
Okay this is my 4th question today on Scheme, still pretty new to Scheme,
Okay this is werid, i keep getting the error, randomly. ValueError: matrix must be

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.