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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:12:32+00:00 2026-06-14T11:12:32+00:00

I have a page where file upload inputs will be customizable via a backend,

  • 0

I have a page where file upload inputs will be customizable via a backend, so my call to uploadify is on a class, like this:

$('.uploadify_upload').uploadify({
            'uploader'  : '../js/uploadify/uploadify.swf',
            'script'    : '../js/uploadify/uploadify.php',
            'cancelImg' : '../js/uploadify/cancel.png',
            'checkScript' : '../js/uploadify/check.php',
            'folder'    : '../img/uploads/temp/<?= $upload_temp_folder ?>/',
            'auto'      : true,
            'multi'     : false,
            'buttonText': 'Upload image',
            onComplete: function (event, queueID, fileObj, response, data) {
                $('#file_name').text(fileObj.name);
            }
        });

The html looks like:

<div class="image_preview" id="preview_<?= $field['field_name_in_channel_data'] ?>">
                                    <input type="file" class="uploadify_upload" id="upload_<?= $field['field_name_in_channel_data'] ?>" name="upload_<?= $field['field_name_in_channel_data'] ?>"/>
                                </div>

I want to be able to obtain the div id (preview__..) or input id(upload_...) inside my uploadify function. This way, I can let the backend know for which field the upload was, in order to appropriately write in the DB later. I tried

'onSelect'    : function(event,data) {
                    var div_id = $(this).parent().attr('id');
                    alert(div_id);

                },

among others but without success.. What can I do?

  • 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-14T11:12:33+00:00Added an answer on June 14, 2026 at 11:12 am

    This is the answer:

    'onSelect'    : function(event,ID,fileObj) {
        var elem_id = $(event.target).attr("id"); //here you get the id of the object.
        $("#"+elem_id).uploadifySettings('scriptData',{'formID':elem_id})
    },
    

    From Uploadify: Passing a form's ID as a parameter with scriptData

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

Sidebar

Related Questions

In the web page, I have file upload widget. I need to show this
I have a file upload control <input id=File1 type=file /> in my page... How
I have a page where the user can dynamically add file upload boxes. Adding
I have a page where a user can upload a file along with some
I'm trying to have a user upload a file and then my function will
I want to file Upload The code is like this : int iTotal =
I have an aspx website and I'd like to upload a file to it.
I have an ASP.NET MVC page with multiple file uploads. After a failed post,
I have a very simple page with which a user uploads a file. Using
I have an aspx page with multiple FileUpload controls and one Upload button. In

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.