Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Code to show an image if a field is blank ?

Posted 31 Jul 2001 11:28:08
1
has voted
31 Jul 2001 11:28:08 Kevin Coster posted:
I'm still using Drumbeat to finish off an app, and I can't get the "Create [source] ONLY if [target] column is empty" contract to work so. The other way round works fine though ie "Create [source] ONLY if [target] column is not empty". This is the code it generates:

function Image4_Server(html) {
ColValue = Pos_RS.GetColumnValue("Q4"
if (ColValue != null)
{
if (ColValue.toString() == ""
Response.Write(html)
}

Whats going on ?

Thanks in advance

Replies

Replied 01 Aug 2001 23:28:23
01 Aug 2001 23:28:23 Waldo Smeets replied:
Try this:

function Image4_Server(html) {
ColValue = Pos_RS.GetColumnValue("Q4"
if (ColValue != null)
{
if (ColValue.toString() != ""
Response.Write(html)
}

Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 20 Aug 2001 14:56:03
20 Aug 2001 14:56:03 Kevin Coster replied:
Yeah, I edited the code manually and it still didn't work ? The field type is "number" so I thought why not try:

function Image4_Server(html) {
ColValue = Pos_RS.GetColumnValue("Q4"
{
if (ColValue &lt;= ""
Response.Write(html)
}

and it now works, thanks anyway !

Kevin Coster

Reply to this topic