473,544 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

making it so a particular image is the first thing loaded

A webpage can include any number of images, cascading stylesheets,
frame's, etc. How might I go about making it so a particular image
loads before any of these others? Ideally, the image would load even
before the rest of the page loaded.

Any ideas as to how this might be done?

(I'm asking because I'm using a 1x1 image to simulate a cron job)

Aug 10 '07 #1
8 1979
yawnmoth wrote:
A webpage can include any number of images, cascading stylesheets,
frame's, etc. How might I go about making it so a particular image
loads before any of these others?
I don't think that can be done.
(I'm asking because I'm using a 1x1 image to simulate a cron job)
There is probably a better way to do what you want to do, but it
probably would involve a non-html solution. What are you ultimately
trying to accomplish?
Aug 10 '07 #2

yawnmoth <te*******@yaho o.comwrote:
A webpage can include any number of images, cascading stylesheets,
frame's, etc. How might I go about making it so a particular image
loads before any of these others?
You can't.

You can't even guarantee that the particular image will be loaded at all.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"I can take one day at a time, but sometimes several days attack me at once."
Aug 10 '07 #3
On Aug 9, 11:30 pm, Scott Bryce <sbr...@scottbr yce.comwrote:
yawnmothwrote:
A webpage can include any number of images, cascading stylesheets,
frame's, etc. How might I go about making it so a particular image
loads before any of these others?

I don't think that can be done.
(I'm asking because I'm using a 1x1 image to simulate a cron job)

There is probably a better way to do what you want to do, but it
probably would involve a non-html solution. What are you ultimately
trying to accomplish?
Basically, what I just said. I'd like to make a modification for an
open source package that'd let admins run whatever PHP script they
wanted to at designated time intervals. If you only got one visitor
every two hours, and you wanted your script to run every hour, that'd
be a problem, but I don't think there's much I can do about that.

I can't rely on cron because the admin might have safe mode enabled,
might not be running on Linux, etc.

At the same time, though, it wouldn't be all that spectacular if the
script was always the last thing to load on the page. If it were,
then people could just click another link and load another page before
the image on the first page had a chance to load.

Aug 10 '07 #4
On Aug 9, 11:47 pm, yawnmoth <terra1...@yaho o.comwrote:
A webpage can include any number of images, cascading stylesheets,
frame's, etc. How might I go about making it so a particular image
loads before any of these others? Ideally, the image would load even
before the rest of the page loaded.

Any ideas as to how this might be done?

(I'm asking because I'm using a 1x1 image to simulate a cron job)
You can use the onload element

http://www.w3schools.com/appml/el_onload.asp

www.richardfisher.com

Aug 10 '07 #5
Scripsit Helpful person:
You can use the onload element
You didn't really understand the question, did yoy?
http://www.w3schools.com/appml/el_onload.asp
Citing w3schools as a reference is always a useful signal of bogosity -
especially in a group where the unreliability of w3schools has often been
mentioned.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 10 '07 #6
Scripsit yawnmoth:
What are you ultimately trying to accomplish?

Basically, what I just said. I'd like to make a modification for an
open source package that'd let admins run whatever PHP script they
wanted to at designated time intervals.
How is this related to HTML authoring? And how would loading an image do
that? Even if the image URL refers to a PHP script, the script will be run
at _irregular_ and _unpredictable_ intervals: when the page is accessed by
someone using a browser that loads images.

If you just want to run a PHP script when a page is accessed, just make the
page a PHP page so that the PHP code first executes whatever you like and
then generates and sends the page.

If you need further help with this, please note that _this_ group discusses
HTML authoring for the HTML, and PHP and other server-side techniques are
not HTML.
At the same time, though, it wouldn't be all that spectacular if the
script was always the last thing to load on the page. If it were,
then people could just click another link and load another page before
the image on the first page had a chance to load.
What are you talking about?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 10 '07 #7
On Aug 10, 11:58 am, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
Scripsityawnmot h:
What are you ultimately trying to accomplish?
Basically, what I just said. I'd like to make a modification for an
open source package that'd let admins run whatever PHP script they
wanted to at designated time intervals.

How is this related to HTML authoring?
It isn't. That's why I didn't volunteer the information. What I was
asking wasn't how to do this - it was "how to make it so a particular
image loads first". Was there some HTML markup that'd allow me to do
this?
And how would loading an image do
that? Even if the image URL refers to a PHP script, the script will be run
at _irregular_ and _unpredictable_ intervals: when the page is accessed by
someone using a browser that loads images.
No shit. But if your webhost doesn't let you do cron jobs or use the
Windows Scheduler, or whatever, it may be the best option you got.
But what does any of this have to do with html authoring? I suggest
you drop this line of inquiry since it *is*, after all, off topic,
here. The only thing that is on topic here is whether or not you can
make an image load before others and that question has been answered.

Aug 12 '07 #8
Jukka K. Korpela wrote:
After you were told that HTML does not deal with such issues (which
is what you should have known already), there was no point to babble
here any more.
I asked him to.

It was reasonable to ask what your _real_ problem was, since it is
possible that the real problem has an HTML solution, or at least some
HTML relevance.
Actually, it looked to me like his real problem would need a server-side
solution. I was thinking that we could point him to a better resource
than this newsgroup if we knew what he was trying to accomplish.

You're looking for reactions to unpredictable events as a solution to
your (assumed) problem of scheduled runs.
That is true. If those unpredictable events happen often enough, and the
scheduled runs don't have to be right on schedule, this solution may be
good enough.

The OP should google "fake cron." I've seen something written in Perl. I
don't know if there is a PHP fake cron, but perhaps the OP can take
ideas from a Perl fake cron and write his own in PHP.
Aug 12 '07 #9

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

Similar topics

4
7308
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the images as I go, without writing them to disk on the server. Do I need to prepare all of the resized images before I display the data from the select...
3
6146
by: Randell D. | last post by:
Folks, I'm still learning javascript - I've invested in a couple of books and reading online as much as possible. I'm pretty sure what I am suggesting is possible though I'm trying to weigh up the faults that might go with the suggestion... all opinions welcome. My question: I have a list of links that go to pages that have a similar...
4
3083
by: Christina Androne | last post by:
Hi I want to allow the user to drow some locators on an image and connect the locators with lines. So I tried to put the following code in the onmousedown enevt of the picture: Graphics LGraphics = Graphics.FromImage(imgMap.Image); LGraphics.DrawString("X", new Font("Arial", 12), SystemBrushes.WindowText, AX, AY);
12
6167
by: Sharon | last post by:
I’m wrote a small DLL that used the FreeImage.DLL (that can be found at http://www.codeproject.com/bitmap/graphicsuite.asp). I also wrote a small console application in C++ (unmanaged) that uses the DLL above. Now the application, together with the above DLL’s is successfully loading a TIF image file (62992 x 113386 Pixels, Huffman RLE...
9
1862
by: Mark Denardo | last post by:
This is related to another post I submitted, but I'll be more precise this time. I have a web page that contains an Image webcontrol that loads its image by: Image1.ImageUrl="<username>.jpg", and an option for the user to update the photo. If they click the update button, I then flip up a new panel, where I have a FileUpload control and...
9
2570
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo" runat="server"/> <asp:Label ID="CompanyPicture" runat="server"/> I have 2 links that open the windows to preview these images. The previewed...
0
4185
by: numbnutz | last post by:
Hi, I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and accompanying captions. The gallery has more than one image and the user can navigate the gallery by clicking forward and backward buttons to take then...
3
3914
by: kayahr | last post by:
Hi there, I have a strange problem in Internet Explorer (IE6 and IE7). I'm writing a JavaScript application which allows the user to edit a photo composition. So when the user selects a photo then a frame is drawn around it with resize and rotate buttons. Now it happened to me that I replaced these buttons (32x32) with larger images (48x48)....
6
1504
by: Jerry West | last post by:
I'm a newbie to .NET from VB6. I have a Form with a Panel control on it. When the Form loads it maximizes and so does the Panel control. I then fill an array with the path to images at a specific folder. At that point a timer fires every x seconds which calls a routine that draws an image onto the Panel. This works great the first time the...
1
7405
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...
0
7738
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...
0
5956
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5316
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4938
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3441
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...
1
1862
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
1
1004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
688
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...

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.