how to call javascript from asp .net c# script ?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default how to call javascript from asp .net c# script ?

    If a certain criteria happens with some data how do I show a
    javascript message box to notify the user ?

    I don't think I can use a validator control as it's not applicable.


    <SCRIPT LANGUAGE="JavaScript">
    function onClickJS()
    {
    window.confirm("data malformed");
    }
    </SCRIPT>


    Thanks,
    Hobnob.
    lee Guest

  2. Similar Questions and Discussions

    1. Can I call extenal API in Acrobat javascript?
      I have some methods in a dll. Can I call it somehow in in Acrobat javascript?
    2. Local javascript call
      I'm working on a tutorial project for a client that wants to be able to run the app from a CD or from a web site. I need the app to do two things...
    3. another javascript call issue
      I have a very simple javascript open window function that I've been using both in flash and html for some time. It works fine if I publish to flash...
    4. How to call javascript or action script from CFTREE?
      have a very simple and stupid question to ask. Can I call Javascrip from the onchnage in CFTREE tag? Or I have to use Action Script in the...
    5. call javascript function after validation
      When the user clicks a button on my page, a server side operation starts which takes several seconds to complete. To make the user less impatient I...
  3. #2

    Default Re: how to call javascript from asp .net c# script ?

    Lee,

    You may want to make the Body tag into a server control and attach the
    javascript to that.

    I have some sample code on my website, [url]www.aboutfortunate.com[/url], which will
    show you how to do so. It's in VB, but it's very simple. You should be able
    to port it over without a problem, but if you have questions feel free to
    email me. Just search the code library on the site for: "use the body tag as
    a server control" or something similar to that and it should pop up as the
    first hit.

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche
    "lee" <iammrproblem@yahoo.com> wrote in message
    news:a971caf8.0308050656.6d485b8d@posting.google.c om...
    > If a certain criteria happens with some data how do I show a
    > javascript message box to notify the user ?
    >
    > I don't think I can use a validator control as it's not applicable.
    >
    >
    > <SCRIPT LANGUAGE="JavaScript">
    > function onClickJS()
    > {
    > window.confirm("data malformed");
    > }
    > </SCRIPT>
    >
    >
    > Thanks,
    > Hobnob.

    S. Justin Gengo 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