|
| |
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
Hyperlinking FP wit an If Else - 5/5/2003 22:59:35
Help, I can' t get this work, becides the obvious, its wrong , I am stumped. Any Ideas? <%If FP_FieldVal(fp_rs," M1" )>= 0 Then response.write " <a href=macklake.asp?M1=FP_FieldURL(fp_rs," M1" ) FP_FieldVal(fp_rs," M1" )</a>" Else response.write" " End If %> This is the error repsonse Microsoft VBScript compilation error ' 800a0401' Expected end of statement /Lakes/lakedetail.asp, line 299 response.write " <a href=macklake.asp?M1=FP_FieldURL(fp_rs," M1" ) FP_FieldVal(fp_rs," M1" )</a>" -----------------------------------------------------------^ Thanks Ryeman
_____________________________
May Your Boots Dry Quickly
|
|
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
RE: Hyperlinking FP wit an If Else - 5/5/2003 23:19:27
That did it Thanks Spooky
|
|
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
RE: Hyperlinking FP wit an If Else - 5/6/2003 21:29:07
Spooky, After slight modification I got the first one to work, the second one kept bommbing off. Something it didn' t like in the " Else" When I try to run the code 2 or 3 times like below I keeping getting error in the second exectution: " Microsoft VBScript runtime error ' 800a000d' Type mismatch: ' [string: " " ]' /Lakes/lakedetail.asp, line 301 Here is my code... <td width=" 27" height=" 27" > <%If FP_FieldVal(fp_rs," M1" )>= 1 Then response.write " <a href=" " macklake.asp?M1=" &FP_FieldURL(fp_rs," M1" )&" " " >" & FP_FieldVal(fp_rs," M1" )&" </a>" Else response.write " " End If %></td> <td width=" 27" height=" 27" > <%If FP_FieldVal(fp_rs," M2" )>= 1 Then response.write " <a href=" " macklake.asp?M2=" &FP_FieldURL(fp_rs," M2" )&" " " >" & FP_FieldVal(fp_rs," M2" )&" </a>" Else response.write " " End If %></td> <td width=" 27" height=" 27" > <%If FP_FieldVal(fp_rs," M3" )>= 1 Then response.write " <a href=" " macklake.asp?M3=" &FP_FieldURL(fp_rs," M3" )&" " " >" & FP_FieldVal(fp_rs," M3" )&" </a>" Else response.write " " End If %></td> Thanks Ryeman
|
|
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
RE: Hyperlinking FP wit an If Else - 5/7/2003 12:23:38
Spooky, [:j] Sorry I read your numeric statement as refering to the code above it... So something like this should work? <% DIM M1 M1=CInt(FP_FieldVal(fp_rs," M1" )) If M1>= 1Then response.write " <a href=" " macklake.asp?M1=" &M1&" " " >" &M1&" </a>" Else response.write " " End If %> I read some where that I can drop the " Else and " End If" because I am only testing if is true and doing something only if it is true. So this should work too? <% DIM M1 M1=CInt(FP_FieldVal(fp_rs," M1" )) If M1>= 1 Then response.write " <a href=" " macklake.asp?M1=" &M1&" " " >" &M1&" </a>" %> I am away from my home computer. Rethorical? Unless you see a flaw.
< Message edited by WIryeman -- 5/7/2003 12:25 PM >
_____________________________
May Your Boots Dry Quickly
|
|
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
|
|
|