Brian Hancock wrote:
I should have jumped in and added this comment earlier,
if you have a browser with a _javascript_ console you can quickly and accurately ESCAPE a query string.
Evaluate this is the _javascript_ Console

prompt("",escape("query string"))
Great tip, Brian. You don't even need a _javascript_ console to do this, though. Just type

  _javascript_:escape(prompt("What would you like escaped?",""))

into the address bar of any _javascript_-capable browser, and press ENTER. Type your text into the resulting dialog box, and then copy the escaped text from the resulting "web page."

You can bookmark it and put it on your browser's quick-links toolbar, too.

Notice that I've re-jiggered what you did so that the text-to-be-escaped is typed into the dialog box, rather than having it inside double-quotes in the _javascript_ code. This has two advantages: you don't have to escape any double-quote characters in your text, and it works better as a bookmark that way.

==========

Brian is very web-savvy, so he probably already knew all that but just didn't think of applying it to this problem. But those of you who don't already know about it, you might find the following explanation interesting.

_javascript_: is just another protocol many browsers support in addition to http: and ftp: and about:blank. I probably shouldn't have said it works in "any _javascript_-capable browser", however. Although it works as I've presented it in every version of Internet Explorer and Mozilla/Firefox that I've ever tried, it requires a lot more overhead to get it to work in Mac OS Safari. I can't speak for any other browsers.

What follows the _javascript_: is any _javascript_ _expression_. When you "go" to that URL, the browser runs the _javascript_ code, and the resulting value is rendered as a web page. You can actually test small snippets of HTML that way. For example,
  _javascript_:"<html><body><h1>Wow!</h1>Who knew I could write <small>small</small> web pages in my <em>address bar</em>?!</body></html>"
You can also use it as simple calculator. Quick, what's the area of a circle with a radius of 3.5 cm? Well, pi times r squared, of course:
  _javascript_:Math.PI * Math.pow(3.5, 2)

=thom
"The problem with cats is that they get the exact same look on their face whether they see a moth or an axe-murderer."  --Paula Poundstone




eg

prompt("",escape(" http://www.blogs.com/my silly website/What the $%^&!!.html "))

You can Copy Ctrl-C the escaped url from the prompt box.

Similarly you can unescape( ) an escaped string.

Regards
Brian



----- Original Message ----- From: "Christopher Dunn" <[EMAIL PROTECTED]>
To: "DataPerfect Users Discussion Group" <[email protected]>
Sent: Friday, December 29, 2006 6:40 AM
Subject: Re: [Dataperf] Catenating rv's


My 2 cents, I think the 2nd url needs to be encoded as below, since its a parameter of the first URL (and not part of it)

http://www.sanbachs.net/cgi-bin/count/countr.cgi?Name=URLv0158&Refer=http%3A%2F%2Ftravel.ian.com%2Findex.jsp%3FpageName=hotInfo%26cid=131241%26hotelID=114446

i.e., the following changes after the first ?

:    %3A
/    %2F
=    %3D
?    %3F
&    %26


Hope that helps



Tony Perez wrote:
Thanks, Ralph, for your prompt reply.

I am trying to produce a link that counts a click-through from
knowmexico.com to a vendor's website and land's our user on a hotel specific
page on a hotel brand's website.

rv20 is a text string that is Sanbachs.net count incrementor. Part of its
mechanism has the "Name=" html function

rv21 is the property's image file # (a GZZZ9 field) in our database which is
needed to increment the click-through in a counting program Bruce Conrad has
developed for our website. Using apply.format["GZZZ9";PxFx] produces a space
in a 3 digit image file #. I've now changed it to apply.format["G9999";PxFx]
which produces a 0 in front of a 3 digit image file #. This is consistent
with Bruce's counting mechanism.

rv22 is another text string

rv23 is a field in our database that is the link to the hotel specific page
on the hotel brand's website. In this case it also contains the "Name=" html
function.

rv24 catenates rv20, rv21, rv22 and rv23.

It yields the following:

<a
href="" class="moz-txt-link-freetext" href="http://www.sanbachs.net/cgi-bin/count/countr.cgi?Name=URLv0158&Refer=ht">http://www.sanbachs.net/cgi-bin/count/countr.cgi?Name=URLv0158&Refer=ht
tp://travel.ian.com/index.jsp?pageName=hotInfo&cid=131241&hotelID=114446><b>
<font color="navy">Check out special rates at</font> <img src=""
width=210 height= 74 align=middle></b></a>

The link breaks and does not recognize the text between
"URLv0158&Refer=http://travel.ian.com/index.jsp?pageName=". It never goes to
the vendor's website.

Any suggestions are very welcome.

All the best,
Tony



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ralph Alvy
Sent: Tuesday, December 26, 2006 8:19 PM
To: DataPerfect Users Discussion Group
Subject: Re: [Dataperf] Catenating rv's


What are you trying to do? Example?

On Tuesday 26 December 2006 20:10, Tony Perez wrote:

Hello all ... Happy Holidays ...

I thought rv's could be catenated into an rv to output a text string. Is
this correct? If so, I must be doing something wrong. Look forward to
comments.

All the best,
Tony


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to