...

View Full Version : Simulate the dropdown alert bar & noise of "flash update required"



thegreatescape
01-23-2012, 03:07 PM
Hi,

I want to recreate the effect of the drop-down bar that appears at the top of your browser when prompted to download an updated version of flash. Its for a proprietory plugin, but can't seem to get anywhere with it... Anyone have any ideas?

Rowsdower!
01-23-2012, 04:01 PM
What do you have so far? Let's start with the HTML/CSS even, if you don't have any javascript written yet...

thegreatescape
01-23-2012, 11:38 PM
What do you have so far? Let's start with the HTML/CSS even, if you don't have any javascript written yet...

Hi thanks for responding.

https://shopplugin.net/ so essentially I would like to have:

this:http://i.imgur.com/K52Aw.jpg

Krupski
01-24-2012, 12:13 AM
Hi,

I want to recreate the effect of the drop-down bar that appears at the top of your browser when prompted to download an updated version of flash. Its for a proprietory plugin, but can't seem to get anywhere with it... Anyone have any ideas?

Here ya go....



/**
* creates an info bar at the top of the browser
**/
function infoBar(text) {
var b = document.body;
var d = document.createElement('div');
var p = viewPortInfo();
d.style.width = String(p.width + 'px');
d.style.height = '16px';
d.style.color = '#000000';
d.style.backgroundColor = '#ffffe1';
d.style.border = '1px solid #666666';
d.style.position = 'absolute';
d.style.top = '0px';
d.style.left = '0px';
d.style.padding = '6px';
d.innerHTML = text;
b.appendChild(d);
}

/***
* get client browser window size and position
* returns a number (no 'px' suffix).
**/
function viewPortInfo () {
if (document.documentElement) {
return {
height : Math.round(document.documentElement.clientHeight),
width : Math.round(document.documentElement.clientWidth),
top : Math.round(document.documentElement.scrollTop),
left : Math.round(document.documentElement.scrollLeft)
}
} else {
return false;
}
};

thegreatescape
01-29-2012, 09:03 PM
Here ya go....



/**
* creates an info bar at the top of the browser
**/
function infoBar(text) {
var b = document.body;
var d = document.createElement('div');
var p = viewPortInfo();
d.style.width = String(p.width + 'px');
d.style.height = '16px';
d.style.color = '#000000';
d.style.backgroundColor = '#ffffe1';
d.style.border = '1px solid #666666';
d.style.position = 'absolute';
d.style.top = '0px';
d.style.left = '0px';
d.style.padding = '6px';
d.innerHTML = text;
b.appendChild(d);
}

/***
* get client browser window size and position
* returns a number (no 'px' suffix).
**/
function viewPortInfo () {
if (document.documentElement) {
return {
height : Math.round(document.documentElement.clientHeight),
width : Math.round(document.documentElement.clientWidth),
top : Math.round(document.documentElement.scrollTop),
left : Math.round(document.documentElement.scrollLeft)
}
} else {
return false;
}
};


Hi sorry about the delay in responding. I tried using this within script tags, but literraly nothing happens??

Philip M
01-30-2012, 08:46 AM
You need to call the script.


<body onload = "infoBar('Put your desired text here ')">

Suggest replace
d.style.width = String(p.width + 'px'); // returns 0
with
d.style.width = '200px'; // or however many pixels suit your message



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum