/    Sign up×
Community /Pin to ProfileBookmark

How to create IFRAMES in a jscript file?

Does anybody know how to create an IFRAME so that a DIV can be placed on top of the IFRAME and SELECT?

The purpose is to allow a pop up menu not to be blocked by a windowed control e.g listbox.

I think DIV represents a windowless control like the popup menu while SELECT represents a windowed control like the listbox.

Below is a javascript file code snippet: (Contextmenu.js)

<script language=”Javascript”>

function __showContextMenu(menu)
{
var menuOffset = 55
menu.style.left = window.event.x + menuOffset;
menu.style.top = window.event.y -7;
menu.style.display = “”;
window.event.cancelBubble = true;

return false;
}

function __trapESC(menu)
{
var key = window.event.keyCode;
if (key == 27)
{
menu.style.display = ‘none’;

}
}

</script>

There is no html because the menu is a custom control developed in C#. I have come across some IFRAME codes but they seem to be in html. How do I add IFRAME codes into this javascript file? ?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Weng spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...