473,699 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Picture

GTi
On my page I have some links to ASP.NET generated pictures.
I use this
document.images .grapreportpic1 .src = url2newimage
to display the report picture.

But the "problem" is that it may take some time to generate the
picture.

Is it possible (how) to first display a preloaded image and then switch
it to the new image?

function DisplayGrapPic( url2newimage)
{
document.images .grapreportpic1 .src = preloadedImageV ar;
document.images .grapreportpic1 .src = url2newimage;
}

Jan 19 '06 #1
2 1159
GTi wrote:
On my page I have some links to ASP.NET generated pictures.
I use this
document.images .grapreportpic1 .src = url2newimage
to display the report picture.

But the "problem" is that it may take some time to generate the
picture.

Is it possible (how) to first display a preloaded image and then switch
it to the new image?

function DisplayGrapPic( url2newimage)
{
document.images .grapreportpic1 .src = preloadedImageV ar;
document.images .grapreportpic1 .src = url2newimage;
}


try this but I typed it into the reply, wasn't checked for syntax
errors but it should work.

function DisplayGrapPic( url2newimage)
{
document.images .grapreportpic1 .src = preloadedImageV ar;
reportImg = new Image;
reportImg.src = url2newimage;
document.images .grapreportpic1 = reportImg;
}

you can create the reportImg outside the function and preload it on
onload but I presume you call DisplayGrapPic on the body's onload
event...so it should be fine

Jan 19 '06 #2
GTi
impaler wrote:
GTi wrote:
On my page I have some links to ASP.NET generated pictures.
I use this
document.images .grapreportpic1 .src = url2newimage
to display the report picture.

But the "problem" is that it may take some time to generate the
picture.

Is it possible (how) to first display a preloaded image and then switch
it to the new image?

function DisplayGrapPic( url2newimage)
{
document.images .grapreportpic1 .src = preloadedImageV ar;
document.images .grapreportpic1 .src = url2newimage;
}
try this but I typed it into the reply, wasn't checked for syntax
errors but it should work.

function DisplayGrapPic( url2newimage)
{
document.images .grapreportpic1 .src = preloadedImageV ar;
reportImg = new Image;
reportImg.src = url2newimage;
document.images .grapreportpic1 = reportImg;
}

you can create the reportImg outside the function and preload it on
onload but I presume you call DisplayGrapPic on the body's onload
event...so it should be fine

Well, I don't use it in the body's onload
I have several links on my page that change the report picture on the
same document.
onclick=Display GrapPic('http://..../report.aspx?rep ortype=1')
(kvasir Ajax)

Thanks for the code, I will test it out.

Jan 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15513
by: Chris | last post by:
Hi, I am trying to set the position of a picture inside a picturebox with the folowing code: pctOutput.Picture = LoadPicture(App.Path & "\picture.bmp", , , , ) I didn't know what to fill in at and so the result was:
10
9504
by: Chris Coho, Jr. | last post by:
Ok, I'll explain the whole problem because there may be several ways to solve this and hopefully someone knows one. What I'm doing is creating a specialty template editor, similar to say a corel draw (but for specific uses). What I need to be able to do is import graphics and text and then move them around the background until they are where I want them and then export it out as an image file. The problem is that I need to be able to...
2
7229
by: Sandra Setz | last post by:
Hi, I was wondering if someone could explain to me what the difference is between the width propery of the picture property of an image and the width property of the image itself. I would have guessed that when the stretch property of an image was set to false and an image was assigned to the picture property, that Image1.Picture.Width and Image1.width would be the same. This is not the case.
3
10466
by: Sandra Setz | last post by:
Hi, Is it possible to assign the Picture property of a picturebox to the Picture property of an image control? I use an invisble picturebox to make some changes to a picture, but I want to show the picture in an imagecontrol, since the image is very large and I want to stretch it. But when I execute the following code:
2
8948
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname = "C:\photo.bmp" Me!Photograph.Class = "Paint.Picture" Me!Photograph.OLETypeAllowed = acOLEEmbedded Me!Photograph.SourceDoc = strPathname Me!Photograph.Action = acOLECreateEmbed
6
9479
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run out of purchasing cover. I am nearly there, the only problem is that the code below only changes the image background for text and combo-box backgrounds, it doesn't apply it to the whole form.
4
12841
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property, which becomes invalid when the user installs the database (ie: c:\devpath\ becomes c:\program files\mydbapp, but the .Picture property still points to c:\devpath\) The problem is that I don't *know* what installation path the user will select,...
6
8117
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a picture of themselves to their profile... I admit that I'm a newbie... but this is how I understand this:
3
2584
by: raghunadhs | last post by:
hi all! i have a picture box, in that picture box, there is a picture asume it as "pic1.bmp".. now i have made some changes in that picture. Now i want to load a picture to a image( my form consists of a picture box and a image also). like image1.picture=loadPicture(picture1.picture) ... but i know that this statement is invalid.... how can i do it? actually.. yesterday i learned how to make changes on a picture and how to save a...
1
3592
by: orson4music | last post by:
I have two picture boxes on my form. One on top of the other. The top most picture box's movement is restricted within the picture box below making it look like the top most picture box is contained in it. The picture box at the bottom is use be my web cam to display the image video preview. I want to be able to use the top most picture box as a cropper. I that case it has to be transparent to enable the user see through to the image...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8932
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8892
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4387
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.