Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

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 …
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. 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 :…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

776 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