Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Why doesnt this work?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Why doesnt this work?

 Post Reply Post Reply
Author
Dazz View Drop Down
Newbie
Newbie
Avatar

Joined: 24 January 2003
Location: United Kingdom
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dazz Quote  Post ReplyReply Direct Link To This Post Topic: Why doesnt this work?
    Posted: 25 April 2003 at 9:43am

I want to display an image for an e-mail link if the person who signed my guestbook gave an e-mail address I wrote the script bel;ow but it does not work it just displays the image whether there is an e-mail address or not. Why doesnt this work?

If rsGuestbook("Email") = "" THEN Response.Write (" ") ELSE Response.Write ("<a href=""" & rsGuestbook("Email") & """><img src=""images/email.gif"" width=""100"" height=""20""></a>") END IF

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2003 at 10:01am
what happens if you do RESPONSE.WRITE(rsGuestbook("Email") ) before your if statement, if the isnt an email address for that user. i.e is there nothing?

Edited by ultramods
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2003 at 11:01am

ummm i dunno wot "ultramods" was on about

but try puttin the "Response.write()" on the next line, and then the "end if" on another

i think it affected sumfin i did once

also if you get an error message try showing us it

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 25 April 2003 at 11:53am

"ultramods" was on about whether a user that was suppose to have no email address may actually have something stored in the email field for their record in the database. which would cause "If rsGuestbook("Email") = "" " not to work. I think its called testing-starting from the top and working down. If that test failed then another could be carried out.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.