Is it possible to call a VB6 COM+ object on the click of a button or image in classic ASP without submitting the form to the server?
An example: I have a form with a person's name and address all filled out. I want the user to click a 'Save' image (or button) which instantiates a COM+ object and passes the form data to the COM+ object which writes it to the database, all without submitting the form to the server.
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...
I'm doing a content management system, whereby the user can enter the HTML code for a currency symbol, eg £ for £.y . when I bring this data backup, say they want to edit the settings, then my ASP/HTML page is rendering the HTML code, eg £, rather than showing the original value, eg £.
If for example I put a space between the '&' and the 'pound;', eg & pound; then this will cause me problems because the user will think that they have to a put a space in or they file it with the space, which means the HTML code won't work any more. Is there a way round this?
I can retrieve the correct Access database record (based on user identification) which has an OLE Object type field with an embedded Word document.How do I make the Word document display automatically without further input from the user?
I'm sure I'm missing something completely obvious, but I can't figure out what. I have a path to an image file stored in a database. I'm trying to align the image to the right, but nothing seems to be working:
I have ASP (classic) code that writes out a table and sets the <img....> tag with a virtual directory source, e.g. src='/test/imghold/xyz.png', and the images do not appear on the IE page. The code is from a production site that works fine.
We just duplicated the web site to one named test and now the images do not display. The IMG item is in a TD element of a table. Also, I looked at the "view source" of the page and it shows the <IMG src='/test/imghold/xyz.png'...> just fine. I even tried it with different images and none of them show up.
It is not displaying the image thepicture. It is in the directory. I also have a similar bits of code for a other pictures with of and they is working The response write displays the correct reference.
The alt displays instead of the image as though the image has not been found and as I said the Code:
I have two folders in inetpub/wwroot. One has all HTML code, the other has HTML & ASP pages. The pure HTML files show up in IE6 just fine. The other pages just say done with a blank page. I had servral files that were ASP pages but only had HMTL code and changed the extension to HMTL and still get blank pages. Not sure why these pages do not display but the other directory does.
Both folders have the same rights configuration (scripts & executables). I am using IIS 5.1 on XP SP2 machine and I Have all updates installed. If I open these sites in FrontPage they both work fine. I guess FrontPage handles the code itself and does not use IIS. I am tryint to relearn my ASP & HTML and I need to get this working,
I have an application which sends out emails in HTML format. I have a problem when I am trying to display images in the email (name of the image file is taken from database).
The problem is that if there is a space in the image file name, it displays a + (PLUS sign) and does not display the photo in GMAIL and other emails. The URL of the image gets displayed in the following manner:
I have to display tif images using .asp page. I have tried to read the image as a binary file and stream it to the browser. The relevant code is as follows. Unfortunately, the display on the browser is a lot of gobledygook. How can I ensure that the image displays correctly in the browser? Code:
The pic in the DB is just a named reference, as all the pics are stored in 2 common folders. 1 for the normal size pics and 1 for the thumbnail equivalents.
As this particular page has to be tight on space, I wanted to set the image as a percentage of it's size so I set the following:
Problem I have with this is that the browser seems to set all pics to 1 common percentage size rather than each being say 30% of each individual pic's size. This results in some piccies being completely distorted.
I don't want to go down the route of storing the x and y of each pic in the DB, so could you please let me know if I am doing something really stupid with the above.
I am trying to send an email from an asp page in html format unfortunately when parenthese appear in the HTML code of the page to be emailed the ASP page reads them and trys to interpret them as ASP code
I created a web form in html, I need to create a server-side script using ASP and embed it into the html, so that when the user clicks submit, it sends(saves) the data from text boxes, drop-downs etc, to a text(.txt) file on the server. It needs to be in csv format so that they can create an excel file from it.
I dont know if this is the right place to ask this but I have a database which contains shop details, each of which can have several images associated with it. In the database I am just storing the image paths, the actual images are held on a remote server.
I am able to grab the pathnames from the database and then use the following code to loop through the recordset displaying the associated image(s).
While NOT rs.EOF Response.Write("<img src=""servernameImages" & rs.Fields(0) & """ width=""150"" height=""150"">") rs.MoveNext
My question is, in the event of one of the images not being found, it just displays a red cross, is there any way of testing to see if the image exists before I try and display it?
I used to have some static htm files which used to display data. There is a calling asp file which used to do something like below
if Request.QueryString("PageName").count = 0 then strPageNameHtm = "toc.htm" strPageNameInc = "toc.inc" else strPageNameHtm = Request.QueryString("PageName") & ".htm" strPageNameInc = Request.QueryString("PageName") & ".inc" end if strPageNameHtm = server.mapPath(strPageNameHtm)
strPageNameInc = server.mapPath(strPageNameInc) 'response.write(strPageNameHtm) set fs = server.createobject("scripting.fileSystemObject") set f = fs.openTextFile(strPageNameHtm) strSPDHtml = f.readall
The strSPDHTML info used to be displayed using a response.write(strSPDHTML). This allowed the static content to be loaded up.
I switched the static pages to be asp pages having the content come from a database. I would still like to maintain the controlling page logic. Can I modify the above section of code in anyways to access the asp page content
I wish to display an image from a folder based on the name held in a field in a database.
<% If len(rssal("picture"))>0 then Response.Write ("<img src=""/ProductImages/rssal("ProductCode").gif"">") ELSE Response.Write ("<img src=""images/sorry.gif"">") END IF %>
CDO is perhaps the most obscure art in web programming, but I hope someone would understand my issue. I have an ASP web application that needs to send email messages in HTML format only -- there is no plain text version. The messages are summaries of answers that people have input into an online survey, and need to have a tabular form.
The following somewhat plausible code does not work:
dim OMsg Set OMsg = Server.CreateObject("CDO.Message") OMsg.Fields("urn:schemas:mailheader:return-path") = BounceEmail OMsg.Fields("urn:schemas:mailheader:content-type") = "text/html" OMsg.Fields.Update
The return path header is set as desired, but the content type header stubbornly defaults to "text/plain". What is the secret to setting that header?
I have seen lots of code examples on the MSDN site for setting the content-type of body parts, but it seems needlessly complicated for my situation and doesn't work on my system anyhow (unknown ProgID error). So I was hoping to just set the message-level header to "text/html". (If I edit one of the messages from my script in notepad, changing the header to text/html by hand, it then is rendered correctly in email clients.)
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good for multiple page faxes. I have not been able to locate an example to load in the browser or how to handle multiple image in the one column. Code:
I am currently attempting to convert from PHP to ASP and I am having some difficulties.
Foremost, from my PHP page I have pages that reference HTML source code from a remote page, write it to a local page and then displays it. I haven't been able to find any way to display this HTML source anywhere.
I have purchased a form processing script, which basically saves the data into a database, emails certain people's email addresses with the form results, and also sends an email to the user that filled in the form with a thank you email.
However, all the emails are being sent in plain text format. I would like to change this to HTML so I can make the results look nicer and also make the thank you email look nicer.
I have emailed the script developers, but have yet had a response from them, so i thought id put a post on here!
I have found the part of the coding that sends the Thank You email out to the user once they have filled in the form:
'/// Send Autoresponse if replyto<>"" and (autoresponse<>"" or sendcopy<>"") then if sendcopy<>"" then autoresponse=autoresponse & vbcrlf & vbcrlf & message call sendmail(replyto,mailadmin,formname,autoresponse) end if end if .......