Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-28-2009, 07:23 AM   PM User | #1
davutmaz
New to the CF scene

 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
davutmaz is an unknown quantity at this point
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.
davutmaz is offline   Reply With Quote
Old 12-28-2009, 09:18 PM   PM User | #2
m4tuna
New to the CF scene

 
Join Date: Dec 2009
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
m4tuna is an unknown quantity at this point
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
m4tuna is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:42 AM.


Advertisement
Log in to turn off these ads.