Hyperlink Button/label

Started by Fadzil M., June 21, 2016, 08:55:03 AM

Previous topic - Next topic

Fadzil M.

Hi,


How to create hyperlink button/label on new genero version 3.0.

Currently we used this on version 2.30.

Form per.

LABEL f01 = formonly.f01, STYLE = "LabelUrl";

Prog 4gl.
LET lbllink ="<div align='right'><a target=\"_self\" href='http://",ipcode clipped,"/new/printpdf.php?id=",sessid CLIPPED,"@",cnt_a USING "<<" CLIPPED,"'><img src='http://",ipcode clipped,"/new/report/images/printer3.bmp' border='0'></img></a></div>"


DISPLAY lbllink TO f01

but when i try same code to new version genero 3.0, Image for label now appeared as version 2.30.

appear alll url as below:


<div align='right'><a target="_self" href='http://10.2.8.128/new/printpdf.php?id=9E121D613731CDCADE27E06CA7F3A5F8@1'><img src='https://10.2.8.128/new/report/images/printer3.bmp'; border='0'></img></a></div>


Please help.


Thank You

Reuben B.

Hi,

According to the documentation, the textFormat=html style for LABEL's is supported with GWC-JS so the expectation is that your code should work as before.

A quick test with a simpler HTML string suggests that it does work as before.

My suspicion is that your HTML string is not valid although that could be due to the forum posting software.  In what is posted I don't see an end tag for the
Code (html4strict) Select
<a> and the "url" is probably an attempt at posting mark-up.

I suggest you review your html and check that it is syntactically correct, and if it is, send a small example that recreates the issue to your local support center.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero

Fadzil M.

hi,

LET lbllink ="<div align='right'><a target=\"_self\" href='http://",ipcode clipped,"/new/printpdf.php?id=",sessid CLIPPED,"@",cnt_a USING "<<" CLIPPED,"'><img src='http://",ipcode clipped,"/new/report/images/printer3.bmp' border='0'></img></a></div>"


"HTML string is not valid"-- but it work fine on version 2.30, Problem happen on new version 3.0



Thank You

Reuben B.

If the HTML string is invalid and it worked in 2.30 you were lucky.  It is extremely unlikely we will alter 3.0 to cater for bad HTML on your part.  Fix your code to make the HTML string in the variable lbllink syntactically correct.  From the information you have presented the a element is missing an end-tag.

If you think the HTML is valid, send a small self contained example to your local support center.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero

Fadzil M.

Hi,


Here i share my program. Please help to fix this problem.

At version 2.30, i used output display SetAjax but version 3.00 i used output display SetHtml5. Because of this i face this problem? please advice.


Thank you