CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

IWCGTab showing as a link

by Ricardo Muñoz » 01 Dec 2020 23:42

Days ago, I upgrade Delphi to 10.4.1, installing IntraWeb 15.2.18 and CGDevtools IWCGJQuery 4.1.0.259. Now, all projects that I have that uses TIWCGJQTabs, shows the tabs as web links. IE, it doesn't show tabs, instead of that, it shows the caption of the tab as web links. The page looks as expected in the Delphi IDE, but not when I run the application (on Google Chrome, IE, Edge, etc.)

I tried a very simple IntraWeb app with a CGJQRegion, a CGJQTabs and one CGJQTab on it, with the same problem. I tested it on Delphi 10.4.1 and Delphi XE, both with the same versions of IntraWeb 15.2.18 and CGDevTools 4.1.0.259.

I assume that the problem occurs from a certain version of IW or CGJQuery or Delphi, since previously I did not have this problem with Delphi 10.2 and previous versions of IW and CGJQuery. Unfortunately I no longer have that Delphi and I don't remember the versions it used.

Below is the code of said application and later the html it generates this application.

TIA,
Ricardo

Code: Select all
unit Unit14;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWCGJQTabs,
  IWCGJQControl, Vcl.Controls, Vcl.Forms, IWVCLBaseContainer, IWContainer,
  IWHTMLContainer, IWHTML40Container, IWRegion, IWCGJQRegion;

type
  TIWForm14 = class(TIWAppForm)
    IWCGJQRegion1: TIWCGJQRegion;
    IWCGJQTabs1: TIWCGJQTabs;
    IWCGTab1: TIWCGJQTab;
  public
  end;

implementation

{$R *.dfm}

initialization
  TIWForm14.SetAsMainForm;

end.


The HTML it generates:
Code: Select all
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="generator" content="IntraWeb v15.2.18 Serial 202038590">



<script type="text/javascript">var CGVersion="4.1.0.259";</script>
<link href="/$/css/IWNotify__2301087681.css" rel="stylesheet" type="text/css"/>
<link href="/css/cgcss.min.css?v=4.1.0.259" rel="stylesheet" type="text/css"/>
<script type="text/javascript" nonce="yvogEss6bqEgidlIru3qoJ9bBVs">
var GURLBase="/$/", GAppID="ZoQcvEIdcwxLvAbiKztf1gBaxcW", GTrackID=1;
function doOnReady(f){
   var d = document;
   if (d.readyState!="loading") f();
   else if (d.addEventListener) d.addEventListener("DOMContentLoaded", f);
   else d.attachEvent("onreadystatechange", function(){if (d.readyState=="complete") f();})
}
</script>
<script type="text/javascript" src="/$/js/IWLib__1837908247.js"></script>
<script type="text/javascript" src="/jq/jquery-migrate-1.4.1.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery_ui/jquery-ui-1.8.23.custom.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery.ui.touch-punch.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/lazyload.helper.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/lazyload.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery.form.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/cg.jquery.helper.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery.tabbable.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/cgload.fastclick.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery_ui/plugins/jquery.ba-throttle-debounce.min.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery_ui/plugins/jquery.cgresizefix.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/jq/jquery_ui/plugins/jquery.ui.tabs.helper.js?v=4.1.0.259"></script>
<script type="text/javascript" src="/$/js/IWBase__2880361862.js"></script>
<script type="text/javascript" src="/$/js/IWGecko__2073812626.js"></script>
<script type="text/javascript" nonce="yvogEss6bqEgidlIru3qoJ9bBVs">
$(function(){$("#IWCGJQTABS1").tabs({select:function (event, ui){$('input[name="IWCGJQTABS1_DATA"]').val(ui.index);AddChangedControl("IWCGJQTABS1_DATA");},show:function (event, ui){CGLoadTabContent($(ui.panel),$(ui.tab).data("loadurl"));}});});
var IWCGJQTABS1IWCL = null;
var IWCGJQREGION1IWCL = null;
function Body_OnBlur(){GSubmitting = false;}
function FormDefaultSubmit(event){return false;}
function IWTop(){return window;}
function Validate(){
  return true;
}

function InitIWCLObjects() {
  var f = IW.initIWCL, p = IWCLForm;
  f(p,"IWCGJQREGION1",0).SetAlign(5).SetAnchors(1,1,1,1).SetProp("BorderWidthPixels",0)
  f(IWCGJQREGION1IWCL,"IWCGJQTABS1",0).SetAlign(5).SetAnchors(1,1,1,1).SetProp("BorderWidthPixels",0)
  f(IWCGJQTABS1IWCL,"IWCGTAB1",0).SetAlign(0).SetAnchors(1,1,1,1).SetProp("BorderWidthPixels",0)

if (IWCGTAB1IWCL) {IWCGTAB1IWCL.OnCGBeforeResize = function() {var self = $(this);  this.hidden = self.hasClass("ui-tabs-hide"); if (this.hidden) {  this.hidden = true;  self.removeClass("ui-tabs-hide"); } }}

if (IWCGTAB1IWCL) {IWCGTAB1IWCL.OnCGAfterResize = function() {if (this.hidden) {  $(this).removeAttr("hidden").addClass("ui-tabs-hide"); } }}
}

function Initialize() {
try{
GActivateLock = true;
InitRects(1530, 888);
IW.Num.init({"appDecSep": ",", "appThoSep": ".", "$Symb": "$", "$Format": 0, "neg$Format": 1, "showThoSep": false});
InitIWCLObjects();
AttachBeforeUnload();
history.go(1);
Body_OnResize();
window.onresize = Body_OnResize;
document.body.onblur = Body_OnBlur;
IW.Utils.fixIEMargins();
}catch(e){console.log("Error executing Initialize(): " + e.message);
}finally{
ReleaseLock();
}
$("#IWCGJQTABS1").removeClass("cgloading");


}
</script>


<!-- wwwroot -->
<script type="text/javascript">
$(function(){
$("<div></div>").css({"z-index":"999999","background":"red","color":"white","position":"absolute","font-family":"verdana","font-size":"14px","font-weight":"bold","right":"0","padding":"10px"}).html("Outdated wwwroot! <p>Please update and clear the browser cache after (Ctrl+F5)</p>").appendTo("body")
});
</script>
<!-- eval -->
<script type="text/javascript">
$(function(){
$("<div></div>").css({"z-index":"999999","background":"red","color":"yellow","position":"absolute","font-family":"verdana","font-size":"14px","font-weight":"bold","padding":"10px"}).text("CGDevTools Evaluation").appendTo("body")
});
</script>


<style data-type="iw" nonce="yvogEss6bqEgidlIru3qoJ9bBVs" type="text/css">
#IWCGJQREGION1{position: absolute; left: 0px; top: 0px;z-index: 100; width: 1530px; height: 888px; padding: 0; border-width: 0px; padding: 0;}
#IWCGJQTABS1{position: absolute; left: 0px; top: 0px;z-index: 100; width: 1530px; height: 888px; padding: 0; border-width: 0px; padding: 0; height:888px;}
#IWCGTAB1{position: absolute; left: 0px; top: 36px;z-index: 100; width: 1530px; height: 852px; padding: 0; border-width: 0px; overflow-x: auto; overflow-y: auto; padding: 0; border-width:0 !important;}
.iw_default_submit_form{display: inline;}
body{margin: 0;}
</style></head>
<body onResize="">
<script data-type="iw" nonce="yvogEss6bqEgidlIru3qoJ9bBVs" type="text/javascript">
if (typeof createIWLocker === "function") {
  createIWLocker("/$/gfx/loading_svg.svg");
  ActivateLock();
}
</script>
<script type="text/javascript" nonce="yvogEss6bqEgidlIru3qoJ9bBVs">
var PreScript=false, PostScript=false, PreAsyncScript=false, PostAsyncScript=false;
</script>

<div class="ui-widget ui-widget-content ui-corner-all" ID="IWCGJQREGION1" style="">
<div class="cgloading" ID="IWCGJQTABS1" style="" TabIndex="1"><ul>
<li>
<a data-ajaxloadalways="false" data-loadurl="false" href="#IWCGTAB1" id="IWCGTAB1_A">IWCGTab1</a></li></ul>
<div CLASS=" IWCLIPCONTROL" ID="IWCGTAB1" tabindex="0"></div></div></div><form action="/" method="POST" name="SubmitForm">
<input name="IWCGJQTABS1_DATA" type="hidden">
<input name="IW_FormName" type="hidden" value="IWForm14">
<input name="IW_FormClass" type="hidden" value="TIWForm14"></form>
<script data-type="iw" nonce="yvogEss6bqEgidlIru3qoJ9bBVs" type="text/javascript">
doOnReady(function(){ Initialize();} );
</script></body></html>
Ricardo Muñoz
 
Posts: 28
Joined: 25 Feb 2016 23:42

Return to JQTabs

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.