搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

HTML for two monitors

  • 無回覆
  • 1 有這個問題
  • 6 次檢視
more options

--First will describe what I wanted to do, obstacles I faced, then list How I got around them. I wanted a two monitor transaction. One for person sitting at the PC and another for the audience to see. I found there may be something in the works to allow html to do that, but don't think it is implemented yet. If there is a way, please tell me. --First try was to open a second window and drag it to the other monitor. Minor problem, that was considered a popup, but was allowed to OK it. I intended to use parent/child window communication but the two windows weren't from the same 'domain' (come now - they were from the same directory). Hmm, the popup problem may be due to where I do the open (just found a demo that did not have a problem from a <a> or <input type=button> --Second try, I switched to postMessage() communication. That ran into problems when I coded (roughly) <button onclick="Send_Message('1 ',+FontSizeO.value+', '+x3+', '+x4+', '+x5)">Pause Clock</button> Only two parameters were being passed to Send_message - FontSizeO.value+', '+x3+', '+x4+', '+x5 was being sent a a single string as the second parameter to the function. I used the following code to fix that problem: function Send_Message() { X= arguments.join(',');Z=Z.split(','); SubWin.postMessage(Z,"*") } Later I changed the button to <button onclick="Start_Clock()">Start Clock</button>
coding the function call outside the onclick worked --Next problem was the <audio> wasn't being heard from the 'popup' window. I got around that by using a postMessage to the parent window to play the <audio> (also). It seems like an unecessary . --Recap, while I got around the problems, I would still like help for the following issues: 1) Coding HTML for two monitors. 2) Allowing parent/child window communication with widows generated from same directory (Yes, I know if I moved code to a server that shouldn't be an issue). A config parameter would do. 3) Need to fix problem with <button onclick="....">not passing more than two parameters to a called function. 4) Sound from the 'popup' window.

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題