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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:40:09+00:00 2026-05-16T17:40:09+00:00

here is my upload function function ajaxFileUpload() { $(#loading) .ajaxStart(function () { $(this).html(‘loading…’); $(‘#buttonUpload’).hide();

  • 0

here is my upload function

function ajaxFileUpload() {

    $("#loading")
        .ajaxStart(function () {
        $(this).html('loading...');
        $('#buttonUpload').hide();
    })
        .ajaxComplete(function () {
        $(this).hide();
        $('#buttonUpload').show();
    });

    $.ajaxFileUpload({
        url: '_card_upload.php',
        secureuri: false,
        fileElementId: 'fileToUpload',
        dataType: 'json',
        success: function (data, status) {
            alert(data);
        },
        error: function (data, status, e) {
            alert(e);
        }
    });

    return false;

}    

above function allow user to upload one file to my server, but I need user to specific that this image is public image or not? by add some checkbox

<input type="checkbox" id="public_card" name="public_card" align="absmiddle" />

in upload form

the problem is i dont know how to send a value in checkbox to url:'_card_upload.php'
at the same time.

how do i send it?

  • 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-16T17:40:10+00:00Added an answer on May 16, 2026 at 5:40 pm

    Try adding data parameter to the ajaxFileUpload call:

    $.ajaxFileUpload({
        url: '_card_upload.php',
        data: {
            public_card: $('#public_card')[0].checked ? 'yes' : 'no'
        },
        secureuri: false,
        fileElementId: 'fileToUpload',
        dataType: 'json',
        success: function (data, status) {
            alert(data);
        },
        error: function (data, status, e) {
            alert(e);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this ajax file upload script here http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ Which is supposed to add
I need a little help here: I get a file from an HTML upload
I have this html form <form action=upload/ id=upload name=upload> // other form data </form>
$(#photoAlbum).on(mouseenter, .imagecontainer, function () { $(this).find('.controlbar').show(slide, { direction: down }, 1000); }).on(mouseleave, .imagecontainer, function
I'm using a form as described here to upload a file to a Youtube
I have a problem here im trying to upload a file first time it
Here is my prob in Brief. I know how to upload a file to
I'm using the jQuery multi-file upload plugin found here: http://www.fyneworks.com/jquery/multiple-file-upload/ I don't see in
i want to upload two files. here is the script <? ini_set('memory_limit', 400M); ini_set('file_uploads',
I want to upload a csv file into a sql table. Here is my

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.