Execute javascript on button click

Discussion in 'ASP .Net Mobile' started by JJ, Feb 27, 2006.

  1. JJ

    JJ Guest

    In a ASP.NET 1.1 Mobile Form, I want to execute a javascript call on a
    button click.

    How can I do that? I thought I could do:
    cmdExit.CustomAttributes.Add("onclick","javascript:window.opener=self;window.close()");

    But that seems to be ignored. Custom attributes are allowed in the
    web.config file.
     
    JJ, Feb 27, 2006
    #1
    1. Advertising

  2. JJ

    Egil Hogholt Guest

    JavaScript is not supported by most mobile clients.

    Some of the latest wap 2.0 devices support a very limited set of JavaScript
    functions but the concept of windows that can be opened and closed does not
    exist.

    Cheers,
    Egil
    http://www.egilh.com/
    "JJ" <> wrote in message
    news:...
    > In a ASP.NET 1.1 Mobile Form, I want to execute a javascript call on a
    > button click.
    >
    > How can I do that? I thought I could do:
    > cmdExit.CustomAttributes.Add("onclick","javascript:window.opener=self;window.close()");
     
    Egil Hogholt, Apr 13, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    846
    Purvi T
    Oct 19, 2004
  2. =?Utf-8?B?RGF2ZQ==?=

    Execute javascript on a DataGrid's LinkButton click?

    =?Utf-8?B?RGF2ZQ==?=, Jun 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    10,896
  3. Ian Kelly

    Execute Javascript AFTER click event

    Ian Kelly, May 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    12,253
    Ian Kelly
    May 31, 2005
  4. Amy
    Replies:
    0
    Views:
    991
  5. jonny
    Replies:
    2
    Views:
    661
    Masudur
    Jul 30, 2007
Loading...

Share This Page