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

  • alexislalas
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 27, 2007
  • Posts: 30
  • Status: Offline

Post May 22nd, 2009, 8:18 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 22nd, 2009, 8:18 am

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post May 22nd, 2009, 4:51 pm

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).
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 166 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.