Load Default Image
I am loading some images from my database,however some records don't contain any images. in these circumstances, instead of a blank space appearing,I would like to load a default image; how do I do this?
Is it something like?
Code:
If Len(rs.Fields("ImgPath1")) > 0 Then
View Replies
ADVERTISEMENT
The following code works fine for PC but not for MAC. It won't select the default image from the DB. When I check the DB there looks like there is Binary information there but nothing is displayed ....
View Replies
View Related
i have an asp script to load an image. baiscally if there is an image reference in the database i want it to load that image but if there is not ref in the database i want it to load a default image.the code i wrote is
<% if Image = ""
then
%>
<img src="catalogueimages/default.gif">
<% else %>
<img src=<%=Image%>>
<% end if %>
have also tried null instead of "" but that didnt work either.
View Replies
View Related
ive got a database that has some image references in it however i need a script for the image in the page so that if there is no reference to the image in the database a default one is shown
the script i have is
<% if Image = ""
then
%>
<img src="catalogueimages/default.gif">
<% else %>
<img src=<%=Image%>>
<% end if %>
i have tried changing the "" to Null but it still doesnt work.
View Replies
View Related
I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database.
Following is the code to list vehicles: ....
View Replies
View Related
1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page.
2.This '.tif' type image can be shown better with 'Kodak Image Control'.
3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page.
4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the
reason I don't get correct result).
5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control.
6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem?
For better understanding of problem I'm pasting a following code which I've tried up till now......
..................................................
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT LANGUAGE=javascript>
<!--
function showpic()
{
var path;
path = document.frmtif.path.value;
alert(path);
document.frmtif.ImgEdit1.Image =path;
document.frmtif.ImgEdit1.Display;
window.parent.self.open(path);
}
//-->
</script>
</HEAD>
<BODY bgColor=#ffe4e1>
<form name="frmtif">
The Image
<P>
<OBJECT id=ImgEdit1 style="WIDTH: 409px; HEIGHT: 218px" type="ImgEdit"
align=left
border=1 classid=clsid:6D940280-9F11-11CE-83FD-02608C3EC08A
name=imgtif></OBJECT>
<input type="hidden" name="path"
value="..MFTDRCMF919685173-62.tif">
<input type="button" name="show" value="Show" onclick="showpic();">
</P>
</form>
</BODY>
</HTML>
..................................................
View Replies
View Related
I am creating a dynamic ASP VBScript page, which gets data from an Access database.
In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database.
I think what I am trying to get to is the following:
If file exists (using URL from database to get location of image file) then
display image using the url from the database as the image source
else
display default image - hardcoded in program
endif
I have had a go and come up with the attached but I get an error with my if statement...
View Replies
View Related
if for list box, check box or radio button. in asp. how can i write to make it a default value??
View Replies
View Related
I'm using a binary stream to send down a file from the web server. I've been having trouble with IE and getting it to recognize my file. I've added the filename as a paramater(?filename=file.jpgw) to handle IE's mime type mangling, but I'm still having trouble with IE's default Save As Type being HTML. When we send down a jpgw (geo-jpeg) file IE wants to save it as an HTML file. I've got the correct filename showing in the Filename box, and if I choose the All Files option from the Save As Type drop down then the file is saved with the correct extension. I'd like to have the All Files option choosen by default. I know it's just a couple of clicks but we have some noivce users that can't seem to get that
View Replies
View Related
I wrote an application that generates reports.It then presents a page where
I click a button [javascript:print()] to open the print page. However, I
have a fixed printer and would like to know how to print to the default
printer without me clicking anything. So the page will just load up and
print. Or when I click a button. I just don't want the select printer screen
to pop up. Much similar to clicking the print button on top of the address
bar in Internet Explorer.
View Replies
View Related
my new site uses default.asp, instead of using index.asp. this is how my old site was done. now i get error 500. is this because it is trying to find index.asp or because my database isn;t workjing properly? i'm tired and being stupid i think. it's reall probably the database, but i just want to make sure in my sleep deprived state.
View Replies
View Related
I want to make it so that when the user is looking at a rendered ASP page
and they hit the ENTER key, one of the buttons on the form gets "clicked".
In other words I want for the user to not have to click on the button, and
just hit ENTER instead. How do I specify the button?
View Replies
View Related
This is the code for a combo box, and I would like to make certain value the default value, so that appears unless users select somthing else.
call rs.Open("SELECT * FROM Trim.dbo.luDecisionMaker ORDER BY DecisionMakerName" _
, myCon)
do while not rs.EOF
Response.Write("<OPTION value=" & rs("DecisionMakerID"))
if rs("DecisionMakerID") = nDecisionMaker then
Response.Write(" selected")
end if
Response.Write(">" & _
rs("DecisionMakerName") & "</OPTION>" & Chr(10))
rs.MoveNext
loop
rs.Close
It comes from a table and has PropertyDetailsID(1,2,3,4) and PropertyDetailsname(Fee, 5,10,Other) and for example "Fee" needs to be the dafault value.
View Replies
View Related
If a new user is added to the database through a webform, and they would usually have immediate access to member only services, is there a way to make them nonactive in a MS access db until an admin activates them?
View Replies
View Related
I am wanting to compress/zip a file up on the server and email it. Is there a default component that should be installed on the server that will compress/zip files? If not is there FREE ones that anyone would suggest?
View Replies
View Related
with "select @@IDENTITY" i get the value of the last field insered.. i would
like to get also the field.name
View Replies
View Related
Is it possible to add a default include file to every ASP-page servered on IIS? So I do not have to modify every page.
View Replies
View Related
How do I make a value the default value for a combo box in ASP 3.0?
What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but not if I use it in a ASP 3.0 app.
<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>
View Replies
View Related
Using a DetailsView to update data in SQL 2005, How do I change the default "Update" hyperlink to a more user friendly button?
View Replies
View Related
I need a string of code that will allow me to eliminate,exclude,or ignore the default values that are sent in my web form.It is an order form that has hundreds of items.The items not selected show up looking like this in my email box.
ANCPW122=0
p1E1=0.00
ANCPW182=0
p1E2=0.00
ANCPW183=0
p1E3=0.00
ANCPW242=0
p1E4=0.00
and I have to sort through all of them to find the few selected.can any one tell me with some type of loop to eliminate the values returning 0 or 0.00.
View Replies
View Related
i set up iis 5.0 on my local machine(win2kpro) (on a pvt LAN) at the default port. when i try to access asp it gives http 500 error. i have been able to configure cgi scripts but asp still doesnt work.
View Replies
View Related
I have two drop down lists on one of my pages.One of the them lists all the MONTHS in a year, second one list a number of years starting for 2004. Users couldn't be bothered selecting that every time they are filling it in for submission, so they want me to popolute the two fields with the current month and the year automatically.
Plus the month has to be selected as a current month up to the 7th of every month,on the 7th it changes to the correct month. of basically if date is < 07/08/2004 = July.
View Replies
View Related
I need to display (and use as a hidden field) the date on a page. How do I change if from MM/DD/YYYY (e.g. 12/25/2004) to 25/DEC/04 . I'm putting it into an Oracle date field and it doesn't like the date in the first format.
View Replies
View Related
Is there available some list of COM components available to ASP pages, that are available on virtually every IIS machine?
I am wondering wether there is some right-away-available API with cryptogrphy functions. The particular function I need is MD5 hash estimation for files. I have one written in JScript, but it would be very slow for larger files.
View Replies
View Related
Is it possible to reset a SQL field to it's default setting? For example, someone changes FIELD1 to "John Doe" and the the default is "YOUR NAME". Can I reset it back to "YOUR NAME" somehow?
View Replies
View Related
I am getting the above error message on a non-default website. But, default.asp and other asp files work properly. There are few asp files which are residing on this non-
default website created by our application folks, and it is not working.
Server Details
Win2k SP4
IIS 5.0
URLSCAN is installed
C2 Security Settings implemented on the server.
let me know what could be wrong.
View Replies
View Related
I can convert an image that is retrieved from a FileUpload object into a byte array and insert it into the database..
When the user signs-up i wish tosimply insert into the Picture (DB Type = Image) field to an image i already have saved in my images folder?
Anyone know of a way to do this? Tutorials, articles or advise??!
View Replies
View Related
Is it possible to load a DLL in an ASP page? I know that we can create instances of COM/ActiveX objects using Server.CreateObject, but what about a normal DLL stored on the system. Is there a way to load such a DLL and call its functions?
View Replies
View Related
I got the following error when access an asp page.
Response object error 'ASP 0185 : 8002000e'
Missing Default Property
/downtime_category-old2.asp, line 0
A default property was not found for the object.
View Replies
View Related
I have 3 text fields in an Access db with each some default values.
I have an edit page where user's can edit those fields. The problem am having is if for instance I empty the field in the edition page, since am not allowing null or empty in them, when I save of course I receive an error telling me that this field is not allowing empty value.
Now what I would like to be able to do is this, when I save I'll check If the request.form("thefield") is empty, if so then instead of saving the empty value I want to return to the default value set in the db.
View Replies
View Related
I have setup an IIS 6 server and I am trying to migrate a pretty basic website to it. It will display any ASP page that I set as the default page, but gives a 404.2 for any
other ASP pages that I link to.
What am I missing?
View Replies
View Related
By default, Weekday setting starts on sunday which is 1. How can I change to
use Weekday to start on monday?
View Replies
View Related
All I want to do is set a session variable in my default page which points to a directory on my server where all media for my site is contained. Now, I used a session variable to do this, and fell into a trap. Say I set it up like this:
Session("mediadir")="D:dev<sitename>media". Now, when anyone looks at my site, the mediadir variable is trying to point to their d:dev.... What should I do. I know it is crazy, but I have mental blank.
View Replies
View Related