SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Ireland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Automatic launch of email application on page loading

    Does anyone know of a script that would be automatically called when a web page is loaded (user will be aware of resulting action) and which would then automatically launch the user's default email application (in the normal way that mailto: works)? This should all happen with no user intervention.

    I would be very appreciative of a response.

    William

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use a standard window.open script. In the HREF section, specify an email address.

    <script language="javascript" type="text/javascript">
    <!--
    function WinOpen(url,x,y) {
    var options = "toolbar=no,scrollbars=yes,resizable=yes,width=" + x + ",height=" + y;
    msgWindow=window.open(url,"WinOpen",options);
    }
    // -->
    </script>

    <body onload="javascript:WinOpen('mailto:',400,300)
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    Ireland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure that would work as I want it to?

    For example, page 1 is a standard page with a link to send email. The email address is actually stored on the server though and is not coded into page 1.

    On clicking link, page 2 is loaded with the email address now pulled from the server. Page 2 is identical to page 1 except that when it is loaded, Outlook Express (if default mail application) is launched and the email address is inserted.

    Let me know what you think.

    Thanks,

    Willie

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well not quite, this will

    <body onload="javascript:WinOpen('mailto:your_email_address@hotmail.Com',400,300)>

    a maito like this will just notify the person to proceed

    or try this

    <body onload="javascript:document.location.href='mailto:your_email_address@hotmail.Com';">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •