Follow Hyperlink

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ARC

    Follow Hyperlink

    Hello all,

    I'm trying to put a buy button in my app, and using the follow hyperlink
    command.

    If I take the address below and copy/paste into IE, it correctly adds the
    item to the shopping cart. However, if I use the statement below on a
    button, it opens the page, but says "There are no items in your shopping
    cart".

    I wonder if it's getting hung up on the special characters like the ? or the
    &?


    Application.Fol lowHyperlink
    "https://www.keysecure.c om/pcesoft.com/cart.cgi?item=I BILL01&cart=pce softshopping"


  • jonceramic

    #2
    Re: Follow Hyperlink

    On Sep 25, 11:20 am, "ARC" <PCES...@PCESof t.invalidwrote:
    Hello all,
    >
    I'm trying to put a buy button in my app, and using the follow hyperlink
    command.
    >
    If I take the address below and copy/paste into IE, it correctly adds the
    item to the shopping cart. However, if I use the statement below on a
    button, it opens the page, but says "There are no items in your shopping
    cart".
    >
    I wonder if it's getting hung up on the special characters like the ? or the
    &?
    >
    Application.Fol lowHyperlink
    "https://www.keysecure.c om/pcesoft.com/cart.cgi?item=I BILL01&cart=pce s..."
    &'s are sometimes interpreted to mean you're going to define which
    letter is a default alt-key combo.

    You could try replacing with the %xx equivalents. (i.e. %20 = space.)


    Or, you could have a security setting set that's stopping you.

    Jon

    Comment

    • ARC

      #3
      Re: Follow Hyperlink

      Thanks, Jon.

      I actually stumbled upon a solution. If I use the Shell command rather than
      followhyperlink , it works fine.

      Such as:
      General Declarations
      ----------------------
      Public Declare Function ShellExecute Lib "shell32.dl l" Alias "ShellExecu teA"
      (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String,
      ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As
      Long) As Long

      Public Const SW_HIDE = 0
      Public Const SW_SHOWNORMAL = 1
      Public Const SW_SHOWMINIMIZE D = 2
      Public Const SW_SHOWMAXIMIZE D = 3
      Public Const SW_SHOW = 5



      Public Function FollowBuy() As Boolean
      On Error Resume Next
      Dim addr As String
      addr =
      "https://www.keysecure.c om/pcesoft.com/cart.cgi?item=I NSCUSTDEV&cart= pcesoftshopping "
      ShellExecute 0, "open", addr, 0, 0, SW_SHOWNORMAL
      'retval = Shell(addr, 1)
      End Function





      Comment

      Working...