OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

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

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
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

 

If then statement

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

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

All Forums >> Web Development >> ASP, PHP, and Database >> If then statement
Page: [1]
 
dschmuecker

 

Posts: 158
Joined: 10/27/2003
Status: offline

 
If then statement - 4/6/2004 20:18:49   
<%If left(FP_FieldVal(fp_rs,"details", 4) = "http" then
Response.write("<a href=" & FP_FieldLink(fp_rs,"details") & "/a>")
Else
Response.write(FP_FieldVal(fp_rs,"details")
End if%>
I'm having trouble with this statement. It must be in the syntax. I want to turn a field (it's a memo field) into a link if the first 4 letters start with http.
Can anyone help. It says this page can't be displayed.
Spooky

 

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

 
RE: If then statement - 4/6/2004 21:58:37   
Try this - if not, whats actually going on when you try it?

<%
If left(FP_FieldVal(fp_rs,"details", 4) = "http" then
Response.write ("<a href=""" & FP_Field(fp_rs,"details") &""">Link text</a>")
Else
Response.write(FP_FieldVal(fp_rs,"details")
End if
%>


_____________________________

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

Sp:)ky


(in reply to dschmuecker)
BeTheBall

 

Posts: 6493
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: If then statement - 4/7/2004 0:28:10   
I believe the first line should be:

If left(FP_FieldVal(fp_rs,"details"), 4) = "http" then

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to Spooky)
Spooky

 

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

 
RE: If then statement - 4/7/2004 0:31:27   
Its midnight over there - Im supposed to be more alert than you :)

_____________________________

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

Sp:)ky


(in reply to BeTheBall)
dschmuecker

 

Posts: 158
Joined: 10/27/2003
Status: offline

 
RE: If then statement - 4/7/2004 0:54:50   
Didn't seem to work. I get a HTTP 500 - Internal server error
Internet Explorer "The page cannot be displayed" message. It works with just a straight detail result. It's a pesky problem. This is for a curriculum site I'm making for teachers at my school.

(in reply to BeTheBall)
Spooky

 

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

 
RE: If then statement - 4/7/2004 1:11:45   
IE > tools > options > advanced > DONT show friendly http errors

_____________________________

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

Sp:)ky


(in reply to dschmuecker)
Spooky

 

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

 
RE: If then statement - 4/7/2004 1:12:59   
<%
If left(FP_FieldVal(fp_rs,"details"), 4) = "http" then
Response.write ("<a href=""" & FP_Field(fp_rs,"details") &""">Link text</a>")
Else
Response.write(FP_FieldVal(fp_rs,"details"))
End if
%>

_____________________________

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

Sp:)ky


(in reply to Spooky)
dschmuecker

 

Posts: 158
Joined: 10/27/2003
Status: offline

 
RE: If then statement - 4/7/2004 8:59:08   
It works! Thanks Spooky. Your a legend.

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> If then statement
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