My 1st post

Topics: Developer Forum
Developer
Jul 29, 2013 at 8:22 PM
It's my 2nd day with this great product any I am trying out the various features using the AVFP documentation and found something odd. Not sure if this is a bug or if I am doing something wrong. I have the latest download for win 7 64 bit. I believe, it is not possible to step thru this version of AVFP. Correct?

The issue is with oHTML.htmlTable()
  1. It fails to find oProp.cEval.
  2. The HTML returned by this function has a missing opening <TABLE> tag, It seems to look for the opening tag with "<TABLE " . I plan using css for style and just want plain HTML for my tables.
I made it work by using the following. Could I be missing some files?

lcHTMLfile = 'empList.ahtm' && html template
lcHTMLout= FILETOSTR(oProp.HtmlPath+lcHTMLfile)
If ATC("<TABLE>",lcHTMLout) > 0 && fix for prefixing space between TABLE & >
lcHTMLout = STUFF(lcHTMLout,ATC("<TABLE>",lcHTMLout),7,"<TABLE >")
endif

If !PEMSTATUS(oProp,"cEval",5) && fix for missing cEval property
oProp.addproperty("cEval","")
endif

lcHTMLout= oHTML.htmlTable('employees',lcHTMLout,10,50,'#E5E5E5',.F.;
              ,VAL(oRequest.querystring("page")),oRequest.querystring("nav") )
lcHTMLout = "<TABLE>"+lcHTMLout && fix for missing <TABLE> tag in the generated HTML
lcHTMLout= oHTML.mergetext(lcHTMLout)
Coordinator
Jul 29, 2013 at 8:45 PM
It may be possible to STEP Through the code but we have to figure it out for HTTP Handlers (which gives us the .avfp extension and extensionless URLs) . The 5.53 version works with debugging without the HTTP Handler.

I haven't looked at the HTMLtable code for a while since AVFP has concentrated more on scripting in the latest releases instead of evaluating a block of HTML. That older code will look for a tag that signifies an HTML table like <customers> and evaluate it until it gets to </customers>. It's possible some of that was overlooked in the latest releases.

Review the source code and enter it as an Issue (Issue Tab) if you want it fixed in the next release.