|
Try using the lowsrc attribute to specify a low-res version of the image. The low-res version should be displayed until the real image has finished downloading.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Richards way is best, the lowsrc attribute is made exactly for that.
However you can also make use of the onload event of the BODY element. It is only fired once everything is downloaded and sorted out.
So you could have:
<body onload="document.getElementById('imgPicture').src='largepicture.jpg';">
<img id="imgPicture" src="smallpicture.jpg"
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Hi
I want my html page to have a fixed background (bgproperties="fixed"), but I don't want to tile the background, i.e. only one instance of the picture on top of the page.
I've seen a backround-repeat : no-repeat command, but that does not seem to work.
tx for any help
|
|
|
|
|
background-repeat is the correct way (not bgproperties="fixed".)
Remember it has to go either in an external CSS file on the BODY tag or using an inline style in the BODY tag. e.g. <body ... style="background-image: url(yourbackgroundpicture.jpg); background-repeat: no-repeat;">
It is not an attribute of BODY like bgproperties is.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
just kidding...
somehow i don't get it to work. the pic loads fine, but it still tiles. anyhow, to get the background fixed (that's what I meant) works fine.
Should i add any /css tags somewhere?
|
|
|
|
|
Hi
I got it to work, didn't understand exactly what you said
tx
|
|
|
|
|
Hi All.
I need a little progress bar to view the status (in the body of page) of some process
like database connection process,
reading and parsing files process,
loading files process...
When this things are being done in the server I want to give info to user that how many percentage of process done. But I could not found an effective way. I need to show this progress bar both in ie and netscape. Could you give me any oppinion?
karanba
|
|
|
|
|
|
Please, code for replace bad words and images.
Thank you.
Complete please
|
|
|
|
|
HISPANO wrote:
Please, code for replace bad words and images.
Thank you.
Could you be more specific? Language you are working with? ..... look into regular expressions. This shouldn't be too difficult, read a little.
-Nick Parker
The true measure of a man is how he treats someone who can do him absolutely no good. - Samuel Johnson
|
|
|
|
|
I'm spanish and not write inglish very well.
My code for programing is Asp.
Thank you
|
|
|
|
|
|
Thank you.
Please code complete because i'm not very experience in ASP.
|
|
|
|
|
HISPANO wrote:
Please code complete because i'm not very experience in ASP.
Dim str
str = "This is a bad word"
str = Replace(str, "bad", "good") <font color=green>'replaces all occurances of "bad" with "good"</font>
Response.Write (str)
-Nick Parker
The true measure of a man is how he treats someone who can do him absolutely no good. - Samuel Johnson
|
|
|
|
|
Thank you!
Oleeeee!
Other question, for include // str = "my information for Data Base" //
<%
Dim str
str = "information to database"
str = Replace(str, "bad", "good")
str = Replace(str, "word", "hijo prhase")
Response.Write (str)
%>
Code complete please.
Thank you!
|
|
|
|
|
HISPANO wrote:
Code complete please
I don't see a question. There are many good sources out there as this is only VBScript, I would suggest that you start reading. MSDN[^] is a great source as well.
-Nick Parker
The true measure of a man is how he treats someone who can do him absolutely no good. - Samuel Johnson
|
|
|
|
|
Que1. There is a website that display results when you enter a roll number. My client wants me to make an application customised to his requirements but fetching data from that website. The trouble is I do not know the DSN of the database the result site is using nor do I have any access to the site. The only way I can think is of sending a get or post query from my page but then I cannot have any control over the recordset . Can you suggest any way of doing this in ASP or in any other language.
Que2. I cannot use global.asa on my local machine. Do you have to make any settings changes before the IIS finds the global.asa file. It is there in the root of my application but I cannot access the variables in it.
Will be thankful for your replies.
regards,
Deepak Appu
|
|
|
|
|
Deepak Appu wrote:
There is a website that display results when you enter a roll number
Does this site not expose an XML format or better yet, a webservice?
If not, then using GET/POST and searching through the resultant HTML is the alternative.
Deepak Appu wrote:
I cannot use global.asa on my local machine
You could also try include files on the server side.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
I'm trying to read from a text file, and I used the code provided on this website. Where I'm having the problem is that when I test the page it seems to stay in limbo, and locks up my IIS server. I think my problem is in my naming of the file to be read. The file is stored in C:\Inetpub\wwwroot\testread.txt. When I go to enter in the "Const Filename = "What should be here???", and do I need to create an ODBC connection like when I connect a database. Your help would be greatly appreciated.
M.T.
|
|
|
|
|
Please can you post a code snipett.
Are you using the FileSystemObject?
mdesign wrote:
do I need to create an ODBC connection like when I connect a database
No you don't.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
I actually got it to work but thanks for input. Here is the working code incase anyone else needs help.
<%
Const Filename = "testread.txt"
Const ForReading = 1, TriStateUseDefault = -2
Dim FSO, FilePath
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
FilePath = Server.MapPath(Filename)
if FSO.FileExists(FilePath) Then
Set TextStream = FSO.OpenTextFile(FilePath, ForReading, False, TriStateUseDefault)
Dim Contents, Title
Title = TextStream.ReadLine
Response.Write "
" & Title & " "
Contents = TextStream.ReadAll
Response.Write "
" & Contents & " "
TextStream.Close
Set TextStream = nothing
Else
Response.Write" File" & Filename & " does not exist"
End if
Set FSO = nothing
%>
|
|
|
|
|
is php the linux equal of asp, or how should it be understood? why isn't there a section for php on CP?
|
|
|
|
|
Cois wrote:
is php the linux equal of asp
Whilst I think php is a lesser language than ASP, it does the same job - just with a crappier syntax (IMO)
Cois wrote:
why isn't there a section for php on CP
Because nobody has written any articles or asked any questions
There are a few PHP examples about here, I think somebody converted the CP forums to PHP.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Cois wrote:
is php the linux equal of asp
This is a good analogy, although there are versions for Windows, too.
Cois wrote:
why isn't there a section for php on CP?
Where is the Linux section?
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
PHP is the poor mans ASP... (Just poking fun)
You are right in a way. PHP is to ASP as Linux is to Windows. The fact that PHP is generally served from Linux and ASP generally served from Windows strengthens that notion.
There is no section for PHP on CP because officially or not CP is a Microsoft/Windows site. 90% of the developers here are Microsoft boys and girls who use MS technologies.
Also nobody wants to dilute CP too much. If we let in PHP then we will have to let in Perl, ColdFusion, CGI etc. etc. Soon it will be a mess and the community will loose the cohesion it has.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|