Alpha Video Training
Results 1 to 4 of 4

Thread: Problem with ampersand in a url address?

  1. #1
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,783

    Default Problem with ampersand in a url address?

    I am using a url to point to and display a text file. When the name of the text file does not contain an ampersand, it works; when it does contain an ampersand, it does not work.

    I am thinking this is because ampersand is special to url's

    I am looking for advice on what I need to do though to display the text files that do have ampersands in their names.
    Gary S. Traub, Ph.D.


  2. #2
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: Problem with ampersand in a url address?

    Hi Gary,

    Quote Originally Posted by drgarytraub View Post
    I am using a url to point to and display a text file. When the name of the text file does not contain an ampersand, it works; when it does contain an ampersand, it does not work.

    I am thinking this is because ampersand is special to url's

    I am looking for advice on what I need to do though to display the text files that do have ampersands in their names.
    You actually have file names with ampersands? Hasn't it been drummed into people's head to stay away from special characters in fieldnames, filenames etc (including spaces). It just leads to a whole bunch of headaches.

    That said, you want to use URLENCODE() and URLDECODE() to encode all the special characters for arguments in a URL line. They are available in A5v9 and up.
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



  3. #3
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,783

    Default Re: Problem with ampersand in a url address?

    Hi Ira,

    Yes, it has "been drilled in", but this one very old file name has not been modified.

    And, I have already tried urlencode and it did not work. I am probably doing something wrong there.

    After writing this message though, I did come up with a different way around this. I will write code to first copy the file to the session folder removing the ampersand from the newly created file name, and then response.redirect to that new file.
    Gary S. Traub, Ph.D.


  4. #4
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,783

    Default Re: Problem with ampersand in a url address?

    Hi Ira,

    The file copy method I described works, but I still needed to use urlencode. Thanks for your input!
    Gary S. Traub, Ph.D.


Similar Threads

  1. Ampersand symbol and Browses
    By Alastair in forum Alpha Five Version 9 - Desktop Applications
    Replies: 8
    Last Post: 12-11-2008, 02:23 PM
  2. I want an & (ampersand) on a button
    By davej in forum Alpha Five Version 7
    Replies: 19
    Last Post: 11-05-2006, 08:53 PM
  3. URL Field Problem
    By Alastair in forum Alpha Five Version 7
    Replies: 8
    Last Post: 06-28-2006, 08:50 AM
  4. Sessionid in URL a problem
    By Brett in forum Web Application Server v7
    Replies: 4
    Last Post: 01-20-2006, 03:22 PM
  5. Ampersand Aesthetics
    By Ken L Herrold in forum Alpha Five Version 4
    Replies: 1
    Last Post: 10-13-2003, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •