HTML form, insert an image when you click the submit button

  • alexislalas
  • Novice
  • Novice
  • alexislalas
  • Posts: 32

Post 3+ Months Ago

Hello,

How can I insert an image once the user clicks the submit button in a form?

The process behind the form action takes 2-3 minutes and I want to display an image of a clock while it's processing so that the user knows that it's taking time to process the request.

Thanks!!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Code: [ Select ]
<?php
function show_image($img_url)
{
    echo "<img src=\"$img_url\" alt=\"Image\" />";
    ob_flush();
    flush();
}
?>
  1. <?php
  2. function show_image($img_url)
  3. {
  4.     echo "<img src=\"$img_url\" alt=\"Image\" />";
  5.     ob_flush();
  6.     flush();
  7. }
  8. ?>

How about that? Call that before the process begins.

Just upload an image of a clock (animated or not) and put that in there (The URL to the image).

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 46 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.