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

  • Home
  • SEARCH
  • 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 6025143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:15:32+00:00 2026-05-23T04:15:32+00:00

I have a script that has the following content: <?php if(isset($_POST[‘sent-urls’]) || $_POST[‘sent-urls’] ==

  • 0

I have a script that has the following content:

    <?php
if(isset($_POST['sent-urls']) || $_POST['sent-urls'] == true)
{
    session_start();
    error_reporting(E_ALL);
    //ini_set('display_errors', 'Off');

    include('includes/functions.php');

    $url = str_replace('www.', '', url());
    $images = explode("\n", $_POST['remote-urls']);

    if(sizeof($images) > 30) {
      $url_i = $url_t = $direct = 'You have added mroe than 30 links';
    }

    $links = array();
    foreach($images as $image) 
    {
      $srcfile = (isset($image)) ? trim($image) : '';
      $extension = remoteEx($srcfile);
      $filename = rand(124588, 543354) . '.' . remoteEx($image);
      $file = remote_filesize($srcfile);

      if ($file <= 3000000 && !empty($srcfile) && $extension == 'png' || $extension == 'peg' || $extension == 'jpg' || $extension == 'gif' || $extension == 'bmp')
      {
        $copied = copy($srcfile, 'i/' . $filename);

        $direct = $url . 'i/' . $filename;
        $url_i = $url . 'i/' . $filename . "\n";

        if ($copied)
        {
            // make_thumb($direct, 't/' . $filename, 150, remoteEx($direct));   
            generate_thumbnail($image, $filename, 110, 110, true, 'file', false, false, '');
            $url_t = $url . 't/' . $filename . "\n";
        }
      }
      else if (empty($srcfile))
      {
        $url_i = $url_t = $direct = 'No links added';  
      }
      else if ($file > 3000000)
      {
        $url_i = $url_t = $direct = 'Maximum size of photos exceed';  
      }
      else 
      {
        $url_i = $url_t = $direct = 'There was an error while submitting the form';  
      }

      $links[] = array('direct' => $direct, 'thumb' => $url_t);
    }

    if ($file > 3000000) { echo 'You have exceed the limit of the file size'; } 
        echo '<br /><br />';
        echo '<div id="links">';
        echo '<table>';
        echo "<tr><td><span class=\"green\">Direct:</span> <textarea class=\"link-area\" readonly=\"readonly\" onMouseOver=\"this.focus(); this.select(); $(this).css('height', '50px');\" onmouseout=\"$(this).animate({ height: '25px' }, 'fast'); $(this).blur();\">";
        for($i = 0; $i < count($links); $i++) { echo $links[$i]['direct'] . "\n"; }
        echo '</textarea></td></tr>';

        echo "<tr><td><span class=\"green\">Thumbnail:</span> <textarea class=\"link-area\" readonly=\"readonly\" onMouseOver=\"this.focus(); this.select(); $(this).css('height', '50px');\" onmouseout=\"$(this).animate({ height: '25px' }, 'fast'); $(this).blur();\">";
        for($i = 0; $i < count($links); $i++) { echo $links[$i]['thumb'] . "\n"; }
        echo '</textarea></td></tr>';

        echo "<tr><td><span class=\"green\">BBCode:</span> <textarea class=\"link-area\" readonly=\"readonly\" onMouseOver=\"this.focus(); this.select(); $(this).css('height', '50px');\" onmouseout=\"$(this).animate({ height: '25px' }, 'fast'); $(this).blur();\">"; 
        for($i = 0; $i < count($links); $i++) { echo '[IMG]' . $links[$i]['direct'] . '[/IMG]' . "\n"; } 
        echo '</textarea></td></tr>';

        echo "<tr><td><span class=\"green\">HTML:</span> <textarea class=\"link-area\" readonly=\"readonly\" onMouseOver=\"this.focus(); this.select(); $(this).css('height', '50px');\" onmouseout=\"$(this).animate({ height: '25px' }, 'fast'); $(this).blur();\">";
        for($i = 0; $i < count($links); $i++) { echo '<a href="' . $links[$i]['direct'] . '"><img src="' . $links[$i]['thumb'] . '" /></a>' . "\n"; }
        echo '</textarea></td></tr>';

        echo '</table>';
        echo '<script type="text/javascript" src="scripts/img.core.js"></script>';
        echo '<script type="text/javascript" src="scripts/jquery-1.5.js"></script>';
        echo '<input type="reset" id="resetbtn-remote" class="button-sub" value="Reset" />';
        echo '<br />';
        echo '</div>';
}
else 
{
    header('Location: index.php');  
}
?>

And the script gets called by this form:

<div id="remote" style="display: none;">
    <form action="remote.php" method="post" id="remote-upload">
        <br /><br />
        <textarea name="remote-urls" id="remote-urls" rows="12"></textarea><br/>
        <input type="button" name="remote-start" id="remote-start" class="remote-button" value="Upload Images" />
        <input type="hidden" name="sent-urls" value="1" />
        <input type="reset" id="remote-reset" class="remote-button" value="Reset" style="display: none;" />
        <br /><br />
        <span class="normal">
            Maximum <strong>20</strong> images.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>10 MB</strong> for one image.
        </span>
    </form>
        <div id="remoted">
            <img id="loader1" src="css/images/loader.gif" style="display: none;" />
        </div>
    </div>

The form is connected with a jQuery plugin that send data from a form without refreshing the page. I hit the #remote start button, loader shows, and after a few seconds the page freezes and becomes inaccessible for ~4 seconds, then the page unfreezes with the desired results.

What might be causing the page to freeze?

EDIT: The JavaScript is like this:

$('#remote-start').live('click', function() {
    $('#loader1').show();
    $(this).hide();
    $('#remote-reset').show();
    $('#remote-upload').ajaxSubmit({
        target: '#remoted',
        success: function(response) {
            $('#remoted').html(response).hide().slideDown('fast');
            $('#loader1').fadeOut('normal');
        }
    });
});

$('#remote-reset').live('click', function() {
    $('#remote-urls').empty();
    $('#remoted').slideUp('medium', function() {
        $(window.location).attr('href', 'http://localhost/imagehost');
    });
});

$('#resetbtn-remote').live('click', function() {
    $('#remote-urls').empty();
    $('#remoted').slideUp('medium', function() {
        $(window.location).attr('href', 'http://imgit.org');
    });
});
  • 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-23T04:15:33+00:00Added an answer on May 23, 2026 at 4:15 am

    Hard to say but I’d guess that your “jQuery plugin that send data from a form without refreshing the page” is calling $.ajax with async:false:

    Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active.

    The plugin is using AJAX and the above excerpt from the $.ajax documentation sounds exactly like what you’re seeing.

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

Sidebar

Related Questions

I have a python script that has to launch a shell command for every
I have a script that needs to run after tomcat has finished starting up
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example),
I have a script that retrieves objects from a remote server through an Ajax
I have a script that checks responses from HTTP servers using the PEAR HTTP
I have a script that takes a table name and generates a control file
I have a script that renders graphs in gnuplot. The graphs all end up
I have a script that works fine on my test server (using IIS6). The
I have a script that successfully encrypts a credit card. I need it to
I have an script that receives an encrypted url and from that generates a

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.