Calling URL with error message

NabucoNabuco Member Posts: 65
Hi all,
NAV2009SP1: When calling an URL it is sometimes (depending on user-rights) necessary to let them do the call, but with an error-message in the Internet Explorer.
How on earth do I pass this message on to the Explorer?

Anyone with the solution - thanks in advance.

Answers

  • Rishi1109Rishi1109 Member Posts: 43
    can you provide more details ?
    Thanks and Regards
    Rishi
  • NabucoNabuco Member Posts: 65
    It looks like this:

    URL := Gmail.com;
    HYPERLINK(URL);
    In some instances users should not be allowed to make this call to the internet. I wish the browser to show up with an error text provides by me and with a little guidance where it is allowed.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You can't display that error message in Internet Explorer. You'll need to display it in NAV, before executing the HYPERLINK-statement:
    IF NOT allowed THEN
      ERROR('Not allowed')
    ELSE
      HYPERLINK(URL);
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • vaprogvaprog Member Posts: 1,141
    If you want the error message show in the browser, replace the URL with one pointing to a pre-prepared error document.

    And by the way, 'Gmail.com' is not an URL, 'http://gmail.com/' is. If the former works, you are just lucky.
    (Or is the URL contained in a field named com in Table Gmail?)

    And, from your initial post I could not figure out what you wanted to do.

    And one additional thought: Is this the right way to do it? Shouldn't you (or rather the sysadmin) set up a filtering proxy instead?
Sign In or Register to comment.