NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on March 27, 2014, 08:31:55 AM

Title: NoHeader and the header is still there
Post by: Alberto on March 27, 2014, 08:31:55 AM
HI,
I have aroutine to send a plain text as a HTML page.
It is workin ok in NT6
But upgrading to NT8 the HTMLheader is still there
see image
Thanks


[attachment deleted by admin]
Title: Re: NoHeader and the header is still there
Post by: Bruce on March 27, 2014, 08:21:52 PM
You are doing a send packet before the http header is sent. I guess you need to move your code to a lower embed int.
Title: Re: NoHeader and the header is still there
Post by: Alberto on March 28, 2014, 06:24:14 AM
This is my code, module from a NetWebSource, whats wrong?

  GlobalErrors.SetProcedureName('xoc')
  loc:parent = lower(p_web.GetValue('_parentProc_'))
  If loc:parent <> ''
    loc:divname = lower('xoc' & '_' & loc:parent)
  Else
    loc:divname = lower('xoc')
  End

  ****** My code creating the packet var *****

    do SendPacket
    p_web.DeleteSession()
    Return
       
SendPacket  routine
  p_web.ParseHTML(packet,1,0,NET:NoHeader)
  packet.SetValue('')
Title: Re: NoHeader and the header is still there
Post by: Bruce on March 28, 2014, 06:46:09 AM
It's too early in the procedure, move it after the
do Header
line

Cheers
Bruce
Title: Re: NoHeader and the header is still there
Post by: Alberto on March 28, 2014, 07:05:43 AM
There is no "Do Header" in the source code.

p_web.ParseHTML(packet,1,0,NET:NoHeader)

I thought Net:NoHeader aboid that to the HTML.

How can I do it? I need a plain text wothout eny header or footer.

Thanks

PD:Its working ok in NT6



Title: Re: NoHeader and the header is still there
Post by: Bruce on March 28, 2014, 11:12:58 AM
as always an example app is sooo much faster than just guessing what you might be doing.
Title: Re: NoHeader and the header is still there
Post by: Alberto on March 28, 2014, 11:42:42 AM
The proc is xoc and its inside the example supplied for the mobile problem.
If you need I can post ir again here.
Thanks
Title: Re: NoHeader and the header is still there
Post by: de la Rosa on November 10, 2015, 10:57:46 PM
Hi,

What was the solution to this post? I also encountered Net:NoHeader no longer working above NT6 on the following code. The Client is NetWebClient Class.

   ...
   Rx_String=p_web.GetValue('xml')
   DO ParseRxMsg
   
   p_web.ParseHTML(Tx_String,1,Len(Tx_String,Net:NoHeader)


Thanks,
 
Title: Re: NoHeader and the header is still there
Post by: Bruce on November 10, 2015, 11:56:15 PM
start a new thread please Vic, and please post an example as well.

cheers
Bruce