Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert html code into QM code and run function in JS code of the html
#2
The following code can display the full-screen button in the web page, but cannot display the web page. In addition, how to run the full-screen JS function in the web page after displaying the web? Huh



Macro Macro6
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 374 232 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 374 232 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "3"
str ax3SHD
ax3SHD=
;<html>
;;;;<head>
;;;;;;;;<title>test</title>
;;;;;;;;<style type="text/css" media="screen">
;;;;;;;;;;;;html, body  { height:100%;width:100% }
;;;;;;;;;;;;body { margin:0; padding:0; overflow:hidden; text-align:center;
;;;;;;;;;;;;;;;;;;;background-color: #ffffff; }
;;;;;;;;</style>
;;;;</head>
;;;;<body>
;;;;;;;;<button onclick="fullScreen()">Full screen</button>
;;;;;;;;<button onclick="exitScreen()">Exit Full Screen</button>
;;;;;;;;
;;;;;;;;<iframe style="width:100%;height:100%" src="http://fs.focusky.com.cn/jhgh/glyv/index.html" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true" ></iframe>
;;;;</body>
;
;;;;<script type="text/javascript">
;;;;;;;;//full screen
;;;;;;;;function fullScreen(){
;;;;;;;;;;;;var el = document.documentElement;
;;;;;;;;;;;;var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;
;;;;;;;;;;;;;;;;if(typeof rfs != "undefined" && rfs) {
;;;;;;;;;;;;;;;;;;;;rfs.call(el);
;;;;;;;;;;;;;;;;};
;;;;;;;;;;;;;;return;
;;;;;;;;}
;;;;;;;;//Exit Full Screen
;;;;;;;;function exitScreen(){
;;;;;;;;;;;;if (document.exitFullscreen) {
;;;;;;;;;;;;;;;;document.exitFullscreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.mozCancelFullScreen) {
;;;;;;;;;;;;;;;;document.mozCancelFullScreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.webkitCancelFullScreen) {
;;;;;;;;;;;;;;;;document.webkitCancelFullScreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;else if (document.msExitFullscreen) {
;;;;;;;;;;;;;;;;document.msExitFullscreen();
;;;;;;;;;;;;}
;;;;;;;;;;;;if(typeof cfs != "undefined" && cfs) {
;;;;;;;;;;;;;;;;cfs.call(el);
;;;;;;;;;;;;}
;;;;;;;;}
;
;;;;</script>
;</html>

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,DT_SetAutoSizeControls(hDlg "3s")
,max hDlg
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Click the full screen button, it can not display the full screen of the webpage, but directly open the HTML file with IE browser, click the button is full screen   Huh

The following web page file can be opened normally in Internet Explorer 11. I can also click the full screen button to make the web page full screen display.


Attached Files Image(s)
   

.html   web.html (Size: 1.71 KB / Downloads: 304)


Messages In This Thread
RE: How to insert html code into QM code and run function in JS code of the html - by win - 05-18-2018, 09:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)