What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » javascript popups

javascript popups
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: javascript popups
how about this , YOU CREATE A FLOATING DIV AND MAKE IT SEEM LIKE A POPUP INSTED OF ANNOYING PEOPLE WITH REAL POPUPS.
* -dt- hates popups and people who think about using them.....


may73alliance! you do realise non of the above create a popup right?
please read or atleast link to real code insted of copying random bits of javascript which you clearly dont know what they do.

edit:

because i doubt you will be able to write a popup like what im talking about heres somecode to start you off :P

code:

//html data to display inside the thing
var htmldata = '';

//style of the box...
var style = 'position:fixed;z-index: 99;left:5px;top:9px;width:17.6cm;border-radius: 7px; background: purple ;padding: 3px;';

//try to get the element by id...
var popup = document.getElementById("popup");

//try to display it then set the innerhtml of the element to the htmldata.
try{
popup.style.display = "block";
popup.innerHTML = htmldata;
}
//if element dosnt exist the try created an error , create it here
catch(e){
body = window.document.getElementsByTagName("body")[0];
box = window.document.createElement("div");
box.setAttribute("id", 'popup');
box.setAttribute("style", style);
box.innerHTML = htmldata;
body.appendChild(script);
}



to close the thing all you do is hide it with something like...
code:
document.getElementById("popup").style.display = 'none';


removing it from the DOM isnt needed scince this code will reuse the div.

This post was edited on 07-19-2005 at 07:51 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-19-2005 05:23 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
javascript popups - by absorbation on 07-18-2005 at 06:12 PM
RE: javascript popups - by M73A on 07-18-2005 at 07:37 PM
RE: javascript popups - by -dt- on 07-19-2005 at 05:23 AM
RE: javascript popups - by toddiot on 07-19-2005 at 09:02 PM
RE: javascript popups - by Yousef on 07-19-2005 at 10:59 PM
RE: javascript popups - by Zephyr on 07-19-2005 at 11:04 PM
RE: javascript popups - by lopardo on 07-19-2005 at 11:25 PM
RE: javascript popups - by Zephyr on 07-20-2005 at 01:38 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On