Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Calculating URL and Opening Link in Pro 7 Developer

Status
Not open for further replies.

gurs

Technical User
May 19, 2002
12
0
0
US
I have a script that takes the contents of the “Brand” and “Model” fields from the “Products” table and formulates a URL for a Google search. It them sets the “gWeb” field from the “Products” table equal to this URL and opens the URL contained in gWeb. Unfortunately, it doesn’t work – FMP adds an extra character to my URL!

Here is the calculation that I use to formulate the URL:
"&Products::Brand
&"+"
&Products::Model
&"&btnG=Search"

So, if Brand=Ford and Model=Freestar, the URL should look like this:

This URL yields a valid Google search (try it yourself). And when the “Confirm URL” dialog box comes up, this is exactly what the URL looks like. BUT, when I click OK, the address that ends up in my IE address bar is:

Notice the extra slash (“/”) after the “.com”. Needless to say, that is enough to render the URL useless. I have also tried running this without the Confirm URL dialog, same result. I have other scripts doing the same thing for other search engines, and I have the same problem with others (but not all of them). For example, Yahoo shopping also has the problem, but the Price Grabber URL gets entered and accessed correctly.

Any ideas? Any other way to accomplish this goal? Thanks!
 
Just solved my own problem. This is a known bug in FMP 7. But, by changing the calculation of the URL so that the "/" after the ".com" becomes a "\", FMP no longer inserts the extra slash and the links work fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top