All Answers

0 votes

Hi,

I’m coming back with a solution to the problem, whose cause and fix turned out to be utterly absurd.

If a SplitContainer contains a TreeView and a Wisej.Web.WebBrowser, and the TreeView has more than 4 nodes, then Wisej.Web.WebBrowser.Eval(js) does not execute.
But if the number of nodes is 4 or fewer, the JS does execute.

This bizarre bug makes it impossible to implement an e-book scenario with a browser and a tree view containing more than 4 topics — which is, to put it mildly, EXTREMELY ANNOYING.

Please find images attached.

  • mgmst answered Jul 29, 2025 - 11:09 pm
0 votes

Perfect 🙂

0 votes
0 votes
In reply to: DateTimePicker

It’s not supported.

The closest thing is, you can use a MonthCalendar and set the BoldedDates. You can then theme the background color of the Bolded Dates.

The theme would look like this:
“datechooser”: {
“components”: {
“day”: {
“states”: {
“bolded”: {
“styles”: {
“css”: “{\”font-weight\”:\”900 !important\”, \”overflow\”:\”visible !important\”,\”display\”:\”flex\”,\”alignItems\”:\”center\”,\”justifyContent\”:\”center\”}”,
“backgroundColor”: “green”
},

See attached test case with a modified version of the bootstrap theme.

You could also consider using FullCalendar for something like this.

0 votes

Hi mgmst,

we need a compilable test case that shows the issue including the URL that you have been testing.
Otherwise we cannot help any further.

Best regards
Frank

0 votes

When it is in the test application (please find attached), I at least receive “Nothing found” message, which points that JS works.

When it is in a my control for books’ content loading- JS not works at all! Why so? Please advice.

 


Public Class C_Books_Container
Inherits Panel
Private ОWebBrowser As New CUtils.CInterfaceIni.CInterface.C_Wisej_Web_WebBrowser
Public WithEvents OTV As New CUtils.CInterfaceIni.CInterface.CTreeViewS.CTreeView.CTreeView_basic_01(Guid.NewGuid)
Private OSplitContainer As New SplitContainer

Public Sub New(INOStrURLText As String, INOSTRDelimiter As String, INOSTRDelimiter_Internal As String)
ОWebBrowser.Dock = DockStyle.Fill
OTV.Dock = DockStyle.Fill

With OSplitContainer
.Dock = DockStyle.Fill
.Panel1.Controls.Add(OTV)
.Panel2.Controls.Add(ОWebBrowser)
End With
ОWebBrowser.Url = New Uri(INOStrURLText)
Dim OStringPageContent As String = GetTextFromUrl(INOStrURLText)
F_TableОfContents_Get(OTV, OStringPageContent, INOSTRDelimiter, INOSTRDelimiter_Internal)

Me.Dock = DockStyle.Fill
Me.Controls.Add(OSplitContainer)

End Sub

Private Sub OTV_NodeMouseClick(sender As Object, e As TreeNodeMouseClickEventArgs) Handles OTV.NodeMouseClick

Dim searchText = “5”

Dim js As String =

var found = false;
var elements = document.getElementsByTagName(‘*’);
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerText && elements[i].innerText.includes(‘” & searchText.Replace(“”””, “\”””) & “‘)) {
elements[i].scrollIntoView({behavior: ‘smooth’, block: ‘center’});
elements[i].style.backgroundColor = ‘yellow’;
found = true;
break;
}
}
if (!found) {
alert(‘Nothing found.’);
}

ОWebBrowser.Eval(js)

End Sub

End Class

 

 

 

  • mgmst answered Jul 27, 2025 - 2:38 pm
  • last active Jul 28, 2025 - 5:21 am
0 votes

Javascript is executed by the browser. So I used google and found why your “code” doesn’t work.

https://stackoverflow.com/ questions/3999101 /get-iframes-document-from-javascript-in- main- document

  • JD answered Jul 27, 2025 - 12:25 pm
0 votes

Nothing at all, complete silence and darkness.

  • mgmst answered Jul 27, 2025 - 11:11 am
0 votes

Hi,

“does not work” means what? Do you get an error in the console?
We need a test case with a clear indication of expected result to check this.

Best regards
Frank

0 votes

Ciao Gabriele,

I cannot reproduce in 3.5.21 with my Pixel 7 and Nexus6P emulators. What type of device are you using?

Grazie,
Levie

0 votes

Thanks Alaa for your attention to this.  The solution does work, however, at first startup I get an exception that cannot be caught:  “Cannot read properties of undefined (reading ‘option’)”.  This occurs in your project as well as in mine.  If I set this option after the first appearance, then it does hide the weekend days.

 

0 votes

Hi Chris,

I have attached a sample that showcases the required feature.

HTH,
Alaa

0 votes

Hi Roni,

that’s a website, it’s build with Wordpress + Plugins.
Wisej.NET is for enterprise web applications. Not really related.

Best regards
Frank

0 votes

You can pass the parameters like this:

Application.Navigate("?mypar=1");

You can then get the values like so:
AlertBox.Show(Application.QueryString.ToString());
returns: mypar=1

And this returns just the value:
string[] values = Application.QueryString.GetValues(0);
AlertBox.Show(values[0]);

returns: 1

See attached sample

You might also find these forum threads to be helpful:
https://wisej.com/support/question/url-parameters
https://wisej.com/support/question/url-arguments

0 votes

John-

Your code does work. See attached test case. I am able to open the Project folder and view the file inside.

Julie

0 votes

Has there been an update to this?

Wisej.Web.SaveFileDialog dialog = new Wisej.Web.SaveFileDialog();
dialog.Roots.Add(new FileSystemProvider(Application.Session[“GlobalProperties.DataFileLocation”] + “Project”, “Project”));
dialog.InitialDirectory = Application.Session[“GlobalProperties.DataFileLocation”] + “Project”;

DialogResult result = dialog.ShowDialog();

No existing files are displayed

__

If we do this:

Wisej.Web.SaveFileDialog dialog = new Wisej.Web.SaveFileDialog();
dialog.Roots.Add(new FileSystemProvider(“./”, “Main_Directory”));
DialogResult result = dialog.ShowDialog();

And the user navigates to the Project folder, then the files in the Project folder are displayed.

__

We do not want users to be able to navigate outside of the Project folder, but we want to display the contents of the Project folder when the dialog is displayed.

0 votes

I looked at your files- try “url”: “Admin.html” in Admin.json

That works for me.

 

0 votes

I figured it out. The forum post i was referencing said to change the Admin.json url to be “/admin” – when i changed it back to “Admin.html” it started working. Thanks !

0 votes

Attached are the new files added for Admin sub-application.

I even put a breakpoint in the Main method of the Admin.cs file and no matter what I do it never gets in there.

  • edmond girardi answered Jul 10, 2025 - 5:08 pm
  • last active Jul 10, 2025 - 5:09 pm
Showing 221 - 240 of 11k results