a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

If statment, IS NULL problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> If statment, IS NULL problem
Page: [1]
 
aaronwiles

 

Posts: 200
Joined: 7/5/2004
From: Aaron Wiles
Status: offline

 
If statment, IS NULL problem - 8/25/2004 17:40:57   
Could anyone tell me why the "RUN CODE" section below will not display on the page.

The idea is if the user has selected to turn on this option or it has never been set then to display the line of code. Any comments?

<%
If rsMySettings("DisplayDOB") = "n" OR rsMySettings("DisplayDOB") IS NULL Then

RUN CODE

End If
%>

_____________________________

You really never learn to swear until you get a computer.
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: If statment, IS NULL problem - 8/25/2004 17:46:39   
Try this :

If rsMySettings("DisplayDOB") = "n" OR len(rsMySettings("DisplayDOB")) =0 Then

Otherwise, write the value of "DisplayDOB" to see what the actual result is

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to aaronwiles)
aaronwiles

 

Posts: 200
Joined: 7/5/2004
From: Aaron Wiles
Status: offline

 
RE: If statment, IS NULL problem - 8/25/2004 20:44:29   
Unfortunitly that didn't work Spooky I have tried...

<%= Response.Write("BEFORE") %>
<%= rsMySettings("DisplayDOB") %>
<%= Response.Write("AFTER") %>


...resulting in "BEFOREAFTER", I checked the HTML source to be sure. I have also tried...

<%
TMP = rsMySettings("DisplayDOB")
If len(TMP) = "0" Then
Response.Write("TEST DOB")
End If
%>


...nothing came out on screen or in the HTML source.

Surely it can not be so hard to check agains't a field of which has no value. I have a number of pages I need to do this on am am a little stuck with this as you can see. Any other ideas anyone?

_____________________________

You really never learn to swear until you get a computer.

(in reply to Spooky)
aaronwiles

 

Posts: 200
Joined: 7/5/2004
From: Aaron Wiles
Status: offline

 
RE: If statment, IS NULL problem - 8/25/2004 20:48:45   
...and I don't suppose you have a suggeston on how to stop my forms erroring everytime I input the ' charactor?

I thought this may have worked server.HtmlEncode(Request.Form("message")) but I was wrong & besides surely that would encode it, but how would I decode it when displaying on a page?

Thanks

_____________________________

You really never learn to swear until you get a computer.

(in reply to aaronwiles)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> If statment, IS NULL problem
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts