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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. alertbox in web appln

alertbox in web appln

Scheduled Pinned Locked Moved ASP.NET
javascript
7 Posts 5 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.
  • P Offline
    P Offline
    Priya S
    wrote on last edited by
    #1

    i have used code: --------------- imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); it works fine,but as i have given this under imgsub_click() it pop-up message only during second click i even tried giving onload, not working, hw to pop-up during first time itself

    Thanks in advance, Priya.

    S P B 4 Replies Last reply
    0
    • P Priya S

      i have used code: --------------- imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); it works fine,but as i have given this under imgsub_click() it pop-up message only during second click i even tried giving onload, not working, hw to pop-up during first time itself

      Thanks in advance, Priya.

      S Offline
      S Offline
      sulabh2020
      wrote on last edited by
      #2

      Hi priya, Does u give this code "imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');");" line in page load. if not than do the same.

      Hello Forum Always be in touch to help about the topic ASP.NET

      1 Reply Last reply
      0
      • P Priya S

        i have used code: --------------- imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); it works fine,but as i have given this under imgsub_click() it pop-up message only during second click i even tried giving onload, not working, hw to pop-up during first time itself

        Thanks in advance, Priya.

        P Offline
        P Offline
        Paras Kaneriya
        wrote on last edited by
        #3

        Priya Cool wrote:

        it works fine,but as i have given this under imgsub_click() it pop-up message only during second click

        Can you put your code snippet here?

        Paras Kaneriya
        The difference between genius and stupidity is that genius has its limits.

        1 Reply Last reply
        0
        • P Priya S

          i have used code: --------------- imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); it works fine,but as i have given this under imgsub_click() it pop-up message only during second click i even tried giving onload, not working, hw to pop-up during first time itself

          Thanks in advance, Priya.

          S Offline
          S Offline
          sulabh2020
          wrote on last edited by
          #4

          There are many ways to do the alert, but while asking about any thing from members in this forum u should equally need to give reply for the questions asked about your query.

          Hello Forum Always be in touch to help about the topic ASP.NET

          P 1 Reply Last reply
          0
          • S sulabh2020

            There are many ways to do the alert, but while asking about any thing from members in this forum u should equally need to give reply for the questions asked about your query.

            Hello Forum Always be in touch to help about the topic ASP.NET

            P Offline
            P Offline
            Priya S
            wrote on last edited by
            #5

            if (!IsPostBack) { if (CheckBox1.Checked == false) { Button1.Attributes.Add("onclick", " window.alert('Agree Terms & Conditions to proceed');"); } } i tried like tis, every time it pop-ups the message even after checking the checkbox

            Thanks in advance, Priya.

            V 1 Reply Last reply
            0
            • P Priya S

              if (!IsPostBack) { if (CheckBox1.Checked == false) { Button1.Attributes.Add("onclick", " window.alert('Agree Terms & Conditions to proceed');"); } } i tried like tis, every time it pop-ups the message even after checking the checkbox

              Thanks in advance, Priya.

              V Offline
              V Offline
              varshavmane
              wrote on last edited by
              #6

              Write a javascript function and u check there whether the checkbox is checked or not and then show the alert msg and add this Button1.Attributes.Add("onclick", "Myfun();"); Hope this helps u??

              1 Reply Last reply
              0
              • P Priya S

                i have used code: --------------- imgbtnSub.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); it works fine,but as i have given this under imgsub_click() it pop-up message only during second click i even tried giving onload, not working, hw to pop-up during first time itself

                Thanks in advance, Priya.

                B Offline
                B Offline
                bhavesh3184
                wrote on last edited by
                #7

                Hi try to put your Add attribute code to put under page load as given below and i am sure your prob got solved.and remove code from imgsub_click(). if (!IsPostBack) { ImageButton1.Attributes.Add("onclick", "javascript: return window.alert('Agree Terms & Conditions to proceed');"); } thanks bhavesh

                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