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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:45:07+00:00 2026-05-25T15:45:07+00:00

I can’t tell if I’m misunderstanding the syntax or if I’m not understanding the

  • 0

I can’t tell if I’m misunderstanding the syntax or if I’m not understanding the concept. I want to take a javascript variable and concatenate it into a URL parameter inside a jQuery function. The variable is reassigned by another upload script’s jQuery function.

<script type="text/javascript">
var trackid = 12;


jQuery(document).ready(function() { 

    $('#mainftp2').uploadify({
    'uploader'  : 'js/uploadifymultiple/uploadify.swf',
    'script'    : 'js/uploadifymultiple/uploadify.php?<?php echo urlencode("songid=" . $songid . "&userid=" . $userid . "&trackid=);?>'+trackid+'"',
    'multi'         : true,
    'auto'          : true,
    'height'        :   '32', //height of your browse button file
    'width'         :   '250', //width of your browse button file
    'sizeLimit' :   '51200000',  //remove this to set no limit on upload size
    'simUploadLimit' : '3', //remove this to set no limit on simultaneous uploads
    'buttonImg' : 'img/browse.png',
    'cancelImg' : 'img/cancel.png',
        'folder'    : '<?php echo $multiFolder?>', //folder to save uploads to
        onProgress: function() {
          $('#loader2').show();
        },
        onComplete: function(event, queueID, fileObj, response, data) {
          $('#loader2').hide();
          $('#allfiles2').load(location.href+" #allfiles2>*","");
          $('#filesUploaded2').attr('value', ''+response+'');

          //location.reload(); //uncomment this line if youw ant to refresh the whole page instead of just the #allfiles div
        }   
    });

    $('ul li:odd').addClass('odd');

}); 
    </script>
  • 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-25T15:45:08+00:00Added an answer on May 25, 2026 at 3:45 pm

    Check the location of your double-quotes, you’re missing one inside the PHP fragment, and have an extra one at the end of the URL.

    script: 'js/uploadifymultiple/uploadify.php?<?php echo urlencode("songid=" . $songid . "&userid=" . $userid . "&trackid=);?>'+trackid+'"',
    

    First we’ll focus on the part we know is wrong:

    'uploadify.php?<?php echo urlencode("songid=" . $songid . "&userid=" . $userid . "&trackid=);?>'+trackid+'"',
    

    The question mark is after the .php part. songid and userid seem fine.

    'uploadify.php?<?php echo urlencode("&trackid=);?>'+trackid+'"',
    

    Oh crap, where’s the closing quote in our call to urlencode?

    'uploadify.php?<?php echo urlencode("&trackid=");?>'+trackid+'"',
    

    So now we have a string that’s part JavaScript, part PHP, and it’s right.

    'uploadify.php?etc&trackid=' + trackid + '"',
    

    But URLs don’t have trailing quotes, so there must be an extra.

    'uploadify.php?etc&trackid=' + trackid,
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me the exact syntax for NOT IN condition in SQL on
Can you guys help me understand a concept real quick, I'm having trouble understanding
Can any one tell, how to get the result of LINQ query contains group
Can anybody shed some light on getDay() in Javascript please. Here datepicker is textbox
Can anybody tell what is the best(easy) way to sort the following string 'index'
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can someone tell me how does the imdb app manage to play trailers on
Can any one tell me clearly why ? Reading is simple in ArrayList,( we
Can I use QT Creator for C (not C++) non-GUI programming on Linux? Or
Can anyone tell me why this doesn't work? <?php $lang = $_get[lang]; if (($lang

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.