Solved

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

Posted on 2004-10-05
5
107 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 500 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now