Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Navigate (when click on Back button) goes to blank screen
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Navigate (when click on Back button) goes to blank screen
Hi,
My browser data has Back button ( < ).
Now the issue is, a blank screen is displaying even though there is no previous page exist when i click on Back button.
I mean, need to stop navigating ( Back ) if there is no previous page exist.
Can you please provide your suggestion on this.
Kindly refer the attached screenshots.
Thanks & Regards,
John Augustine
My browser data has Back button ( < ).
Now the issue is, a blank screen is displaying even though there is no previous page exist when i click on Back button.
I mean, need to stop navigating ( Back ) if there is no previous page exist.
Can you please provide your suggestion on this.
Kindly refer the attached screenshots.
Thanks & Regards,
John Augustine
You do not have the required permissions to view the files attached to this post.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Navigate (when click on Back button) goes to blank screen
CEF browsers load "about:blank" as the first page if you don't use the TChromium.DefaultURL property.
That's the blank screen the user sees when he/she presses the back button.
Set the TChromium.DefaultURL property to the first address you want to load before calling TChromium.CreateBrowser.
That's the blank screen the user sees when he/she presses the back button.
Set the TChromium.DefaultURL property to the first address you want to load before calling TChromium.CreateBrowser.
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Re: Navigate (when click on Back button) goes to blank screen
Thanks much for your suggestion/help.
Actually, we are using "LoadRequest" and not "LoadURL".
Kindly refer the attached screenshot.
Thanks,
John Augustine
Actually, we are using "LoadRequest" and not "LoadURL".
Kindly refer the attached screenshot.
Thanks,
John Augustine
You do not have the required permissions to view the files attached to this post.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Navigate (when click on Back button) goes to blank screen
Then use the TChromium.OnBeforeBrowse event to allow navigation to "about:blank" only one time.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Navigate (when click on Back button) goes to blank screen
I just edited the previous post with a better answer.
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Re: Navigate (when click on Back button) goes to blank screen
Hi,
Thanks much for your suggestion!
As you mentioned, I have tried this in TChromium.OnBeforeBrowse (kindly refer the attached screenshot (Before_Browse.JPG) for code) but couldn't achieve.
fRequest browser.MainFrame.LoadRequest(fRequest); > Assigning value for fRequest is at method "Display" (kindly refer the attached screenshot (LoadRequest.JPG) for code)
Thanks & Regards,
John
Thanks much for your suggestion!
As you mentioned, I have tried this in TChromium.OnBeforeBrowse (kindly refer the attached screenshot (Before_Browse.JPG) for code) but couldn't achieve.
fRequest browser.MainFrame.LoadRequest(fRequest); > Assigning value for fRequest is at method "Display" (kindly refer the attached screenshot (LoadRequest.JPG) for code)
Thanks & Regards,
John
You do not have the required permissions to view the files attached to this post.
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Re: Navigate (when click on Back button) goes to blank screen
Hi,
Any help on my previous post?
Thanks & Regards,
John
Any help on my previous post?
Thanks & Regards,
John
You do not have the required permissions to view the files attached to this post.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Navigate (when click on Back button) goes to blank screen
Sorry, I forgot that "about:blank" is a special case that doesn't trigger the "OnBefore..." events in CEF.
https://magpcss.org/ceforum/viewtopic.php?f=6&t=15989
https://magpcss.org/ceforum/viewtopic.php?f=10&t=15950
Try this :
https://magpcss.org/ceforum/viewtopic.php?f=6&t=15989
https://magpcss.org/ceforum/viewtopic.php?f=10&t=15950
Try this :
- Set the TChromium.DefaultURL to a DATA URL which includes your logo or your client's logo or a blank html file. It will be loaded before your request for a few tenths of a second only.
- Add the TChromium.OnBeforeBrowse to check that the previous DATA URL can only be loaded once.
-
- Posts: 48
- Joined: Fri Jul 10, 2020 1:33 pm
Re: Navigate (when click on Back button) goes to blank screen
Sure, I will try this.
Thanks Much!
Regards,
John
Thanks Much!
Regards,
John