Professional Web Applications Themes

Calling Javascript function - ASP.NET General

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. Regards.., Krishna...

  1. #1

    Default 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.

    Regards..,
    Krishna


    Krishna Guest

  2. #2

    Default Re: Calling Javascript function

    I have discussed about similar feature on ASP.NET Forums:
    [url]http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=267756[/url]

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    [url]http://www.mansoft.fi[/url]

    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]

    Email:
    [email]jotekeaspalliance.com[/email]

    "Krishna" <gk_ananthhotmail.com> wrote in message
    news:ufxMCZLRDHA.1560TK2MSFTNGP12.phx.gbl...
    > 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.
    >
    > Regards..,
    > Krishna
    >
    >

    Teemu Keiski Guest

  3. #3

    Default Re: Calling Javascript function

    JavaScript executes on the client side. It is sent to the client as
    scripting embedded in the HTML of a page. Therefore, you cannot interact
    directly with JavaScript on the server side. You CAN, however, add
    JavaScript to a page on the server, which will execute when the page loads
    in the browser. You can do this by using the
    Page.RegisterClientScriptBlock() and Page.RegisterStartupScript() methods.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Some things just happen.
    Everything else occurs.

    "Krishna" <gk_ananthhotmail.com> wrote in message
    news:ufxMCZLRDHA.1560TK2MSFTNGP12.phx.gbl...
    > 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.
    >
    > Regards..,
    > Krishna
    >
    >

    Kevin Spencer Guest

  4. #4

    Default Re: Calling Javascript function

    Hi

    I don't actually think it is this complicated.

    You call use Javascript with server side controls exactly
    as you use it with normal clientside HTML controls. There
    are however a few caveats.

    If the name of a server side event clashes with the name
    of the client side event this will lead to a problem.
    So for instance if you are programming javascript against
    a webform button control you will need to use the
    onMousedown client side event rather than the onclick
    event as the there is an event named onclick on the server
    side.

    You will have no intellisense when you write the
    javascript code against the server side controls as these
    controls do not actually exist till they are rendered as
    HTML when the application executes.
    Also when referencing the control reference it as
    doent.all rather than doent.Form1, I have sometimes
    had problems with the latter syntax.

    Regards,

    Pat Sinnott MCSD

    >-----Original Message-----
    >JavaScript executes on the client side. It is sent to the
    client as
    >scripting embedded in the HTML of a page. Therefore, you
    cannot interact
    >directly with JavaScript on the server side. You CAN,
    however, add
    >JavaScript to a page on the server, which will execute
    when the page loads
    >in the browser. You can do this by using the
    >Page.RegisterClientScriptBlock() and
    Page.RegisterStartupScript() methods.
    >
    >HTH,
    >
    >Kevin Spencer
    >Microsoft FrontPage MVP
    >Internet Developer
    >[url]http://www.takempis.com[/url]
    >Some things just happen.
    >Everything else occurs.
    >
    >"Krishna" <gk_ananthhotmail.com> wrote in message
    >news:ufxMCZLRDHA.1560TK2MSFTNGP12.phx.gbl...
    >> 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.
    >>
    >> Regards..,
    >> Krishna
    >>
    >>
    >
    >
    >.
    >
    pat sinnott Guest

  5. #5

    Default Re: Calling Javascript function

    ?????

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Some things just happen.
    Everything else occurs.

    "pat sinnott" <pat.sinnottequitant.com> wrote in message
    news:89a401c34564$41ad7a00$a401280aphx.gbl...
    > Hi
    >
    > I don't actually think it is this complicated.
    >
    > You call use Javascript with server side controls exactly
    > as you use it with normal clientside HTML controls. There
    > are however a few caveats.
    >
    > If the name of a server side event clashes with the name
    > of the client side event this will lead to a problem.
    > So for instance if you are programming javascript against
    > a webform button control you will need to use the
    > onMousedown client side event rather than the onclick
    > event as the there is an event named onclick on the server
    > side.
    >
    > You will have no intellisense when you write the
    > javascript code against the server side controls as these
    > controls do not actually exist till they are rendered as
    > HTML when the application executes.
    > Also when referencing the control reference it as
    > doent.all rather than doent.Form1, I have sometimes
    > had problems with the latter syntax.
    >
    > Regards,
    >
    > Pat Sinnott MCSD
    >
    >
    > >-----Original Message-----
    > >JavaScript executes on the client side. It is sent to the
    > client as
    > >scripting embedded in the HTML of a page. Therefore, you
    > cannot interact
    > >directly with JavaScript on the server side. You CAN,
    > however, add
    > >JavaScript to a page on the server, which will execute
    > when the page loads
    > >in the browser. You can do this by using the
    > >Page.RegisterClientScriptBlock() and
    > Page.RegisterStartupScript() methods.
    > >
    > >HTH,
    > >
    > >Kevin Spencer
    > >Microsoft FrontPage MVP
    > >Internet Developer
    > >[url]http://www.takempis.com[/url]
    > >Some things just happen.
    > >Everything else occurs.
    > >
    > >"Krishna" <gk_ananthhotmail.com> wrote in message
    > >news:ufxMCZLRDHA.1560TK2MSFTNGP12.phx.gbl...
    > >> 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.
    > >>
    > >> Regards..,
    > >> Krishna
    > >>
    > >>
    > >
    > >
    > >.
    > >

    Kevin Spencer Guest

  6. #6

    Default Re: Calling Javascript function

    Thanks Pat! You had me lost there!

    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    [url]http://www.takempis.com[/url]
    Big things are made up
    of lots of little things

    "Pat Sinnott" <Pat.sinnottequitant.com> wrote in message
    news:064401c3461c$fcf15990$a001280aphx.gbl...
    > Hi Kevin
    >
    > Sorry I thought the query related to calling javascript
    > functions from the HTML representation of the server
    > control.
    >
    > Pat.
    > >-----Original Message-----
    > >?????
    > >
    > >HTH,
    > >
    > >Kevin Spencer
    > >Microsoft FrontPage MVP
    > >Internet Developer
    > >[url]http://www.takempis.com[/url]
    > >Some things just happen.
    > >Everything else occurs.
    > >
    > >"pat sinnott" <pat.sinnottequitant.com> wrote in message
    > >news:89a401c34564$41ad7a00$a401280aphx.gbl...
    > >> Hi
    > >>
    > >> I don't actually think it is this complicated.
    > >>
    > >> You call use Javascript with server side controls
    > exactly
    > >> as you use it with normal clientside HTML controls.
    > There
    > >> are however a few caveats.
    > >>
    > >> If the name of a server side event clashes with the name
    > >> of the client side event this will lead to a problem.
    > >> So for instance if you are programming javascript
    > against
    > >> a webform button control you will need to use the
    > >> onMousedown client side event rather than the onclick
    > >> event as the there is an event named onclick on the
    > server
    > >> side.
    > >>
    > >> You will have no intellisense when you write the
    > >> javascript code against the server side controls as
    > these
    > >> controls do not actually exist till they are rendered as
    > >> HTML when the application executes.
    > >> Also when referencing the control reference it as
    > >> doent.all rather than doent.Form1, I have
    > sometimes
    > >> had problems with the latter syntax.
    > >>
    > >> Regards,
    > >>
    > >> Pat Sinnott MCSD
    > >>
    > >>
    > >> >-----Original Message-----
    > >> >JavaScript executes on the client side. It is sent to
    > the
    > >> client as
    > >> >scripting embedded in the HTML of a page. Therefore,
    > you
    > >> cannot interact
    > >> >directly with JavaScript on the server side. You CAN,
    > >> however, add
    > >> >JavaScript to a page on the server, which will execute
    > >> when the page loads
    > >> >in the browser. You can do this by using the
    > >> >Page.RegisterClientScriptBlock() and
    > >> Page.RegisterStartupScript() methods.
    > >> >
    > >> >HTH,
    > >> >
    > >> >Kevin Spencer
    > >> >Microsoft FrontPage MVP
    > >> >Internet Developer
    > >> >[url]http://www.takempis.com[/url]
    > >> >Some things just happen.
    > >> >Everything else occurs.
    > >> >
    > >> >"Krishna" <gk_ananthhotmail.com> wrote in message
    > >> >news:ufxMCZLRDHA.1560TK2MSFTNGP12.phx.gbl...
    > >> >> 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.
    > >> >>
    > >> >> Regards..,
    > >> >> Krishna
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >> >.
    > >> >
    > >
    > >
    > >.
    > >

    Kevin Spencer Guest

Similar Threads

  1. Calling Flash function from Javascript
    By Alain Levy in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: August 9th, 07:12 AM
  2. Calling a javascript function from flash
    By sixstringdev in forum Macromedia Flash Data Integration
    Replies: 2
    Last Post: April 13th, 09:26 PM
  3. Calling Javascript function using MM_Menu code
    By Bay_Ridah26 in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: August 3rd, 02:43 PM
  4. calling a flash function from Javascript
    By marcelogsouza webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 21st, 02:22 PM
  5. Replies: 1
    Last Post: October 17th, 11:16 AM

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
  •  

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