Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 05-10-2008, 02:03 AM   #1
edbr's Avatar
Join Date: Aug 2005
Location: Bali
Posts: 11,204
Default hotmail alert

would it be possible to create an alert that when hotmail is added in a form field, a warning would pop up but the process would still continue. I am thinking 'if you are using hotmail ten please check your bulk folders for any reply ' kinda message
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 05-10-2008, 07:05 AM   #2
Join Date: Dec 2004
Posts: 405

if the html looks like this:

<input id="email" type="text"><span id="msg"></span>
the following javascript would work

window.onload = function() { //when the document loads

  var $ = function (el) { //create a function to return an element by id

    return  document.getElementById(el); // return the element


  $('email').onblur = function() { //when email field loses focus

    var emailAddress = $('email').value; // get whan the user typed in

    var emailProvider = emailAddress.split("@"); // split input 

    var emailProvider = emailProvider[1]; // get domain

    if(emailProvider == 'hotmail.com' || emailProvider == 'msn.com' || emailProvider == 'live.com') {

      $('msg').innerHTML = 'Put your message here'; // if hotmail or msn or live then alert the user



ranjan is offline   Reply With Quote

Thread Tools
Display Modes

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. The time now is 06:43 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com