NetTalk Central

Author Topic: Serving a page with NetWebSource weird error  (Read 3485 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Serving a page with NetWebSource weird error
« on: September 04, 2017, 07:31:23 AM »
Hi, Im trying to use a jQuery plugin to add marks to images.
You can see it at:
http://www.jqueryscript.net/zoom/jQuery-Plugin-For-Adding-Notes-Markers-To-An-Image-imgNotes.html

Trying to make a very simple add to my NT server, using the same test page they provide changing the Image to one of my app, just to test and once it works make it better.

Then I create a NetWebSource proc to serve the page using:
  do OpenFiles
  PIC:ID = p_web.RestoreValue('PIC:ID')
  Access:CR_PIC.Fetch(PIC:XID_PIC)

  packet.SetValue( |
  '<!DOCTYPE html> '&'<13,10>'&|
  '<html> '&'<13,10>'&|
  '   <head> '&'<13,10>'&|
  '      <title>imgNotes Plugin - basic note editor</title> '&'<13,10>'&|

... and the rest of the page

Ive added a button on a browse to call the proc and test it.

Problem is that when the page is served I get an error on the browser

This page contains the following errors:
error on line 15 at column 9: Opening and ending tag mismatch: link line 0 and head

Then I view the source code of the page and everything seams to be ok
I then save the source code as test.html to de web folder and if I double click it... it works OK!!!

Dont know what Im doing wrong.

Ive made all this stuff on the BasicBrowseAndForm (1) example.
-Theres a lib folder added to the web folder
-Add a button "Mark" to the browser just to call the IMageMark proc Using a fixed image
-Compile it, run it, press MArk
-You get the error
-View source code/ save as test.html .../ double clikc and it works OK
Attached goes the BasicBrowseAndForm (1).zip

Thanks


-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Serving a page with NetWebSource weird error
« Reply #1 on: September 05, 2017, 02:22:30 AM »
Hi Alberto,

You've made it a NetWebSorce procedure, and in it put a whole page.
But NetWebSources can't be called as pages.

I think move it to a NetWebPage procedure instead.

cheers
Bruce