Calling Javascript function using MM_Menu code

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Calling Javascript function using MM_Menu code

    Hello All,

    I am trying to call a javascript function in a drop-down menu create from
    Fireworks the old "MM_Menu" code.

    I want my javascript to make an Alert window pop open then have the users
    e-mail client open up to send an e-mail. I have it working by just opening the
    e-mail client, but when I try to get the javascript function to work, the
    e-mail client opening doens't work. If anyone can help me I would greatly
    appreciate it.

    This is the javascript code I have on the page:
    function emailAlert () {
    alert ("Personal account numbers should not be sent through e-mail.");
    }

    This is the line of code I'm working on, currently it opens up my e-mail
    client when you click on this option in the drop-down menu:

    mm_menu_1115163200_2.addMenuItem("Contact Us" ,"location='mailto:info@test.c
    om'");


    I tried this and was able to get the javascript function to work, but then my
    e-mail client wouldn't open up

    mm_menu_1115163200_2.addMenuItem("Contact Us" ,"location='mailto:info@test.c
    om'");

    Bay_Ridah26 Guest

  2. Similar Questions and Discussions

    1. Calling Flash function from Javascript
      Hi everyone, I am desperately trying to call a Flash function (myfunction) from javascript... I believe the function has to be made accessible by...
    2. Calling a javascript function from flash
      Is it possible to call script functions from a flash object that the flash object will only be able to access once it is placed on an html page? ...
    3. calling a flash function from Javascript
      Hello everybody I want to call an ActionScript from the Website maybe using fscommand, but I don't know how to do it. Can anybody help me to...
    4. Calling c# code from javascript
      Hi, Can one call a c# function from within a javascript function ? I have a c# > function GetLanguageItem(title), how can I call the above...
    5. Calling Javascript function
      Hi all, Can i call my javascript functions from the web controls.Any appropriate site which will be tell more on this will be helpfull. ...
  3. #2

    Default Re: Calling Javascript function using MM_Menu code


    <script language="javascript" type="text/javascript">
    function emailAlert(){
    alert ("Personal account numbers should not be sent through e-mail.");
    document.location="mailto:admin@site.com";
    }
    </script>


    mm_menu_1115163200_2.addMenuItem("Contact&nbsp;Us" ,"emailAlert()");




    --
    Regards,
    ...Trent Pastrana
    [url]www.fourlevel.com[/url]

    Dreamweaver Designer Tools
    iFrameSuite | MiniMenus | Scroller Packages | More...
    -----------------------------






    "Bay_Ridah26" <webforumsuser@macromedia.com> wrote in message
    news:dcolgl$ci4$1@forums.macromedia.com...
    > Hello All,
    >
    > I am trying to call a javascript function in a drop-down menu create from
    > Fireworks the old "MM_Menu" code.
    >
    > I want my javascript to make an Alert window pop open then have the users
    > e-mail client open up to send an e-mail. I have it working by just opening
    > the
    > e-mail client, but when I try to get the javascript function to work, the
    > e-mail client opening doens't work. If anyone can help me I would greatly
    > appreciate it.
    >
    > This is the javascript code I have on the page:
    > function emailAlert () {
    > alert ("Personal account numbers should not be sent through e-mail.");
    > }
    >
    > This is the line of code I'm working on, currently it opens up my e-mail
    > client when you click on this option in the drop-down menu:
    >
    > mm_menu_1115163200_2.addMenuItem("Contact&nbsp;Us" ,"location='mailto:info@test.c
    > om'");
    >
    >
    > I tried this and was able to get the javascript function to work, but then
    > my
    > e-mail client wouldn't open up
    >
    > mm_menu_1115163200_2.addMenuItem("Contact&nbsp;Us" ,"location='mailto:info@test.c
    > om'");
    >

    T.Pastrana - 4Level Guest

  4. #3

    Default Re: Calling Javascript function using MM_Menu code

    Thanks for all your help. it worked perfectly.
    Bay_Ridah26 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139