Replacing Missing Images
Does anyone know how I can detect if a image is missing from the server before the browser tries to render it, I guess this would have to be done via some sort of preloader, the problem being I am the site in question has around 30,000 images and keeping on top of missing images is a impossiblility.
View Replies
ADVERTISEMENT
Is there a way I can test if an image file exists before displaying it?
I have a database that has an image field in it that users enter a filename into. Is there a way for me to check using an "if" statement that the file is actually on the drive before displaying it? ie:
<%okimage=(rsFile.Fields.Item("image").Value)
If okimage='actually on the drive' then%>
<img src='(rsFile.Fields.Item("image").Value)'>
<%else%>
<img src='noimage.jpg'>
<%end if%>
View Replies
View Related
I first noticed this in my own app. Images would show up missing [red X] randomly on IE 6.0.2800.1106 on Windows 2000 server.
I then was able to repro this problem on Microsoft's website!!! The page I used was
http://www.microsoft.com/windows/ie...sp1/default.asp
After pressing [F5] to refresh the page six times, I noticed missing images on the page.
This problem seems to be very reproducible. I coded a sample ASP page which references the same images 10 times on the same page. Loaded in IE. Upon pressing [F5] several times, the images will be identified as missing [red X]. Refresh the page again, it's fine.....etc.
I'm up-todate with all latest MS patches. Has anyone else seen this problem?
View Replies
View Related
I read that the "?" caracter can make you trouble with some search spiders. Although I know the Spiders are upgrading to evade this indexing problem, it is still an obstacle for some search engines.How can you refrain from using "?" in urls, for example, in a dinamically runned site?. Some CMS do it replacing that caracter with the slash bar "/", that is more spider-friendly.
In brief:
1. Is "?" still giving problems?
2. In case it's still making problems. How can I replace it?
View Replies
View Related
Does Anybody Know Howto Switch All Positive Signs(+) For Negitive Signs(-) And Negitive Signs For Positives?
View Replies
View Related
that is generated by a database that I don't have access to?
So, I use a database drived store. It is not open source, so I do not have access to adjust the HTML that is generated.
Unfortunately, the code is fairly messy, and contains un-necessary breaks, paragraphs, and other code that I don't want there! A lot of it I've been able to adjust with css, but the biggest thing that bugs me, is that there is a table and a td that are at a set width. It is set at 'width=550'. I would like to either remove that, or change it to 'width=95%'.
Is there anyway I can accomplish this? What I do is create a template .htm page that the asp uses. Is there anything I can do in the .htm to replace or remove this HTML? Javascript? A snippet of ASP code? Or should I just learn to live with it?
View Replies
View Related
I need to replace some dynamical content away from a text, only static thing
is that it starts with <!-- Start dynamic --> and ends with <!-- End dynamic
-->. How do i dynamical remove these two tags and all the content between
them?
View Replies
View Related
I'm sure this isn't difficult, but it's Friday afternoon (!).
I'm trying to use a regular expression to match html tags in a string
and convert them to lower case. It's the RegExp object that I'm
struggling with rather then expression syntax.
So far I have this ('HELP!' denotes where I'm stuck):
private function recoverHTML(sHtml)
dim oRegExp
set oRegExp = new RegExp
oRegExp.IgnoreCase = False
oRegExp.Global = True
oRegExp.Pattern = "<(.*?)>"
sHtml = oRegExp.Replace(sHtml, HELP!)
set oRegExp = nothing
end function
I'm thinking of something like this:
"<" & lcase($1) & ">"
What syntax do I need here?
View Replies
View Related
With hosting for clans, more so then not, the clan tags contain charactures
like + { [ in front of the tag letters.
what I am having a problem with is if it starts with a +, it isn't picking
up the name correctly. If in a sql statement, it looks for a tag that starts
with a +, it won't find it. And sometimes, when it is supposed to move the
tag over in a bracket, it moves it without the +.
for example, +EcK+ is the tag, it will either not find it, or move it over
as EcK without the +'s.
is there any way around this?
i know for some strings, such as things with ' you can use
replace (request.form("var"), "'", "''")
View Replies
View Related
I put in some code to keep apostrophes from being a problem. However, on the
display page, they have double quotes. What am I doing wrong?
Here is the code on the page which captures the data from the form, right
before it gets entered into the database:
------------------------------------------
strInternalDesc =
Replace(Replace(Trim(Request.Form("InternalDesc")),"'","''"),vbCrLf,"<br>")
------------------------------------------
then, on the page where it gets displayed, I get:
View Replies
View Related
I want to mask part of a field upon displaying it. field name is "IP", how do I mast the first 4 characters with "*" symbols?
View Replies
View Related
I have a printer friendly page script, that outputs the text less any includes, it works well in IE, but firefox grabs the "'<%@LANGUAGE="VBSCRIPT" %>" and outputs it to the print version page. SO i get a nice printer version - but with <%@LANGUAGE="VBSCRIPT" %> at the top.
Does anyone know how to write a conditional region like:after <body> if string is "<%@LANGUAGE="VBSCRIPT" %>" replace with ""?
View Replies
View Related
i am having trouble getting my REPLACE fn. to replace whole words only. basically, i'm running a 'spelling checker' fn. that uses the REPLACE fn. to find incorrect spellings and replace them. problem is, the fn. seems to replace all instances of a string, and not a whole word only as I intend it to be:
Code as follows:
StrInput = Request.Form("BKM_Search")
StrInput = LCase(StrInput) 'convert all to lowercase
StrInput = Trim(StrInput)'trim all empty space b4 & after string
StrCorrect = Replace(a_StrWrong, a_StrRight,1,1,1)
Let's say I want to replace the word "sea" with "ZZZ" only:
Example input: "Sean has some neat sea shells"
Example output: "ZZZn has some neat ZZZ shells"
View Replies
View Related
I've got an Access database with a memo field with large amounts of text in. In Access forms the text appears with line breaks where the enter key has been pressed. I'm using ASP to display this content on a simple webpage but want it to appear with the same line breaks as in the Access forms.
This is the code that I've got but it doesn't seem to work.
<% Article = rs("Article")
Article2 = Replace(Article, "<br>", chr(13))
%>
<td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div id="ArticleStyle" align="justify">
<% =Article2 %>
</div></td>
View Replies
View Related
Im looking for a way to replace certain chacters in a variable. this will be used for a file name. currently im using Code:
strFileTitle = Replace(strGuideTitle, " ", "_")
But this only kind of works because as ive erperiented more i also need to remove most chancters which would make an image file name invalid such as : ; / & ' " and a few others which users may enter regulary.
View Replies
View Related
what I'd like to do is have a few style sheets, then have a dropdown box where the user can select a theme and it will switch the style sheet in the link rel= according to which theme they chose. This should be pretty simple but I'm not much of a programmer. Can anyone help me out with the code for this?
View Replies
View Related
I have a code that goes to the url of the company.My problem is that if a company name has a single quote in it,it tries to end the statement.I tried a replace as you will see,but still doesn't work.Heres my code:
Response.Write "<td><center><a href='edit.asp?company="
Response.Write server.URLEncode(replace(rs("Company"),"'","'"))
Response.Write "'>Edit</a></center></td>"
View Replies
View Related
i have a remove user and change password script written, but the only thing they are missing is the actual text file editing part. i have the file open because i have read it, but how can i delete a line that matches with 'OldLine' and put 'NewLine' where it was with a couple of lines of code?
View Replies
View Related
The following removes any unwanted apostrophes before being inserted into an sql database:
Articletext = replace(articleText,"'","''")
..but if I need to remove all quotation marks, this doesnt work:
Articletext = replace(articleText,""","''") Code:
View Replies
View Related
I'm getting errors and for the life of me I can't remember how to get my "'s to output...
View Replies
View Related
I have a search results page that lists a series of records with clickable links to view the records. When you click on the link to the record, the record id, the search terms used, and the search type (exactphrase or anywords) is sent through the query string.
On the record page I have been trying to find a regular expression that would find and replace the search terms with < strong >< /strong > to highlight them. I am struggling.
Does any use a similar regular expression. One that, if flagged, will replace an exact string (phrase) or loop through an array replacing any of the words in the string?
View Replies
View Related
I have a rss feed that I am pulling into an ASP page. In the rss there is a url with the text 'SITEID' that I need to change to my actual id '456456'. Does anyone know how I can have the ASP page replace the text in the URL? I am pretty green on all this. Here is the asp page code I am working with: Code:
View Replies
View Related
How can I replace 1 set of double quotes (") with 2 sets ("")
I tried this but it didn't work: myText = replace(myText,""","""")
View Replies
View Related
I have a problem here, dealing with zero.
When i insert into a SQL database a value, say 4.50, through an ASP, it will display in the SQL as 4.5,
instead of the value 4.50 i entered. Therefore, when i retrieved the data from SQL, it will only return and display 4.5
IS there any way whereby i will get 4.50 instead of 4.5?
View Replies
View Related
My page have background image,on that image have more images and text. My problem is whenever resize browser that images are not resized and also not moved correct place .(i.e look not like before alignment).I want to do everything in dyanamic....
View Replies
View Related
My error is as follows:
Server.MapPath()error 'ASP 0171 : 80004005'
Missing Path
/raven/aspBoardFunctions.asp, line 19 The Path parameter must be specified for the MapPath method. Code:
View Replies
View Related
We created an asp.net 2.0 app, which sends smtp email using System.Web.mail.
The app is in an IIS 6 application pool isolated to 2.0 apps on a 2003
server.
The app worked fine for a few days; recently however it began failing when
sending to external addresses (it works fine if the recipient is inside our
internal domain).
Comparing the logfiles, I notice when it was working both versions of the
CLR appear in log entries, for example:
(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+C LR+1.1.4322;+.NET+CLR+2.0.50727)
Log entries from when it fails only contain CLR 1.1, for example:
(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+C LR+1.1.4322)
The app is configured to use ASP.NET 2.0. What would be causing that
version to disappear from the log entries (and presumably the app) like
this?
View Replies
View Related
I have code that inserts data into a db.What I would like to now is make sure that all textboxes have been filled out before inserting the data into the db. Moreover, send the user back to the page with the incomplete data, but with the completed data in the textboxes.
View Replies
View Related
iam trying to insert some data into a database but i keep getting the above error msg this is the line that is causing the problems any ideas?
Code:
sql3 = "Insert INTO course_dates ([Course_Id], [Course_Heading], [Course_Title], [Week_No], Status) VALUES ("&courseid&", "&course&", "&title&", "&weekno&", "&status&")"
here is what is printed when I response.write the sql3 statement
Insert INTO course_dates ([Course_Id], [Course_Heading], [Course_Title], [Week_No], Status) VALUES (285, NEBOSH, test, Week One, TBA)
View Replies
View Related
I am running Sun One ASP v 4.0.2 on Apache 2.0.x on Win XP Home. I noticed that Sun One Asp doesn't come with components such as AdRotator, Content Rotator, Browser Capabilitles, etc. Is there any way I can install all these components on Win XP Home. For me upgrading to Pro is not an option.
View Replies
View Related
I have a record set with the ItemNo field with the data type as Text. In the record that I have, I want to find the missing number in the series
for example:
1
3
4.1
4.2
5
missing number is 2.
How can I display the missing number in the browser or give me a return value that notifies me that there is a missing number in the series. Is there any function for that? Or how can i do that using a loop?btw im using ASP Classic and MS Access Database.
View Replies
View Related
i've a problem here. everytime a user click on "approve" button, they'll always get database error. and when i check the error log, there are several fields that have missing characters, which results in database error.
for example: the fields for:
1. "refID" (supposely: 1952/102007 becomes 952/10 007 or becomes 9
2/102007)
2 "staffID" (3456 becomes 456)
3. "PONo" (IVT123 becomes VT123)
4. "date" (2007-10-13 becomes 2007-10-3)
and etc
the facts are: Code:
View Replies
View Related
I have a record set (rs) that contains 25 barcodes values that I set to true
in a cookie. (see code section below)
If I read the cookie from within the same page that created it, I see all
25 values. But if I redirect to another page and read the cookie only 18 of
the values remain.
Even though I load the same 25 barcodes at login, the 18 that remain can
differ each time.
If anyone can help figure out why I am missing data in the cookie, I would
appreciated it. The cookie size is only 2k.
Here is the section of code i am using to create the cookie. Hopefully, I
did not make any typos when I retyped it.
while not rs.eof
response.cookies(cstr(rs("code"))) = "true"
response.cookies(cstr(rs("code"))).expires = dateadd("d",1,date)
rs movenext
wend
Here is the section of code i am using to view the cookie.
for each cookie in Request.cookies
if not request.cookies(cookie).haskeys then
response.write "<br>"
response.write cookie + " = " + request.cookies(cookie)
else
for each key in request.cookies(cookie)
response.write "<br>"
response.write cookie + "( "+ key + ") = " +
request.cookies(cookie)(key)
next
end if
next
View Replies
View Related