Results 1 to 2 of 2

Thread: Calling javascript in asp.net

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2003
    Location
    india
    Posts
    273

    Calling javascript in asp.net

    I have javascrip function in theweb user control
    and I am trying to call the function on thc Onclick event of web control button
    <script language="Javascript">
    function BackMe(){
    javascript:history.back()
    }
    </script>

    but I am getting error ie )expected and is not working.
    can anybody help me out .

    Thanks


    pPCC

  2. #2
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Try this ( don't forget the ; at the end. )
    <script language="Javascript">
    function BackMe(){
    window.location.history.go(-1);
    }
    </script>
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

Posting Permissions

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



Click Here to Expand Forum to Full Width