NetTalk Central

Author Topic: Strange button behaviour in NT7  (Read 1775 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Strange button behaviour in NT7
« on: September 30, 2013, 10:54:21 PM »
Hey all,

I have a NT7 web server running for a client, and I have an OrderDetailForm NetWebForm on there which contains a button that prints a PDF report out.  The Procedure that creates the PDF report is called 'WebOrderReport'.

I have defined a button which calls the procedure 'WebOrderReport' and has the Parameters:

'ID=' & Clip(OHD:ID) & '&OrderNumber=' & Clip(OHD:OrderNumber) & '&tflag=' & Clock()

I have also defined the Target Frame as "_blank_" so it opens in a new window without affecting the open order screen.

When testing here in house, everything works OK, and when the new browser window is opened with the PDF order displayed, I check the URL at it is:

http://blah.com/WebOrderReport?ID=xxx&OrderNumber=nnn&tflag=nnnnnn

The problem is, on the live site, the button only works about 50% of the time.  Most of the time they press the button, they are getting a browser 'Page Not Found' popping up.  I asked them to send me a screenshot, and I noticed on the failing screenshots, the URL is:

http://blah.com/WebOrderReport?__Referer__=http%3A//blah.com/OrderDetailForm?ID=xxx&OrderNumber=nnn&tflag=nnnnn

I am not sure what is appending the "__Referer__" bit to the URL.  It appears to be the URL of the calling Order Details page.

What would cause NT7 to mangle the URL like this?  I initially thought that perhaps the PDF was not being generated, but I've checked the temp folder where the generated PDF files are stored, and it certainly looks like they are being created correctly.

At a loss as to where to start looking for the source of the problem.  Especially seeing as I cannot seem to replicate it here in house.

Cheers,
Devan

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: Strange button behaviour in NT7
« Reply #1 on: September 30, 2013, 10:55:40 PM »
Addendum:  I should point out that the site worked perfectly in NT6.  I recently recompiled using the NT7 templates after doing some enhancements to the site (not the button or this page), and the problems seems to have started since then.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Strange button behaviour in NT7
« Reply #2 on: October 03, 2013, 02:19:02 AM »
>> I am not sure what is appending the "__Referer__" bit to the URL.

NetTalk does this when they're using the IE browser, because IE doesn't use the Referer header field correctly when  opening in a new tab.
But it's just an extra value passed as part of the URL - the rest of your values look fine, so I don't think that's the problem.

what you probably want to do is put some logging code in the report procedure, to show when it started, what file it was creating, and if the report was successful (ie it contained anything) or not.

cheers
Bruce