How can I detect an image is loaded in client's browser

In my jsp page, I have a number of <img> to load, however I would like to jump to another page only after all the <img> are sucessfully loaded in client's browser. Is there any way I can accomplish this by either JSP or java script or any other means ?? My target clients mainly use IE5.5+

Thanks a lot, I finally found the code :
<SCRIPT>
function imageLoaded()
window.status = "Image " + event.srcElement.src + " is loaded";
</SCRIPT>
<BODY>
<IMG SRC="sample.gif" onload="imageLoaded()">
</BODY>

Similar Messages

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

  • My video was recorded on my I phone 4, the camera was held sideways for a horizontal view, but loads in I movie vertically.  How can I rotate the image so it is horizontal?

    My video was recorded on my I phone 4, the camera was held sideways for a horizontal view, but loads in I movie vertically.  How can I rotate the image so it is horizontal?

    Drag the clip from your Event to your Project. Then use the Rotate, Crop, Ken Burns Tool on the Middle Toolbar to rotate it

  • How can I detect the vertices of a rectangle in my image ?

    I have applied a gradientMagnitude operator to my Image, and now I can see the shape of a rectangle with also other lines.
    How can I detect the vertices of the rectangle in my image?
    thank you

    Right mouse click the song and select "Get Info", go to option tab and check both Start Time and Stop Time.  Type in the Start and Stop time then click OK

  • How can I add an image to a dowload, specialy if I bougth from I tunes?

    Hello
    How can I add an image to a dowload, specialy if I bougth from I tunes?

    That is not quite right. The image must be in a directory that is under the web server's view. JSP has nothing to do with images, the browser loads images separately after parsing the HTML results to find out what images it has to load. The images must be in a place that is servable by the web server being used.
    If you were just using Tomcat as a web server, then you would have a web application directory "myapp". The images need to go under "myapp" or in any subdirectory, except the WEB-INF directory, which is a special case.

  • How can you upload an image to MYSQL using php?

    Ok this is a joint thread with one of my other ones because no one else  was posting on it, so I did not get what I needed, so, How can you  upload an image to mysql so when some one logs on to my site, they see  or can upload there own avatar, now there are loads of problems with  this, 1) many people don't know how, 2) It's not every day you try to  encode a image into mysql, 3) Letting people upload images into mysql  can cause traffic problem with people trying to log in. So that's it.

    Uploading images into MySQL is a bad idea, for more reasons than you mention. You should store the images in a directory on the server instead. But if you want to learn the hard way, here is the method:
    The mysql data type must be blob.
    The form enctype must be multipart, like this: enctype="multipart/form-data"
    The form input field myst be type file, like this: <input type="file" name="upload"/>
    Here is example code that prepares the variable $photodata to be inserted into the database.
      $uploadfile = $_FILES['upload']['tmp_name'];
      $photoname = $_FILES['upload']['name'];
      $uploadtype = $_FILES['upload']['type'];
      if ($uploadfile != "") {
    $tempfile = fopen($uploadfile, 'rb');
    $filesize=filesize($uploadfile);
    $width=getimagesize($uploadfile);
    $widthx=$width[0];
    $heightx=$width[1];
    if (($widthx > 102) or (heightx > 135)){
    $image_too_big = " but the image size was too large and was not submitted.";
    } else {
    $photodata = fread($tempfile, filesize($uploadfile));
    $photodata = addslashes($photodata);

  • How can I draw an image when the mouse is clicked

    I am trying to draw X's and O's for a tic-tac-toe board and I cannot conceptualize how to get the X or O to appear if the mouse is pressed on an individual [row][col].
    Im using the MouseListener with a mouseAdapter as an inner class of paintComponent. Using the mousePressed method I want to draw the X or O when one square detects a mousepress
    How can I get the image on the partiuclar square. Im stumped presently. Any help is appreciated
    Thanks.

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TicTacToe extends JPanel
        Rectangle[] cells;
        int[] hits;
        final int
            GRID =  3,
            PAD  = 25;
        public TicTacToe()
            // jvm initializes all elements to zero by default
            hits = new int[GRID * GRID];
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            int xInc = (w - 2*PAD)/GRID;
            int yInc = (h - 2*PAD)/GRID;
            if(cells == null)
                initCells(xInc, yInc);
            // vertical lines
            int x1 = PAD + xInc, y1 = PAD, x2 = w-PAD, y2 = h-PAD;
            for(int j = 0; j < GRID-1; j++)
                g2.drawLine(x1, y1, x1, y2);
                x1 += xInc;
            // horizontal lines
            x1 = PAD; y1 = PAD + yInc;
            for(int j = 0; j < GRID-1; j++)
                g2.drawLine(x1, y1, x2, y1);
                y1 += yInc;
            // draw hits
            g2.setPaint(Color.red);
            for(int j = 0, side = 30; j < hits.length; j++)
                if(hits[j] == 1)
                    int row = j / GRID;
                    int col = j % GRID;
                    int x = PAD + xInc/2 + col * xInc - side/2;
                    int y = PAD + yInc/2 + row * yInc - side/2;
                    g2.fillRect(x, y, side, side);
            //g2.setPaint(Color.blue);
            //for(int j = 0; j < cells.length; j++)
            //    g2.draw(cells[j]);
        public void addHit(int cellIndex)
            hits[cellIndex] = 1;
            repaint();
        private void initCells(int width, int height)
            cells = new Rectangle[GRID * GRID];
            for(int row = 0; row < GRID; row++)
                for(int col = 0; col < GRID; col++)
                    int index = col + row * GRID;
                    int x = PAD + col * width;
                    int y = PAD + row * height;
                    cells[index] = new Rectangle(x, y, width, height);
        public static void main(String[] args)
            TicTacToe ticTacToe = new TicTacToe();
            Selector selector = new Selector(ticTacToe);
            ticTacToe.addMouseListener(selector);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(ticTacToe);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class Selector extends MouseAdapter
        TicTacToe ticTacToe;
        public Selector(TicTacToe ttt)
            ticTacToe = ttt;
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            Rectangle[] r = ticTacToe.cells;
            for(int j = 0; j < r.length; j++)
                if(r[j].contains(p))
                    ticTacToe.addHit(j);
                    break;
    }

  • How can I detect that there is an internet connection?

    How can I detect that there is an internet connection?
    Peter Goossens

    How can I detect that there is an internet connection?
    Peter Goossens
    Peter,
    You might want to experiment with this. It's not perfect, but...
    Class
    Imports System.IO
    Imports System.Net
    Namespace InternetConnection
    Public Class SiteInfo
    Private _displayName As String
    Private _connectionString As String
    Private Sub New(ByVal name As String, _
    ByVal connectionString As String)
    _displayName = name.Trim
    _connectionString = connectionString.Trim
    End Sub
    ''' <summary>
    ''' Gets the connection string of this instance.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property ConnectionString() As String
    Get
    Return _connectionString
    End Get
    End Property
    ''' <summary>
    ''' Gets the display name of this instance.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property DisplayName() As String
    Get
    Return _displayName
    End Get
    End Property
    ''' <summary>
    ''' A method which will add a new site to your collection of SiteInfo.
    ''' </summary>
    ''' <param name="siList">Your generic List(Of SiteInfo).</param>
    ''' <param name="displayName">The display name for this new instance
    ''' of SiteInfo.</param>
    ''' <param name="connectionString">The connection string for this
    ''' new instance of SiteInfo.</param>
    ''' <remarks></remarks>
    Public Shared Sub AddNew(ByRef siList As List(Of SiteInfo), _
    ByVal displayName As String, _
    ByVal connectionString As String)
    Try
    If siList Is Nothing Then
    Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
    ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
    Throw New ArgumentException("The display name cannot be null or empty.")
    ElseIf String.IsNullOrEmpty(connectionString) OrElse connectionString.Trim = "" Then
    Throw New ArgumentException("The connection string cannot be null or empty.")
    Else
    If siList.Count > 0 Then
    Dim findDuplicate As IEnumerable(Of SiteInfo) = _
    From si As SiteInfo In siList _
    Where si.DisplayName.ToLower.Replace(" "c, "") = _
    displayName.ToLower.Replace(" "c, "") AndAlso _
    si.ConnectionString.ToLower.Replace(" "c, "") = _
    connectionString.ToLower.Replace(" "c, "")
    If findDuplicate.Count <> 0 Then
    Throw New ArgumentException("This is a duplicate entry.")
    Else
    siList.Add(New SiteInfo(displayName, connectionString))
    End If
    Else
    siList.Add(New SiteInfo(displayName, connectionString))
    End If
    End If
    Catch ex As Exception
    Throw
    End Try
    End Sub
    ''' <summary>
    ''' A method which will return a boolean value to indicate internet
    ''' connection status.
    ''' </summary>
    ''' <param name="siList">Your generic List(Of SiteInfo).</param>
    ''' <param name="displayName">The display name for the instance
    ''' of SiteInfo to use.</param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared Function InternetIsConnected(ByVal siList As List(Of SiteInfo), _
    ByVal displayName As String) As Boolean
    Dim retVal As Boolean = False
    Try
    If siList Is Nothing Then
    Throw New NullReferenceException("The collection of SiteInfo cannot be null.")
    ElseIf siList.Count = 0 Then
    Throw New ArgumentOutOfRangeException("Count", "The collection of SiteInfo cannot be empty.")
    ElseIf String.IsNullOrEmpty(displayName) OrElse displayName.Trim = "" Then
    Throw New ArgumentException("The display name cannot be null or empty.")
    Else
    Dim findInstance As IEnumerable(Of SiteInfo) = _
    From si As SiteInfo In siList _
    Where si.DisplayName.ToLower.Replace(" "c, "") = _
    displayName.ToLower.Replace(" "c, "")
    If findInstance.Count <> 1 Then
    Throw New ArgumentException("This instance is not in the collection of SiteInfo.")
    Else
    retVal = TestConnection(findInstance.First.ConnectionString)
    End If
    End If
    Catch ex As Exception
    Throw
    End Try
    Return retVal
    End Function
    Private Shared Function TestConnection(ByVal url As String) As Boolean
    Dim retVal As Boolean = False
    Try
    Dim request As WebRequest = WebRequest.Create(url)
    Using response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
    Using dataStream As Stream = response.GetResponseStream
    Using reader As New StreamReader(dataStream)
    Dim responseFromServer As String = reader.ReadToEnd()
    retVal = True
    End Using
    End Using
    End Using
    Catch ex As WebException
    retVal = True
    Catch ex As Exception
    retVal = False
    End Try
    Return retVal
    End Function
    End Class
    End Namespace
    Example Usage
    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim siList As New List(Of InternetConnection.SiteInfo)
    InternetConnection.SiteInfo.AddNew(siList, _
    "Test1", _
    "http://dev.virtualearth.net/REST/v1/Locations/37221?o=xml")
    InternetConnection.SiteInfo.AddNew(siList, _
    "Test2", _
    "nothing here")
    InternetConnection.SiteInfo.AddNew(siList, "Test3", _
    "www.google.com")
    InternetConnection.SiteInfo.AddNew(siList, "Test4", _
    "http://fls-online.com")
    ' This will return true:
    Dim bool1 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test1")
    ' This will return false:
    Dim bool2 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test2")
    ' This will return false:
    Dim bool3 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test3")
    ' This will return true:
    Dim bool4 As Boolean = _
    InternetConnection.SiteInfo.InternetIsConnected(siList, _
    "Test4")
    Stop
    End Sub
    End Class
    Let me know your results please?
    Still lost in code, just at a little higher level.

  • How can i  read a image from a oracle DB?

    How can i read a image from a oracle DB?
    Because in the DB a have a field that is a picture that i would like to show in a jpanel.....but this field is in oracle DB only has strange caracters ..... so Do i have to read this field like a input stream?....
    Could some body help me please?
    Thanks...
    Mary

    Well I suppose the picture is stored in a blob. If that is so this is some code I have used to load a picture to a panel. Hope you find it usefull.
    PreparedStatement retreive = db.createPreparedStatement("select bl from test where ln = ?");
    Blob bl;
    try{
    retreive.setBigDecimal(1, new BigDecimal(jTFln.getText()));
    ResultSet rs = retreive.executeQuery();
    if (!rs.next())
    System.out.println("Empty Result Set");
    bl = rs.getBlob("bl");
    if (bl == null) {
    System.out.println("Null Blob");
    return;
    InputStream is = bl.getBinaryStream();
    int imageLength = (int) bl.length();
    System.out.println(imageLength);
    System.out.println(bl.length());
    byte[] imageData = new byte [imageLength];
    is.read(imageData, 0, imageLength);
    image1 = new ImageIcon(imageData);
    photo = new JPanel() {
    public void paint(Graphics g){
    g.setColor(Color.lightGray);
    g.drawImage(image1.getImage(), 0, 0, this);
    } catch (BadLocationException ble){
    ble.printStackTrace();
    } catch (SQLException sqle){
    sqle.printStackTrace();
    } catch (IOException ioe){
    ioe.printStackTrace();
    }

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • HOW can I make a .SWF default load after its first load?

    When you have the SAME parent API on every page of an (X)HTML website, can a .SWF tell itself to load from a default position when a website user navigates to different HTML pages?
    Here's my parent API as it stands:
    http://www.playingthepoet.com/
    HOW can you tell the .SWF to load from a default position once the .SWF has loaded a first time? AND from any page of the website, not just the Home page? This is an advanced .SWF networking issue. And I'm not sure if the best solution is a Javascript of if there's a direct AS3 programming solution.
    The blurs and fade-ins are a bunch of timer variables and timer event methods timer event listeners. I want that intro ONLY ONCE. And NOT every time a user changes HTML pages. Please help, and MANY thanks for your time!!
    NT

    Hi ,
    You can set a variable say "count" on stage composition ready -
    sym.setVariable("count" , 0);
    On stage click , you keep checking the value of this variable -
    if(sym.getVariable("count") == 5)
      sym.$("Symbol_2").show();
    //Here "Symbol_2" is the next button that you want to appear on screen(which is initially invisible) when the symbol_1 is clicked say 5 times.
    Now, on click of a button , you keep updating the variable count -
    var countnew = sym.getVariable("count");
    countnew = countnew+1;
    sym.setVariable("count" , countnew);
    Attaching the sample for reference.
    Thanks and Regards,
    Sudeshna Sarkar

  • How can you use one image and edit it three different ways to export later?

    I am a new Lightroom 3 user.  How can use the same image and edit it multiple ways to produce mulitple images to later export?  For example,  I have a picture of a bride and groom.  I want to use that image and create a color image, a black and white image, and a close up of their hands.

    Do I need to do either of those options before I start editing the image at all?  For example,  what if I am working on the image and doing some creative edits.  Then I think of another option that I could do.  Is it too late at that time or can I still get the original image to begin with?

  • How can I save the images to the iPhone anywhere

    Hello  I own Time capsule 3 tb. How can I save the images to the iPhone anywhere in Time capsule
    note i used fileexplorer when Outside the home isee Outside Message " error connection failed with the error operation time out "
    Thanks

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store
    If you want to back up the Photos only:
    Export them using the File -> Export command.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

Maybe you are looking for

  • How to find the approval status for a document version

    Hi all, We have enabled versioning on a folder and the system is maintaining the versions. I need to be able to identify which version in at what status. For example, I create a file and it creates a version, I check it in and out several times, I th

  • Cloud automation testing feasibility using Coded UI 2013.

    Hi, I am unable to find any document which could explain whether automation testing for cloud application could be achieved using Coded UI 2013. In my project the plan is to move all applications to cloud network and as an automation tester I have au

  • What user exit should I use to...

    Hi everyone! I need to check if the due date or bline date of a posting to a GL line item is filled out, which user exit should I use? Btw, I cannot change FSG so it is not an option... Here is a list of FB01 user exits: Exit Name           Descripti

  • Invoicing party change

    Hi all, My problem is like this: I have received the GR from XYZ Vendor. The entries was posted correctly with GR/IR Clearing. and made the PO for the same with no 1234. Now my user using the PO 1234 and changed the invoicing party in MIRO as ABC. Th

  • The edit option in recent call's missing

    hi. I tried everything but it doesn't appear. I bought my phone 2 weeks ago and it never had the edit option in the recent call's menu. I tried to reinstall the software but no success...:( any ideas?