Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting images into response.write in aspmailer.asp

Status
Not open for further replies.

karenken

Technical User
Oct 16, 2001
9
US
When the user clicks submit, I am returning a page that says thank you, we'll be in touch shortly. I'd like to be able to display the logo at the top of the page. I've used this code to do it, but it errors out. It says it is looking for ')'.

response.write(&quot;<div align=&quot;center&quot;><img src=&quot;images/logos/primary.gif&quot; alt=&quot;logo&quot;> <img src=&quot;images/logos/logo.jpg&quot; alt=&quot;Primary Sources&quot; width=60 height=75> <img src=&quot;images/logos/sources.gif&quot; alt=&quot;Primary Sources&quot;>&quot;)

Also, can I use font tags in response.write statements? I'd like to give the receipt page the same look as the rest of the site. I'm using a stylesheet for the rest of the site. Is there someway I can plug it into the asp file?
 
Can anyone answer this question? Will response.write work or is there another method I can use to display the logo on the receipt page?
 
Karen,

Sorry for the delay. All of those double quotes is making me dizzy.. And it's making your server dizzy too. You see, the server is ending your Response.Write with the second set of double quotes in the string and doesn't see the closing parentheses before that. Here's your fix.
Code:
response.write(&quot;<div align='center'><img src='images/logos/primary.gif' alt='logo'> <img src='images/logos/logo.jpg' alt='Primary Sources' width=60 height=75> <img src='images/logos/sources.gif' alt='Primary Sources'>&quot;)
Replace all your double quotes inside the r.w method with single quotes like I have done, leaving your outside double quotes as is. There's another solution in that you can replace all of your double quotes inside the r.w method with double/double quotes. But to me, that's very hard to look at. This would work also.
Code:
response.write(&quot;<div align=&quot;&quot;center&quot;&quot;><img src=&quot;&quot;images/logos/primary.gif&quot;&quot; alt=&quot;&quot;logo&quot;&quot;> <img src=&quot;&quot;images/logos/logo.jpg&quot;&quot; alt=&quot;&quot;Primary Sources&quot;&quot; width=60 height=75> <img src=&quot;&quot;images/logos/sources.gif&quot;&quot; alt=&quot;&quot;Primary Sources&quot;&quot;>&quot;)
That would write the HTML to the browser with actual double quotes, like you originally intended. The latter would write the HTML to the browser with single quotes, which would work just as well.

Hope this helps.. :)

ToddWW
 
Thanks Todd. This worked! I really appreciate your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top