473,788 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CUSTOM ALERT BOX

www.lee-mcgeorge.co.uk

I've been using custom Alert boxes for a long time in various guises.
The way I've shown below is perhaps the easiest.
There are more efficient and cleaner ways to do it, but this is so easy, it
works a treat.
You can also put new <DIV> tags inside the alert to have "Accept" "Decline"
"Cancel" buttons

www.lee-mcgeorge.co.uk

<html>
<head>

<script>
function stylealert(){
placement.inner HTML=message.ne walert.value
}
</script>

</head>
<body>
<form name="message">

<!-- PUT YOUR ALERT AS A FIXED SIZED DIV INSIDE THIS CSS-HIDDEN TEXTAREA -->

<textarea name="newalert" style="visibili ty:hidden">
<div style="width:25 6px; height:170px; background-color:yellow; border:solid
1px black;"onClick= "this.style.vis ibility='hidden '">
<br>
<center>
<b>
A new kind of alert box
</b>
<br>
<br>
<br>
Click to Close
</center>
</div>
</textarea>
<input type="button" value="Click for alert" onClick="stylea lert()">

</form>

<!-- IF YOU WANT TO POSITION THE ALERT DIV USE CSS - position:absolu te;
left:Xpx; top:Xpx -->
<!-- OR USE JAVASCRIPT TO DETERMINE THE CENTER OF THE SCREEN-->
<a name="placement "></a>

</body>
</html>
Jul 23 '05 #1
1 22821
L-and-F wrote:
www.lee-mcgeorge.co.uk


First thing I get are two alert messages telling me that my browser
doesn't meet your warped perception of "acceptable ", so I didn't look
further.
Any site that discriminates based on browser usage should be avoided
like the plague.

Read the FAQ, all of it, but especially section 4.26
http://www.jibbering.com/faq/#FAQ4_26
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5809
by: netclectic | last post by:
Hi folks, i've searched and searched and can't find any example of what i'm trying to do. Essentially (i think) i need to add a new operator to Number. I'm using eval to evaluate expressions that can be entered by users, these expressions are defined by another app so i can't change the format of the expressions. I've managed to support the majority of operators by supplying my own functions that wrap the equivalent Math functions but...
3
1826
by: F. Da Costa | last post by:
Hi, I was wondering *why* there is a difference between the results of the following two statements. On the suface they seem to do the same (or do they?) frm => returns void frm.getAttribute("custom") => returns the value of the attribute
7
9949
by: Phl | last post by:
hi, I can use the following code to set focus to standard html elements but if I try to do the same for a custom element, it seems to complain that it does not support a focus method. Does anyone know what is the problem, if there is a work around? thank you
2
3884
by: Zouplaz | last post by:
Hi, I'm trying find a solution to display a contextual helptext when mouse enters a form element (IE6 and Firefox 1.0) The input tag : <input name="message.title" helptext="Help message" value="" size=80> The code : var e = document.mainform.elements; for(i=0;i<e.length;i++)
2
1182
by: Nick | last post by:
I am writing a web application for my company (VB.NET). I am adding a custom web form class to prevent all the code reuse as you can see below... Public Class UIWebForm Inherits System.Web.UI.Page Here I have a Public Sub that will use a ASP Literal on the page to display a javascript alert message... Protected WithEvents ltlAlert As System.Web.UI.WebControls.Literal
1
4814
by: rn5a | last post by:
I have created a custom control button which when clicked displays a message in the JavaScript alert dialog. I could successfully compile the VB class file into a DLL & also could add it to the Toolbox in Visual Web Developer 2005 Express Edition but the alert message isn't popping up when I am implementing this control in an ASP.NET page & clicking the Button in the ASPX page. This is the class file: Imports System Imports System.Web...
6
393
by: Mr. SweatyFinger | last post by:
hi. i have a bunch of controls that get validated with the validation controls in vs2005 there are two that i could not find a control for so i wrote some javascript. so i set my submit button to OnClientClick="vRealtor()"
2
3141
by: Olorin | last post by:
I'm encountering some weird behavior with the ClientID property. Let's see if I can give you enough info and if anyone has ideas/suggestions. I'm working in ASP.NET 2.0. I have a Web Project with a master page, with a single ContentPlaceholder on it. I have a page that uses that Master template, and is meant to place 2 controls of type Fred in the content placeholder. The .aspx for this page goes like this: ....
2
2088
by: Z1P2 | last post by:
Hello, I'm trying to find a way to replace the user's alert system sound with a custom sound in the following script. Can someone please point me in the right direction? <script type="text/javascript"> var monitor = setTimeout("alert('The monitor is working');",0); </script>
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.