Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UNABLE TO COMPARE STRINGS 500POINTS. URGENT.. THANKS.

Posted on 2004-10-05
5
Medium Priority
?
114 Views
Last Modified: 2013-12-24

Hi FP guys, I posted this question in the asp forum, but unfrotunatley they were not able to help since they dislike a lot of things about frontpage, since this is the frontpage forum i figure this is the correct place to post.

here is the link, plesae do post the comments in this forum. thanks.

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21156774.html
0
Comment
Question by:Ricky11
  • 3
5 Comments
 
LVL 14

Accepted Solution

by:
hhammash earned 1500 total points
ID: 12236505
Hi,

I think you have to approach the matter in a different way.

1- Create a variable for the value of the Frontpage field
2- Compare "A" to the value of the variable that you have created
3- Try using RTrim instead of Trim
4- Check your data entry,  the space here comes from the data itself.  When you trim it does nothing.  I meant the difference between "OB " and "OB".

Would you please post the code of your dieted FrontPages DRW?

Thanks
hhammash
0
 

Author Comment

by:Ricky11
ID: 12236603
Okay So it is nothing to do with the trimming now, as now both the value of a and the value of b are surely the same but it still will not execute.
<%t = 1 %>
<%a = rtrim(Request.QueryString("firstofsize"))%><br>
A IS, <%=A%><br>
<BR><br>
<%For t = 1 to 6 %>
<% b = RTRIM(FP_FieldVal(fp_rs,"size" & t )) %>
B IS <%=trim(b)%><br>
 <%response.write  (FP_FieldVal(fp_rs,"size" & t )) & "<BR>"
 If rtrim(a) = rtrim(b) Then

     Response.write "*FOUND*"
  Else
    response.write " NOT FOUND "
  End If
Next%>
0
 

Author Comment

by:Ricky11
ID: 12236614
The question is, is it possible to comapre 2 variables when both of the variable contain ' " ' inside the string?

i.e.

A = 72X90"OB
B = 72X90"OB

DOES A = B?
0
 
LVL 12

Expert Comment

by:rcmb
ID: 12236661
A = rtrim(Request.QueryString("firstofsize"))%

B = RTRIM(FP_FieldVal(fp_rs,"size" & t ))

From what I see the code is working because A will never = B because A=something and B=something & t.


try this:

<%t = 1 %>
<%a = Request.QueryString("firstofsize")%><br>
A IS, <%=A%><br>
<BR><br>
<%For t = 1 to 6 %>
<%a = Request.QueryString("firstofsize") & t%><
<% b = fp_rs("size") & t %>
B IS <%=b%><br>
<%
response.write  (FP_FieldVal(fp_rs,"size" & t )) & "<BR>"
 If A = B Then
     Response.write "*FOUND*"
  Else
    response.write " NOT FOUND "
  End If
Next%>

RCMB

0
 

Author Comment

by:Ricky11
ID: 12236729
this is probably the problem with the quotation..

i have posted anotehr question here

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21157828.html
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question