HighDots Forums  

Conditional region

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Conditional region in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zwi2000
 
Posts: n/a

Default Conditional region - 07-22-2004 , 11:14 PM






I have the following script that will display an image if the value of a
field in the database is = ''
I need to change it to display it if the value is NULL

<% if (StepsHistory.Fields.Item("LastModified").Value == ('')) { //
script %>
<a href="SetstartedSP.asp"><img src="../../../Images/greenarrow.gif"
width="12" height="11" border="0"></a>
<% } // if (StepsHistory.Fields.Item("LastModified").Value == (''))
script %>

How can I change it from '' to NULL ? .. I tried:

<% if (StepsHistory.Fields.Item("LastModified").Value == ()) { // script %>
<% if (StepsHistory.Fields.Item("LastModified").Value == (NULL)) { // script
%>
<% if (StepsHistory.Fields.Item("LastModified").Value == ('NULL')) { //
script %>

Non work ... I know its obvious I dont know how to write script, sorry is
not my strong side, I could use some help.

Z



Reply With Quote
  #2  
Old   
gwalt
 
Posts: n/a

Default Re: Conditional region - 08-04-2004 , 09:24 AM






To check for a null value use quotes surrounding a blank space as follows:

<% if (StepsHistory.Fields.Item("LastModified").Value = (" ")) { // script %>

Thx,
Mark

Reply With Quote
  #3  
Old   
RResWeb
 
Posts: n/a

Default Re: Conditional region - 08-04-2004 , 09:44 AM



You could also use

if (StepsHistory.Fields.Item("LastModified").ActualSi ze== 0

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.