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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:58:50+00:00 2026-06-15T09:58:50+00:00

is it possible to do it in jQuery AJAX I have this div with

  • 0

is it possible to do it in jQuery AJAX

I have this div with the align center left or right

codes

<div class="dropdown" id="dropdown_one">
  <h3>Position of logo on the document</h3>
        <input type="hidden" name="c" value="cprof" />
        <input type="hidden" name="user_code" value="<?=$_GET['ucom'];?>" />
        <input type="hidden" name="com_code" value="<?=$_GET['ccom'];?>" />
        <?
        $get_position = SET_SQL( "SELECT * FROM jon_com_add WHERE user_code = '".$_GET['ucom']."' " );
        ?>
        <input type="hidden" name="position_id" value="<?=$get_position['a_id'];?>" />
        <input type="hidden" name="position_change" value="chg" />
        <label>Logo Position : </label>
          <p>
            <input name="logo_position" type="radio" value="left">
            Left

            <input name="logo_position" type="radio" value="center">
            Center

            <input name="logo_position" type="radio" value="right">
            Right
          </p>
        <label>Logo Width</label>
        <input type="text" name="logo_width" value="632 x 128">
        <p>Format logo: <span id="logo_size">632 × 128</span></p>                  
</div><!-- .dropdown_menu -->

<div class="company_name" align="<?=$set_position['add_position'];?>">
    <strong><?=$set['com_name'];?></strong><br />
    <?=$set['address'];?>
</div>

it was connected to the database.

now my jQuery

$(function(){
    $('input[name=logo_position]').click(function(e) {
        $('<img src="images/ajaxLoader.gif" id="loading" style="width:auto;" />').appendTo(".company_name");
        //Cancel the link behavior
        e.preventDefault();
        //Get the A tag
        var uc = $( 'input[name=usercode]' ).val();
        var cc = $( 'input[name=com_code]' ).val();
        var l_p = $( 'input[name=logo_position]' ).val();
        var aid = $( 'input[name=position_id]' ).val();
        var p_chg = $( 'input[name=position_change]' ).val();

        alert(aid);
        $.ajax({
            type:"GET",
            url:"forms/tem.php",
            data: {ucode: uc, ccode: cc, logo_p: l_p, a_id: aid, chg: p_chg},
            dataType: 'html',
            target: '.company_name',
            success: function(data){
                $(".company_name").find('img#loading').remove();
                $(".company_name").html(data);
            }
        })
    }); 

});

What im trying to do here is that when i click the radio button of logo_position
on the div class="company_name" align="left" will change. for example i click center it should be on the center.

is my jQuery Ajax wrong?
It doesn’t save on the database the only it save was left the first radio button. but when i click center the ajax will just read was just left.

Something like i was doing a live view. So when i change something it will also change the position the font and other thing when i just click…

is this possible to do on jquery?

  • 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-15T09:58:51+00:00Added an answer on June 15, 2026 at 9:58 am

    try this for alignment of div based onclick of radio buttons:

    $('input[name=logo_position]').click(function(e) {
    
    //code for changing align of div for respective button click
    $('.company_name').attr("align",$(this).val());
    
    });
    

    DEMO

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

Sidebar

Related Questions

Possible Duplicate: jQuery AJAX submit form I have a form on a page A,
Possible Duplicate: jQuery won't parse my JSON from AJAX query So I have parsed
Possible Duplicate: return AJAX callback return I have made a JQuery code using AJAX,
Possible Duplicate: jQuery: how do I animate a div rotation? I have a div
Possible Duplicate: jquery data selector I have several elements with class 'connection_name'. Each one
Possible Duplicate: jquery ajax return: undefined I have written the following code to check
Possible Duplicate: jQuery refresh if PHP file echo's 'true' I have the following div
I am somewhat new to jquery and have no idea if this is possible,
I have <select id=someid></select> I then click something and jquery.ajax generates new div and
Possible Duplicate: JQuery ajax cross domain I need to load content from another websites

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.