Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
js in QM
#1
Any idea if JS can be used in QM? Here is what I have so far...it works in dream weaver and can get it to display correctly and function on a web page, but in QM they are just static elements in the dialog.

Function dialog_with_js
Trigger F4     Help - how to add the trigger to the macro
Code:
Copy      Help
;\Dialog_Editor
typelib SHDocVw {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B} 1.1
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD =
;<html>
;<head>
;<title>Leopard Dashboard</title>
;<script src="C:\Users\Sammy\Desktop\testing\preview\js\jquery-1.2.6.min.js" type="text/javascript"></script>
;<script src="C:\Users\Sammy\Desktop\testing\preview\js\draggable.jquery.ui.js" type="text/javascript"></script>
;<script src="C:\Users\Sammy\Desktop\testing\preview\js\dashboard.js" type="text/javascript"></script>
;<script src="C:\Users\Sammy\Desktop\testing\preview\js\jquery.jqDock.min.js" type="text/javascript"></script>
;<style type="text/css">
;@import url(style.css);
;</style>
;</head>
;<body>
;</div>
;<p>&nbsp;</p>
;<div id="dock"><img src="C:\Users\Sammy\Desktop\testing\preview\images\finder.png" alt="Finder" title="finder"/><img src="C:\Users\Sammy\Desktop\testing\preview\images\dashboard.png" alt="Dashboard" id="dashboardLaunch" title="Dashboard" /><img src="C:\Users\Sammy\Desktop\testing\preview\images\mail.png" alt="Mail" title="finder" /><img src="C:\Users\Sammy\Desktop\testing\preview\images\coda.png" alt="Coda" title="Coda" />
;</div>
;</body>
;</html>

if(!ShowDialog("dialog_with_js" &dialog_with_js &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 459 146 "Form"
;3 ActiveX 0x54000000 0x0 14 12 404 102 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#2
javascript should run.

Try:
1. Use full path with @import url(style.css).
2. Use file instead of HTML: ax3SHD = "file with the HTML.htm". When used HTML, there is no base path, and therefore cannot resolve relative paths.
#3
Perfect! Thank you.


Forum Jump:


Users browsing this thread: 1 Guest(s)