Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hello everyone i need urgent help,about javascript prompt

    We made a web messaging program which had to show messages on pop up and also allow use of the prompt to give a single answer.

    Our program had to show our prompts "always on top" and i couldn't succeed showing my prompt always on top.

    I'm using windows 7 operating system and cant make it show the prompt "always on top"

    If you can help me with this i'd be glad.

  • #2
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    If I'm understanding correctly - you need a code that generates a pop-up that is shown "Always on Top" on the users screen...refer to the below, might help...

    Code:
    var y1 = 20;   // change the # on the left to adjuct the Y co-ordinate
    (document.getElementById) ? dom = true : dom = false;
    
    function hideIt() {
      if (dom) {document.getElementById("layer1").style.visibility='hidden';}
      if (document.layers) {document.layers["layer1"].visibility='hide';} }
    
    function showIt() {
      if (dom) {document.getElementById("layer1").style.visibility='visible';}
      if (document.layers) {document.layers["layer1"].visibility='show';} }
    
    function placeIt() {
      if (dom && !document.all) {document.getElementById("layer1").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
      if (document.layers) {document.layers["layer1"].top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1))}
      if (document.all) {document.all["layer1"].style.top = document.body.scrollTop + (document.body.clientHeight - (document.body.clientHeight-y1));}
      window.setTimeout("placeIt()", 10); }
    
    window.onload=placeIt();
    onResize="window.location.href = window.location.href"
    cheers,

    -mike fortuna


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •