Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-10-05
5
Medium Priority
?
113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

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…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to insert an Iframe into 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 : Open Page or Post…

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