Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 99,407
» Latest member: colourtradinghubcom
» Forum threads: 2,426
» Forum posts: 11,373

Full Statistics

Online Users
There are currently 870 online users.
» 4 Member(s) | 861 Guest(s)
Applebot, Bing, Facebook, Google, Yandex, casinozondercruksapplepay, colourtradinghubcom, jdbgamingmalaysia, Mixuemenumycom

Latest Threads
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
Yesterday, 05:33 PM
» Replies: 1
» Views: 326
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
Yesterday, 05:31 PM
» Replies: 2
» Views: 378
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 282
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 626
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 360
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 802
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 321
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,475
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 474
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 1,180

 
  Error in 15.1.9 cannot read property set of null
Posted by: PDSBILL - 01-31-2020, 08:12 PM - Forum: IntraWeb General Discussion - Replies (6)

I have app the runs great both as a exe and dll under 15.0.17. App uses TMS components.
when run as exe under 15.1.9 i get the folllowing errors.

Any idea where to start looking?

Uncaught TypeError: Cannot read property 'set' of null
    at findCssRuleFromSelector (IWCommon__ED5C788A0.js:3281)
    at findCssRule (IWCommon__ED5C788A0.js:3313)
    at internalGetElementCssRule (IWCommon__ED5C788A0.js:3355)
    at getElementCssRule2 (IWCommon__ED5C788A0.js:3397)
    at HTMLSpanElement.IWCL_SetRect [as SetRect] (IWCL__ED5C788A0.js:492)
    at DoUpdateRects (IWCL__ED5C788A0.js:1218)
    at DoAlign (IWCL__ED5C788A0.js:1272)
    at HTMLDivElement.IWCL_UpdateRects [as UpdateRects] (IWCL__ED5C788A0.js:1302)
    at DoUpdateRects (IWCL__ED5C788A0.js:1221)
    at DoAlign (IWCL__ED5C788A0.js:1272)


Actual code from chrome debugger (bold line is what is identifed as error line)

function findCssRuleFromSelector(sheet, selectorName, sheetIdx) {
    var rules = IW.CSS.getCSSRules(sheet);
    if (rules && rules.length) {
        for (var j = rules.length - 1; j >= 0; j--) {
            if (rules[j].selectorText && (rules[j].selectorText === selectorName)) {
                // save it in CSS rule cache
                cssRuleCache.set(selectorName, { sheet: sheetIdx, rule: j });
                return rules[j];
            }
        }
    }
    return null;
}

Print this item

  Unable to uinstall Intraweb XIV
Posted by: Craig Burke - 01-31-2020, 06:35 PM - Forum: IntraWeb General Discussion - Replies (7)

I am currently running XE7 with the bundled version.  I just purchased Ultimate for SSL functionality.
From the Programs and Features there is IntraWeb XIV though when I try to uninstall it I get the error
Runtime Error (at 90:259):
Could not call proc.

When I run the current IWBundledRemovalTool it states:
Process finished.
IntraWeb bundled files were not found. Probably they have been already removed.

The actual location of the two bpl files is C:\Program Files (x86)\IntraWeb XIV\Bin

How do I uninstall XIV and install the XIV Ultimate version?

TIA,
Craig

Print this item

  Getting "Invalid page context" exceptions after upgrade to 15.1.12
Posted by: magosk - 01-31-2020, 02:30 PM - Forum: IntraWeb General Discussion - Replies (17)

Hi! We have just upgraded three of our web applications (let's call them A, B, and C) from IW 15.0.15 to 15.1.12, where we make use of some of the new security features. After this, we have started to get EIWSecurityException exceptions with message 'Invalid page context' in our maintenance logs. Most of them are related to two distinct and reproducible cases in application B, but we have so far also seen two cases in application A which as of yet are more difficult to analyze. 

Case 1 (in application B) do you get when you click on a button on a mobile friendly page, built with CGDevTools JQuery Mobile controls. The server side (async) button click event handler looks like this:

Code:
procedure TEmIndClientAppAlertActivationWebForm.ActivateButtonJQMButtonOptionsEventsVClick(
  Sender: TObject; AParams: TStringList);
begin
  WebApplication.GoToURL(ActivateURL);
end;
The link still seems to work functionally for the user (in this case it opens up a specific app on the smartphone). The exception log comes a few hundred milliseconds after the button click has been logged (you do not see the logging code above, it is made in a base form just before this method is called). If you look at the call stack, there is nothing from our own code there, just internal IntraWeb stuff.

Case 2 comes from a login page in B which uses only standard IntraWeb controls. When the user clicks the Login button, we generate a redirect response (302) in order to prevent the browser from storing the login credentials in its cache. This is a solution (for a finding in a penetration test) that we developed together with Alexandre a few years ago. What we do in this case is basically the following:
Code:
procedure TBaseIndClientLoginWebDialog.LoginButtonClick(Sender: TObject);
begin
  LoginProgressRegion.Visible := True;
  LoginTimer.Enabled := True;
  TransferLoginCredentialsFromEditsToServerVariables();   
  ReportInformation('Protecting sensitive POST by using a redirect');
  WebApplication.Response.Code := 302;
  WebApplication.Response.AddHeader('Location', WebApplication.Request.Referer);
end; 
Again, it still seems to work functionally for the user, but the exception is logged a few hundred milliseconds after the click event. Sometimes it is also followed by a EInvalidAppID exception with message 'Session context is not valid'. What is interesting is that web application A also has a login page with almost identical code, but there you get no error. There is one security related setting that differs between applications A and B. In A we use the following:

CheckFormId=True
CheckSameIP=False
CheckSameUA=False
CheckWindowId=True
ForceAjaxPost=False
PreventDoubleSubmission=True
RandomTempFileNames=True
ShowSecurityErrorDetails=True
SurrogateSessionId=True

together with

AllowMultipleSessionsPerUser=True (which should translate to SessionOptions.UniqueURL=True, right?)

What differs in B (where we get the exceptions) is that we for now are forced to run with SurrogateSessionId=False due to an as of yet unsolved problem with a CGDevTools control.

A note: I tried setting CheckWindowId=False (as this property was added since 15.0.15) for application B but it made no difference. 

Thankful for feedback on this. Is there something that needs to be corrected in IW code, or can we change our code somehow to avoid the problems?

Best regards

Magnus Oskarsson

Print this item

  Scrolling IWregion contents
Posted by: davidbaxter - 01-30-2020, 02:30 PM - Forum: IntraWeb General Discussion - Replies (2)

Is there a way within a program to scroll the contents of an IWregion? If I have a region populated with, say, 20 labels and there's only room for 10, on the screen you can swipe up and down and scroll to see them all. How do you make that happen from within the program, by maybe an up or down button elsewhere on the screen? Thanks.

Print this item

  Tricky OnExit and SetFocus problem.
Posted by: SorenJensen - 01-29-2020, 04:24 PM - Forum: IntraWeb General Discussion - Replies (3)

Hi All,

I have a very tricky problem I'm unsure how to solve.

I have two IWEdits, IwEdit1 and IWdit2. Each has an OnExit event. The events are similar:

in IwEdit1.onExit: if IwEdit1.text = '' then IwEdit1.SetFocus; and
in IwEdit2.onExit: if IwEdit2.text = '' then IwEdit2.SetFocus;.

IWEdit2 is next logical field after IWEdit1 in the Taborder, and when both IwEdits are empty, and I tab out of IWEdit1, then the cursor starts an endless jump between the two IwEdits, because:

When exiting IwEdit1, the cursor is first moved to IwEdit2. Then the code realizes IwEdit1 is empty, and Setfocus moves it back to IwEdit1. However, as the Cursor already was in IwEdit2, IwEdit2.OnExit realizes the Cursor has left, and as IwEdit2 is empty, IwEdit2's SetFocus, moves it back to IwEdit2. And so IwEdit1.OnExit takes over again and so on and on and on....

How can I break this ?

In VCL, in Edit1.OnExit, I would disable Edit2's OnExit event before executing Edit1.Setfocus, and enable it again after, so that when Edit1.Setfocus pulls it out of Edit2, Edit2's OnExit event is not fired. How can I do something similar in InterWeb with IwEdits ?

Regards
Soren

Print this item

  Usersession and procedure question
Posted by: SorenJensen - 01-29-2020, 08:38 AM - Forum: IntraWeb General Discussion - Replies (2)

Hi All,

I have a number of vars defined in UserSession, which I use over and over again in many of the forms, and I need to initialize then at the creation of the form. Currently I do that, for every var, in the create or show of every form.

Is it possible to define a procedure in UserSession, to be called from the forms instead ?

NB! the forms don't have UserSession in the Uses clause. Only the ServerController.

If not, would anyone have other proposals of how to archive the same functionallity ?

Regards
Soren

Print this item

  IWResourceStrings
Posted by: Lorbass - 01-28-2020, 07:27 PM - Forum: IntraWeb General Discussion - Replies (2)

Hi @all,

this question has probably already been asked. But I didn't find a solution.
How can the Texts from "IWResourceStrings" be modified?
Thanks for appropriate advice!

Print this item

  Template and Components at Runtime
Posted by: Rolphy Reyes - 01-28-2020, 02:49 PM - Forum: IntraWeb General Discussion - Replies (2)

Hi

I'm using Delphi Seattle and Intraweb 14.0.47.

I am trying to achieve the following, in a template I put a tag like this {%varmenu%} in runtime I generate the HTML tags like this:

Example
<li>{%myFrame.button1%}</li>
<li>{%myFrame.button2%}</li>

Of course I use the event OnUnknownTag from the TIWTemplateProcessorHTML component to replace the tag {%varmenu%}.

When running the application I was expecting to see the components but instead what I see is the name of the tags like this:
{%myFrame.button1%}
{%myFrame.button2%}

What am I missing?

Can someone help me out?

TIA

Print this item

  Delphi OSX64 changes broken FPC compilation
Posted by: zpeterson - 01-24-2020, 07:57 PM - Forum: Indy - Replies (3)

The changes to IdCompilerDefines.inc in SVN revs 5500-5505 broke compiling Indy for 64-bit OS X under Free Pascal.  Prior to those changes, THANDLE was set to THANDLE_32 for both 32-bit and 64-bit OS X builds, but Embarcadero's patch and subsequent changes switched it to THANDLE_CPUBITS.  Compiling IdGlobal.pas with Free Pascal 3.3.1 now fails in InterlockedExchangeTHandle, line 4487 with the error "Typecast has different size (4 -> 8) in assignment" on the VTarget cast.

EDIT: Since it dropped the "$ELSE" clause, it looks like it's also undefined for any non-Apple BSD variants, but we don't compile for those so I'm not sure.

Print this item

  IWURL ability to select caption
Posted by: bob9999 - 01-23-2020, 08:43 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi there.  I am using the IWURL component and all works well.  Is there a way to be able to select the caption at run-time?  Whenever I try to select the caption, the field tries to drag or the URL activates.  If there is no way to do this perhaps this would be a nice addition for a future release.  I am used to be able to select a URL and copy the caption to the clipboard or just click on it to activate and go wherever designed and now I have a client asking about this since he is used to the same.  Cheers.

Print this item