Spinning/loading image for ajax call

Hi,
Is there any way to display a spinning/loading image (the usual one that you see on many Ajax Websites) before getting the result in the following ajax call?
Thanks.
Andy
<script type="text/javascript">
function getUserList() {
var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getUsers',0);
ajaxRequest.add('P2_LAST_NAME',html_GetElement('P2_LAST_NAME').value);
ajaxRequest.add('P2_FIRST_NAME',html_GetElement('P2_FIRST_NAME').value);
ajaxResult = ajaxRequest.get();
if (ajaxResult)
{html_GetElement('UserListDiv').innerHTML = ajaxResult}
else
{html_GetElement('UserListDiv').innerHTML = 'null'}
ajaxRequest = null;
</script>

the CPU time is on the DB/application server site.
here are the codes (on page 40):
1.) page HTML header:
<script language="JavaScript" type="text/javascript">
<!--
function f_TestOnDemand(){
     var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=40processlong',0);
get.add('P40_TEMP_ITEM',html_GetElement('P40_TEST').value)
     get.GetAsync(f_AsyncReturn);
     get = null;
function f_AsyncReturn(){
          if(p.readyState == 1){
               html_GetElement('P40_TEXT_DROP').value = '';
               html_ShowElement('AjaxLoading');
          }else if(p.readyState == 2){
          }else if(p.readyState == 3){
          }else if(p.readyState == 4){
               html_GetElement('P40_TEXT_DROP').value = p.responseText;
     html_HideElement('AjaxLoading');
          }else{return false;}
//-->
</script>
2.) on apge footer text:
<div id="AjaxLoading" style="display:none;">..Loading..
<img src="#IMAGE_PREFIX#/processing3.gif" /></div>
3.) onDemand process:
declare
l_counter number;
l_o_name varchar2(2000);
begin
htp.prn('<body>'||chr(10));
for i in 1..5000 loop
htp.prn('<payload id="test'||i||'">'||i||':'||v('P40_TEMP_ITEM')||'</payload>'||chr(10));
end loop;
htp.prn('</body>');
end;
4.) a html region is created with three items : p40_temp_item, p40_test, and p40_text_drop. a SEND button created in the region with URL target "javascript:f_TestOnDemand();"
so the content from P40_TEST does go to P40_TEXT_DROP (with process wrapped info) and the "loading..." is gone also, if I input the text in the P40_TEST field and click "Send" again, it still works, but I can not move to other pages under the same tab set, and at this moment, the CPU is go very higher by the process.
I can not see any leak around these code. it should go back to normal after "Send".
Thank you.
Jim

Similar Messages

  • Has anyone created an animated loading image for a WebApp?

    I have a complex WebApp that takes a few seconds to load.  Does anyone have an example of a loading image for WebApps?

    Lots of choice
    Google

  • Mail: Load Images for trusted senders

    Hi,
    Within mail / Preferences, I've disabled loading images for all received email. However, I'd like to be able to automatically load images for any sender in my address book or use some other whitelist mechanism to trust certain senders so that I don't have to "load images" so often. Any ideas?
    Thanks,
    Robert

    This may be a question for the Apple Script forum, as mail rules has the capacity to run an apple script based upon set criteria.
    Something like:
    on new received message > checked senders > if sender is in address book > run apple script to load images.
    If I was an apple script type I might be able to help, sadly though I am not.
    Try posting here: http://discussions.apple.com/forum.jspa?forumID=724
    I hope you find a successful solution.
    Cheers!
    Michael

  • I have "Load Images Automatically" disabled. How can I load images for ONLY the page I am currently viewing?

    I have intentionally disabled "Load Images Automatically" so that it is easier to view my desktop remotely via VNC or Remote Desktop. Animations and other graphics kill the performance of these remote viewing apps. However, when I reach a desired web page (the one I really intend to read in full), I want to load all the images ***for that page only***.

    I don't think Firefox has that features. It views loading images as a permissions issues toggled on a site-by-site basis rather than a performance issue toggled on a page-by-page basis.
    Maybe an add-on would give you a better balance of features? These two popped up in a quick search:
    [https://addons.mozilla.org/en-US/firefox/addon/image-block/ Image Block :: Add-ons for Firefox]
    [https://addons.mozilla.org/en-US/firefox/addon/imglikeopera/ ImgLikeOpera :: Add-ons for Firefox]
    If you try either of these, let us know what you think.

  • Apple Mail - Load images for some email addresses automatically

    Is it possible in Apple Mail to put some email addresses on a white list so that the images within their emails always load?
    I don't want all images to load for every email I get, but I find it an annoyance to have to often load images from contacts I already trust.

    AppleScript to the rescue!  Thank you Linc Davis!!!
    Still find it strange Apple doesn't have this built into the Mail interface as an option and have to run a script [grumble].

  • Problem loading image for TrayIcon

    This code works great if I'm in Netbeans running my project. No problems.
                //grabbing image for TrayIcon
                String curDir = System.getProperty("user.dir");
                Image image = Toolkit.getDefaultToolkit().getImage
                        (curDir + "\\src\\edunasdesktop\\earth_alert.png");The problem is when I run my jar file from the dist folder in my project folder. The TrayIcon loads just fine,
    just with no picture. Do I need to point to a different location or do I need to put the picture elsewhere; or both?
    Some pictures I used with the Netbeans GUI Builder on some JLabels are in the same src directory but I used the
    Builder to add those pics so I guess I'm a bit unsure on how to do this by hand, as the Builder handled this type situation
    in previous occassions.

    The [section on icons|http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getResource] in the Swing tutorial has information about loading images. The general idea is you use
    URL toImage = SomeClass.class.getResource(...);Incendently, if done right then it will work in Netbeans or in a jar. The way you currently have it set the image would have to be in +/src/edunasdesktop/+ within the jar file for the Toolkit to find it.

  • Same caller image for every call

    I have an N8 with Symbian Anna. I have attributed an image to one of my contacts, but this image shows every time I recieve a call, regardless of who the caller is. How can I make my phone show the right image?
    Solved!
    Go to Solution.

    Fender77 wrote:
    Nice, it wasn't harder.
    And then you will have to apply the picture to contact instead.
    May you point out the step buy step guide on that too kingblue?
    Sure.
    First you make sure the image that you want to link to your contact is on your phone, by either taking a picture of the contact with the camera, or copying it into the Pictures folder on your N8 mass memory.
    After this you go to Menu -> Contacts -> open the contact that you want to change the image for -> click on the white image that represents a person -> select "Add image" -> select the image that you want to link to your contact.

  • Alpha transparency borders on dynamically loaded images for use with textures

    Hi there folks. Well, I have been beating my head over this
    and am hoping one of you can help me out.
    Essentially I have 16bit images that are loaded into my
    shockwave application at run-time. These images are user defined
    which means that I will not know their size ahead of time. Once the
    images are loaded I then create textures and apply them to various
    shaders. Ok, all of this works just fine. What I need to do though
    is create an alpha transparent border around the images, so when I
    apply them to their surfaces I only see the image and nothing
    around it. I am doing this because these images will only appear at
    specific parts on a surface, textureRepeat will be false, and many
    models will be stacked in the same exact location using the same
    model resource. I have everything working, but I cannot figure out
    the alpha part for the life of me. Also, when I test the alpha
    based image by itself it works just fine. It is not until I try and
    combine the 16bit (converted to 32bit at run-time) image that I run
    into problems.
    I have tried:
    - Creating a 32bit alpha image in Fireworks with a
    transparent border and a black rect for the inside. I then copy the
    dynamic image over the alpha image (only after going from 16bit to
    32bit in imaging Lingo) and leave a little room at the edges for
    the transparency. Well, I get a crazy amount of streaks here even
    when I try to up the trans border by around 24 pixels on each side.
    - Using another similiar alpha based image as a mask with
    copyPixels and extractAlpha/setAlpha like this... (code is a little
    rough here)
    newImage = new(#bitmap)
    newImage.name = "place_Test"
    newImage.image = member("place").image
    newAlpha = new(#bitmap)
    newAlpha.name = "AHH"
    newAlpha.image = image(newImage.image.width + 24,
    newImage.image.height + 24, 32)
    newAlpha.image.useAlpha = true
    newAlpha.image.copyPixels(member("vase").image,
    newAlpha.image.rect, member("vase").image.rect)
    newAlphaInfo = newAlpha.image.extractAlpha()
    newAlpha.image.useAlpha = false
    --reverse dark to light
    iAlphaReverse = image(newAlpha.image.width,
    newAlpha.image.height, 8, #grayscale)
    iAlphaReverse.fill(iAlphaReverse.rect, rgb(0,0,0))
    iAlphaReverse.copyPixels(newAlphaInfo, iAlphaReverse.rect,
    newAlphaInfo.rect, [#ink : #reverse])
    --newAlphaInfo.copyPixels(iAlphaReverse, newAlphaInfo.rect,
    iAlphaReverse.rect, [#ink:#subtractpin])
    newAlphaMask = iAlphaReverse.createMask()
    rescaleAbs(newImage, newImage.image.width,
    newImage.image.height, "place_Test", 32)
    destImage = member("place_Test").image.duplicate()
    destImage.fill(destImage.rect, rgb(0,0,0))
    newAlpha.image.useAlpha = false
    destImage.copyPixels(newImage.image, newImage.image.rect,
    newImage.image.rect, [#maskImage:newAlphaMask, #ink:#add])
    destImage.setAlpha(iAlphaReverse)
    destImage.useAlpha = true
    member("place_Test").image = destImage
    I apologize for the messy code. I have cut and pasted from
    all over the place and am getting confused. In any case, I think I
    am making this harder then it needs to be and hope someone can
    help.
    Thank you in advance,
    Dave

    Hi, you can try using other texture layer as mask on the same
    shader. As usually you create the texture from a dynamic loaded
    image, then apply this texture to the shader on the texture list
    index 1 (textureList[1]). Next part does the job, create other
    texture from a 32 bits image with the alpha information and fill
    all pixels with white color, this is very important because the
    second texture layer will be multiply with the first texture layer.
    This texture set its render format to rgba8888. Apply the mask
    texture to the same shader at texture list index 2, verify that the
    blendFunctionList index 2 is #multiply.
    I include the code of a project that use this masking
    approach:
    property pMember
    property pEarthSphere
    property pNightSphere
    property pLastTransform
    on beginSprite me
    pMember = sprite(me.spriteNum).member
    me.setupWorld()
    end
    on setupWorld(me)
    pMember.resetWorld()
    repeat with i = pMember.light.count down to 1
    pMember.deletelight(i)
    end repeat
    vEarthModelResource = pMember.newModelResource("EARTH MODEL
    RESOURCE", #sphere)
    vEarthModelResource.radius = 50.000
    vEarthModelResource.resolution = 20
    vEarthTexture = pMember.newTexture("EARTH TEXTURE",
    #fromCastMember, member(3,1))
    vEarthShader = pMember.newShader("EARTH SHADER", #standard)
    vEarthShader.emissive = color(255,255,255)
    vEarthShader.flat = TRUE
    vEarthShader.transparent = FALSE
    vEarthShader.textureList[1] = vEarthTexture
    pEarthSphere = pMember.newModel("EARTH MODEL",
    vEarthModelResource)
    pEarthSphere.shaderList = vEarthShader
    vNightModelResource = pMember.newModelResource("NIGHT MODEL
    RESOURCE", #sphere)
    vNightModelResource.radius = 50.2000
    vNightModelResource.resolution = 20
    vNightTexture = pMember.newTexture("NIGHT TEXTURE",
    #fromCastMember, member(4,1))
    vNightTexture.quality = #lowFiltered
    vNightTexture.nearFiltering = FALSE
    vNightTexture.renderFormat = #rgba8880
    vNightShader = pMember.newShader("NIGHT SHADER", #standard)
    vNightShader.emissive = color(255,255,255)
    vNightShader.flat = TRUE
    vNightShader.transparent = TRUE
    vNightShader.textureList[1] = vNightTexture
    vMaskNightTexture = pMember.newTexture("MASK NIGHT TEXTURE",
    #fromCastMember, member(6,1))
    vMaskNightTexture.renderFormat = #rgba8888
    vNightShader.textureList[2] = vMaskNightTexture
    vNightShader.textureModeList[2] = #wrapPlanar
    pNightSphere = pMember.newModel("NIGHT MODEL",
    vNightModelResource)
    pNightSphere.shaderList[1] = vNightShader
    pNightSphere.parent = pEarthSphere
    end
    on exitFrame(me)
    pEarthSphere.rotate(0.0,0.1,0.0)
    me.moveMaskNightTexture()
    end
    on moveMaskNightTexture(me)
    vRotationVector = - pEarthSphere.transform.rotation
    pNightSphere.shaderList[1].wrapTransformList[2].rotation =
    vRotationVector
    end

  • No image for incoming caller

    Hi,
    I cannot see the image of incoming caller. Can anybody assist me with the settings.
    Cheers,
    Vivek

    Is that the photo of the Doberman? It's in your profile page.  If you want it to be you avitar you'll need to go to your Profile page and click on the Change photo and avatar link at the right.  Then drag the photo to the bottom of the grid of avatar photos at the bottom and then select it as your avatar.
    OT

  • Print.css: when does the page load images for this?

    I have a print.css for an image I don't want on screen, but
    instead only for printing (normally set to display:none, and set to
    display:block when printing). Works great, but this image is
    loaded in any case as far as I know. 2 questions:
    1.) Would an image referenced in print.css load only when
    printing/previewing?
    2.) If so, could a printable (by default, i.e,
    non-background) image be loaded here in some way?
    Thank you!

    > 1.) Would an image referenced in print.css load only
    when
    > printing/previewing?
    I think so, but I'm not sure - so, I built a test page -
    http://www.murraytestsite.com/test-print.html
    It contains a single image that is display:none in the screen
    CSS, and
    display:block in the print CSS. Both YSlow and Safari's
    Activity window
    show the browser as fetching that image. Looks like the
    answer is *no* - it
    is fetched even when it is not displayed onscreen.
    > 2.) If so, could a printable (by default, i.e,
    non-background) image be
    > loaded
    > here in some way?
    I don't know what you are asking here.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Nick616" <[email protected]> wrote in
    message
    news:g8faeh$c9r$[email protected]..
    >I have a print.css for an image I don't want on screen,
    but instead only
    >for
    > printing (normally set to display:none, and set to
    display:block when
    > printing). Works great, but this image is
    loaded in any case as
    > far as
    > I know. 2 questions:
    >
    > 1.) Would an image referenced in print.css load only
    when
    > printing/previewing?
    >
    > 2.) If so, could a printable (by default, i.e,
    non-background) image be
    > loaded
    > here in some way?
    >
    > Thank you!
    >
    > link rel="stylesheet" href="print.css" type="text/css"
    media="print">
    >

  • Can't load images for photo gallery

    Hi All,
    This is my first stab at using Spry and I've run into a small
    problem. I can't get my images to show up for the thumbs or the
    large image. And when I read the article for this I only got more
    confused.
    quote:
    Now you can make use of these new data points in the album.
    Start by replacing the hard coded image folder paths to the values
    used in the XML file.
    In the thumbnail 'src' path, remove the 'thumbnails/' and
    replace it with the XML value. Make sure to remove the forward
    slash since that is already stored in the XML value for the path.
    Repeat for the main IMG tag. Remove the 'images/' from the
    'src' field and replace it with the XML value.
    Now you have to tell the dynamic region that you will be
    using data from the new dataset. Add the data set name to the
    spry:region attribute, separated by a space.
    When it says "replace it with the XML value", how do I do
    that? What XML value? Can someone give me an example? Do I spec out
    the directories in the XML file or within the code on my
    gallery.html page?
    Here's my dir structure
    gallery.html
    -photo_gallery (dir)
    --photo.xml
    --gallery (dir)
    ---pic1.jpg
    ---pic2.jpg
    ---pic3.jpg etc.

    Hi Petron,
    Sorry for the confusion.
    You can do either. It depends on how you structure your XML.
    The most flexible way would to just have the image name in
    the XML file. That will let you change your folder structure
    without having to update the file.
    So your XML can say:
    <photos>
    <photo name="pic1.jpg" />
    <photo name="pic1.jpg" />
    </photos>
    And your <img> tag can be:
    <img src="gallery/{@name}">
    {@name} is the data reference for your data set which
    contains the image info.
    But, if you have the full path in the XML:
    <photos>
    <photo name="gallery/pic1.jpg" />
    then your img would be <img src="{@name}" />
    Either way, the full path has to be built to the .jpg file.
    The first way is probably better...
    In my gallery tutorial, we start out with one gallery. But
    later on, we expand it to use multiple galleries. We use one XML
    file to tell use the image directory:
    <galleries>
    <gallery>china</gallery>
    <gallery>egypt</gallery>
    Where we can use these values as folder names.
    Let me know if this helps. I don't want to give too many
    unnecessary details that might confuse the issue.
    If you have a sample URL, we can accurately help you.
    Thanks,
    Don

  • Loading Images for web Applet

    I just recently learned how to load a applet to my site, and now that I'm able to load simple ones up I want to move on. I made a game this morning, but I used images in it. When i loaded the applet to the site, it didn't work. As suggested from another user I tried:
    Image background=this.getImage(getCodeBase(),"/forest.gif"); All of the applet's classes/html file is in the root directory folder with all of my images. I also tried...
    Image background=this.getImage("http://www.StevePicHolder.1colony.com/images/forest.jpg");and no luck...What do I need to do to make my applets online be able to use pictures?

    The Applet.getCodeBase() method returns the absolute URL where your class files reside. If the image file is in the same location you would code the following:
    Image background=this.getImage(getCodeBase(),"forest.gif");If your image file is in a path relative to the code base (e.g., an images folder residing relative to your class files) then specify the relative path via the following:
    Image background=this.getImage(getCodeBase(),"images/forest.gif");If your image files are in the same or relative location of your HTML file containing the APPLET tag then use the getDocumentBase() method instead.

  • Safari loading images for ever!

    Safari, take for ever to show pictures, I try to reset it, install the Flash Player Plug In. I open the same webpage in Chrome and IExplorer and no problem at all. Any help will be appreciated. Thanks.
    http://partygurlz1986.spaces.live.com/PersonalSpace.aspx?owner=1

    I continue trying to open this website with safari, but never shows the pictures, I can see only "loading" please tell me are you using the same safari vesion? my OS is Windows Vista Home, and I can see you are using XP. The website open normal in IE 7.0 and Chrome Browser. I try to re-install the plug ins Java and Flash for Safari, and the problem continue.
    I ask to the visitors to this forum, try to open it, and let me know if there is a problem or open fast as you said. Thanks.

  • ASA5505 - Windows 7 machine unable to load images for a website

    Ths only hapeens at one location. All the other locations are working the difference is this location goes through the firewall. If I bypass the firewall at this location it works.

    Hello,
    Lets run a capture can you provide the private ip adderss of the windows 7 machine and the web-server ip address.
    Please rate helpful posts.
    Regards,
    Julio

  • Synchronous versus Asynchronous Ajax calls

    Hello Apex gurus,
    I have a page which uses synchronous Ajax and seems that once in a while the browser freezes. I suppose this happens when the server takes a little longer to respond. I read this article:
    http://www.oreillynet.com/xml/blog/2007/01/do_sync_calls_freeze_browsers.html
    and I wanted to reproduce the test. So at the top of my on demand process I put
    DBMS_LOCK.sleep(10);
    I expected this to freeze the browser for about 10 sec but make no difference in terms of what the response is.
    It seems though that the response is null. I also have:
    EXCEPTION
    WHEN OTHERS THEN
    htp.p(SQLERRM);
    to capture any errors but no error message is returned either.
    Can somebody explain what is going on here and as a second question: if I make the synchronous call to asynchronous is this going to solve the browser freezing problem.
    George

    Hello,
    Please check if the following can help you –
    Re: Ajax and Threading
    Re: spinning/loading image for ajax call
    Regards,
    Arie.

Maybe you are looking for