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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:35:31+00:00 2026-06-14T12:35:31+00:00

I built a form using jquery. As soon as I use $(‘#Form’).append(”); the newly

  • 0

I built a form using jquery.
As soon as I use $(‘#Form’).append(”); the newly added elements aren’t themed / don’t look the same way as I they would, when I insert them using PHP.

To make it clear:

php added: Jquery Mobile Style

Jquery dynamicly added: Regular Form style.

How can I buy pass this?

======ADDON======
Ok, here’s the code

this functions adds the block:

function addItem(section){
    if(itemcounter[section]>1){
        $('table#deductionItemContent'+section+' tr:last').after('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'1"></tr>');
        $('table#deductionItemContent'+section+' tr:last').after('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'2"></tr>');
        $('table#deductionItemContent'+section+' tr:last').after('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'3"></tr>');
    }else{
        $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'1"></tr>');
        $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'2"></tr>');
        $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'3"></tr>');
    }

    $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'1"></tr>');
    $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'2"></tr>');
    $('#deductionItemContent'+section).append('<tr id="deductionItemContentRow'+section+'_'+itemcounter[section]+'3"></tr>');
    $('#deductionItemContentRow'+section+'_'+itemcounter[section]+'1').append('<td id="deductionItemContent'+section+'El'+itemcounter[section]+'"></td>');
    $('#deductionItemContent'+section+'El'+itemcounter[section]).append('<div class="type-select"><label for="nu_item_'+section+'_'+itemcounter[section]+'">{/literal}{translate text="application_reports_plate5_item"}{literal}'+itemcounter[section]+'</label><select onchange="updateForm('+section+');" id="nu_item_'+section+'_'+itemcounter[section]+'" name="nu_item_'+section+'_'+itemcounter[section]+'"></select></div>')
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="main">{/literal}{translate text="application_reports_plate5_item_main"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="aux">{/literal}{translate text="application_reports_plate5_item_aux"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="jib">{/literal}{translate text="application_reports_plate5_jib"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="rope">{/literal}{translate text="application_reports_plate5_rope"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="underhookdevice">{/literal}{translate text="application_reports_plate5_underhookdevice"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="rigging">{/literal}{translate text="application_reports_plate5_rigging"}{literal}</option>');
    $('#nu_item_'+section+'_'+itemcounter[section]).append('<option value="none">{/literal}{translate text="application_reports_plate5_none"}{literal}</option>');
    $('#deductionItemContentRow'+section+'_'+itemcounter[section]+'2').append('<td id="deductionItemContent'+section+'E2'+itemcounter[section]+'"></td>');
    $('#deductionItemContent'+section+'E2'+itemcounter[section]).append('<div class="type-select"><label for="nu_status_'+section+'_'+itemcounter[section]+'">{/literal}{translate text="application_reports_plate5_itemstatus"}{literal} '+'</label><select onchange="updateForm('+section+');" id="nu_status_'+section+'_'+itemcounter[section]+'" name="nu_status_'+section+'_'+itemcounter[section]+'"></select></div>')
    $('#nu_status_'+section+'_'+itemcounter[section]).append('<option value="stowed">{/literal}{translate text="application_reports_plate5_item_stowed"}{literal}</option>');
    $('#nu_status_'+section+'_'+itemcounter[section]).append('<option value="erected">{/literal}{translate text="application_reports_plate5_item_erected"}{literal}</option>');
    $('#nu_status_'+section+'_'+itemcounter[section]).append('<option value="inservice">{/literal}{translate text="application_reports_plate5_item_inservice"}{literal}</option>');
    $('#nu_status_'+section+'_'+itemcounter[section]).append('<option value="none">{/literal}{translate text="application_reports_plate5_none"}{literal}</option>');
    $('#deductionItemContentRow'+section+'_'+itemcounter[section]+'3').append('<td id="deductionItemContent'+section+'E3'+itemcounter[section]+'"></td>');
    $('#deductionItemContent'+section+'E3'+itemcounter[section]).append('<div class="type-text"><label for="nu_deduction_'+section+'_'+itemcounter[section]+'">{/literal}{translate text="application_reports_plate5_deduction"}{literal}</label><input onkeyup="updateForm('+section+');" type="text" length="6" maxlength="6" id="nu_deduction_'+section+'_'+itemcounter[section]+'" name="nu_deduction_'+section+'_'+itemcounter[section]+'" /></div>');
    /**
     * Add Data to page 3
     */
    $('#weightMasterDataTable'+section).append('<tr id="weightMasterDataTableRow'+section+itemcounter[section]+'"></tr>');
    $('#weightMasterDataTableRow'+section+itemcounter[section]).append('<td id="weightMasterDataTableContent'+section+itemcounter[section]+'1"></td>');
    $('#weightMasterDataTableRow'+section+itemcounter[section]).append('<td id="weightMasterDataTableContent'+section+itemcounter[section]+'2"></td>');
    $('#weightMasterDataTableRow'+section+itemcounter[section]).append('<td id="weightMasterDataTableContent'+section+itemcounter[section]+'3">0</td>');
    $('#weightMasterDataTableRow'+section+itemcounter[section]).append('<td id="weightMasterDataTableContent'+section+itemcounter[section]+'4">0</td>');
    $('#weightMasterDataTableRow'+section+itemcounter[section]).append('<td id="weightMasterDataTableContent'+section+itemcounter[section]+'5">0</td>');
    /**
     * Add Radio Buttons
     */
    $('#weightMasterDataButtons'+section).append('<input type="radio" name="nu_masterbutton_'+section+'" id="nu_masterbutton_'+section+'_'+itemcounter[section]+'" value="'+itemcounter[section]+'" /><label for="nu_masterbutton_'+section+'_'+itemcounter[section]+'" >&nbsp;&nbsp;{/literal}{translate text="application_reports_plate5_item"}{literal} '+itemcounter[section]+'</label>');
    $('#weightMasterDataButtons'+section).append('<br />');
    /**
     * in the end update counter
     */
    itemcounter[section]++;
}

the HTML code that belongs to this looks like this:

<tr>
    <td>
        <div id="tabs-2">
            <h4>deductions for loadtest 1</h4>
            <div id="deductions1">
                <a onclick="addItem(1);">+ Add item to deduction</a>
                <table id="deductionMaster1" class="tablecloth" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr id="deductionMasterRow11">
                            <td>
                                <table id="deductionItemContent1" class="tablecloth" width="100%" cellspacing="0" cellpadding="0" border="0"></table>
                            </td>
                        </tr>
                        <tr id="deductionMasterRow12">
                            <td id="deductionMasterElement12">
                            total:
                            <b id="deductionValue1">0</b>
                            lbs
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </td>
</tr>

This is only a small part of the form, because everything reacts the same way.
I guess I need to tell the browser somewho that the inserted form elements are to be themed the jquery style.
But I don’t know how to.

  • 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-14T12:35:32+00:00Added an answer on June 14, 2026 at 12:35 pm

    Try adding

    $('select').selectmenu();
    

    at the end of the jQuery script. That should deal with the <select> tags.
    If that is successful, refer to jquery mobile’s documentation for information on how to deal with any other form element you want on you page.

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

Sidebar

Related Questions

I built contact form in aspx 3.5 and I'm using jQuery to send it
I've built a Jquery Mobile Android App using Phonegap which contains a form with
I've built a form using HTML and jQuery. The form is designed to generate
I am using jQuery to edit my form which is built in Symfony .
I am having problems getting validation to work for a form built using Zend_Form.
i have a form that is dynamically built. so the number of form elements
I have just built a custom autocomplete component using jquery. My problem is that
I am writing a form wizard using JQuery's accordion module . The problem is
I am developing an application whose front-end is built using jquery mobile. This application
I have a complicated jQuery form and I want to disable several form elements

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.