Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Error occur

Error occur

Scheduled Pinned Locked Moved Web Development
javascripthelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chiari
    wrote on last edited by
    #1

    Hi, I'm trying to ask a web button to fire an event in javascript which is called PrntPreview(). But when I run, it gave this error below: BC30456: 'PrntPreview' is not a member of 'ASP.DisplayStkCode_aspx'. Anyone can tell me wat is wrong? Thanks in advance, Chiari

    M 1 Reply Last reply
    0
    • C Chiari

      Hi, I'm trying to ask a web button to fire an event in javascript which is called PrntPreview(). But when I run, it gave this error below: BC30456: 'PrntPreview' is not a member of 'ASP.DisplayStkCode_aspx'. Anyone can tell me wat is wrong? Thanks in advance, Chiari

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, The onclick is the server side event of the button web control, so you need to provide the PrntPreview method which will be running at the server side, and you cannot assign a client side function to the event in the html editor. If you just want to add the client side function for the onlick event, you can do that as below:

      //Assume the PrntPreview is a client side function.
      btnPreview.Attributes.Add("onclick", "PrntPreview();");

      C 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, The onclick is the server side event of the button web control, so you need to provide the PrntPreview method which will be running at the server side, and you cannot assign a client side function to the event in the html editor. If you just want to add the client side function for the onlick event, you can do that as below:

        //Assume the PrntPreview is a client side function.
        btnPreview.Attributes.Add("onclick", "PrntPreview();");

        C Offline
        C Offline
        Chiari
        wrote on last edited by
        #3

        Hi there, I know what went wrong and I have corrected it by using HTML input button. Thanks a lot. Chiari :-D

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups