TWebBrowser in Delphi 10.2 doesn't show a form as it should - forms

I make a multi-device app that has a TWebBrowser component.
If i write this code
WebBrowser1.Navigate('https://google.com');
it opens the form as it should be.
But if i write this code
WebBrowser1.Navigate(edit1.text);
where edit1.text=the URL of a GoogleForms form (=https://docs.google.com/forms/d/e/1FAIpQLScLDCv_LeYJzvMoxnmvt_gN_gqeup7_vbU8VLaC-qXNPEGMIQ/viewform?vc=0&c=0&w=1&fbzx=3551763952707733753), it shows the form confused (the dropdown components as list of text, the "submit" button as text etc) like this :
is there a solution, please ?
PS. the form is opened in Internet Explorer (and Google) right.

The reason why this happens is that by default TWebBrowser component is opening web pages in compatiblity mode. This prevents myn moder web pages to show properly.
So in order to avoid this you need to opt in to the browser emulation feature using the documented registry key.
You can find more info about this on the link bellow
https://stackoverflow.com/a/25843958/3636228

Related

Mouseup event is not propagated to a popup window in IE 11

I've a legacy app that features a DND from a popup window to the main one.
It works fine in IE 8 but not in any of the newer versions of IE. The effect results in the drag ghost image being stuck in the source window and not going away after the drop had occurred.
Some debugging did in fact confirm that the 'mouseup' event does not get propagated back to the source window. What can be done to fix it? Many thanks!
ITs a bit hard to begin to answer your question without some code....
use the File>Properties menu to find out which IE security zones the two windows(domains) map too...IE uses a different security model to other browsers... drag/drop is probably not allowed between local web files (using file: protocol) and internet or intranet sites.
Have you used the Dev tool yet to debug it? If you are using showModalDialog (which normally disables context menus) you can right click on a link (a) or input element to display the context menu so you can display the debugger for showModal content page.
If possible include a link to your website or a mashup (jsfiddle) with your questions.

URI for client side version

Currently my system works on abcd.appspot.com, it has two buttons, one Home and other About us, clicking on each button displaying respective UI.
Requirement now is, if user writes abcd.appspot.com/home then it should display the 'home' page and abcd.appspot.com/about should display 'about us' page. I know if I chose the history token then it will be much more easier for me, but requirement is the it must be abcd.appspot.com/{menu_id}/... only.
In short, I want the REST URI for client side version. Any idea how it should be implemented in GWT? May be I am missing some simple clue.
Fragment-identifier # is mandatory, if it is not present the page will reload...
You can remove the # using the HTML 5 feature "pushState", I known the last version of errai can do this, see http://docs.jboss.org/errai/3.1.0-SNAPSHOT/errai/reference/html_single/#_pushstate_functionality, but this will work only with HTML5 compatible navigator...
A few others links about gwt and pushstate:
https://github.com/jbarop/gwt-pushstate
https://gist.github.com/tbroyer/1883821

Domino lotus notes 8.5.3 Form does not load all the controls?

I need to show a form to the user from Lotus notes customization extension file (Forms85.nsf). For that I have created a form in Customization file i.e. in Forms85_x.nsf Extension file. The form is properly loaded with all the controls (buttons ,textboxes ,comboboxes) while I’m previewing in Domino server but, whenever I’m trying to access the form from users browser it doesn’t show the controls like button. But the controls in the forms are loading properly while I’m having the form in users own mail file i.e. someone.nsf.
When you say "buttons", are you talking about action buttons in the action menu, or buttons on the form?
The mail template is web-enabled, but you may done something on your form that won't work on the web.
What code do you have behind your buttons? Are you using Lotuscript of Formula?
Also, to be picky (but we are all developers, and it is a requirement to be precise for us), you probably mean that you previw it in Notes (using the Notes client), not Domino. Domino is the server, and the only way to view an appliaction on teh Domino server is by using a browser.
You can do really cool things in Domino web applications, with justa little bit of CSS and Javascript. I frequently use jQuery to create more advance web application, calling Lotusscript agents through Ajax to read/write/update documents in the database. Perhaps you can use that technique?
Customizing iNotes does not work like that. You found the right place to add your customization code, but unfortunately not the right way to do it. The forms in forms85_x.nsf are not supposed to be used as "normal" forms. You put html and javascript in there as plain text (no passthrough html).
Action buttons can be added by using special javascript commands, not by adding buttons in the form. Start reading here about how to do this.
Just forget about everything you know about web-development in domino (classic or xpages) and learn how to do "iNotes" as the only thing in common are the "languages" html and javascript and css

How to make form data persist on "reload from cache"

I'm making a website. It's a simple profile page. I don't have any subpage, I just do 3 divs and change them and css.
But because its a radioset, if you refresh the page from cache (f5) or duplicate the tab, or press back/forward, the form data remains intact so it shows the proper div. This is good behavior. However I only see this in Firefox.
Browsers like google chrome are not keeping the form data on (f5) refresh from cache but it clears form data (as if it is a reload from server). How can I make form data persist on reload from cache in this browser?
here is the site if you would like to see what i mean: http://noitidart.github.io/
I understand people sometimes want the opposite behavior then I'm looking for. They want form cleared even on reload (as Chrome currently does) but that's easy to ensure in Firefox just stick in a document.form.reset() in the head.
Firefoxes restore of form data values is fine on reload (without Shift or CTRl;).
This is missing in Google Chrome.
I found this:
autocomplete="off"
https://github.com/pradosoft/prado/issues/642
Perhaps autocomplete="on" would make it happen? :) i dont know.
stackoverflow.com uses it too.

Trigger a click on a page in the pagetree in Backend

How could I trigger in JS a click on the pageitem of TYPO3 BE pagetree by an ID of the page ?
Looking for solutions for versions 4.5 and 6.1.
The basics are described in this document (might be slightly deprecated):
http://buzz.typo3.org/people/steffen-kamper/article/backend-navigation-in-typo3-45/
For example, to open the submodule "task center" in the "user tools" module, enter this
top.TYPO3.ModuleMenu.App.showModule('user_task');
or, to change to the pagetree, this
top.TYPO3.ModuleMenu.App.showModule('web_layout');
inside the firebug console. According to the author,
The pagetree resides in top.TYPO3.Backend.NavigationContainer, the
content resides in top.TYPO3.Backend.ContentContainer.
I haven't really understood what you'd like to click on exactly. But it might get you started.
I think in real life (or in an html fragment in a page in the backend) you can set <a javascript:...> urls</a>
I am still trying to figure out the fine points of this javascript myself. I for one want to also click on a select-box in the content Iframe after clicking in the Admintools/Report submodule. The first part is this:
top.TYPO3.ModuleMenu.App.showModule('tools_txreportsM1');