Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
js in QM
Any idea if JS can be used in QM? Here is what I have so 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
Copy      Help
typelib SHDocVw {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B} 1.1
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD =
;<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);
;<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" />

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

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

sel message
,case WM_COMMAND goto messages2
sel wParam
,case IDOK
ret 1
javascript should run.

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.
Perfect! Thank you.

Forum Jump:

Users browsing this thread: 1 Guest(s)