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. ASP.NET
  4. Java script for confirm

Java script for confirm

Scheduled Pinned Locked Moved ASP.NET
javasharepointtoolshelpquestion
2 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.
  • R Offline
    R Offline
    ramyasangeet
    wrote on last edited by
    #1

    hi all, I have a Dropdown box(Active/Inactive) in Asp updateform.If the user selects Inactive and updates the form,then SP gives an output message that Inactive is selected. Here i need to keep an confirm box using java script.This should be called only when Inactive is selected. So i wrote code like this //.cs protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { if (myCommand_update.Parameters["@out_Message"].Value != DBNull.Value) { Status_Msg.Text = Convert.ToString(myCommand_update.Parameters["@out_Message"].Value); update_btn.Attributes.Add("onclick","return confirm_update();") } } //java script function confirm_update() { if (confirm("Would you like to Inactive the same?")==true) return true; else return false; } but it is not working. If active is selected there will be no ouput meaasge. Plz help me to find the solution Thanks in advance,

    cheers sangeet

    G 1 Reply Last reply
    0
    • R ramyasangeet

      hi all, I have a Dropdown box(Active/Inactive) in Asp updateform.If the user selects Inactive and updates the form,then SP gives an output message that Inactive is selected. Here i need to keep an confirm box using java script.This should be called only when Inactive is selected. So i wrote code like this //.cs protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { if (myCommand_update.Parameters["@out_Message"].Value != DBNull.Value) { Status_Msg.Text = Convert.ToString(myCommand_update.Parameters["@out_Message"].Value); update_btn.Attributes.Add("onclick","return confirm_update();") } } //java script function confirm_update() { if (confirm("Would you like to Inactive the same?")==true) return true; else return false; } but it is not working. If active is selected there will be no ouput meaasge. Plz help me to find the solution Thanks in advance,

      cheers sangeet

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #2

      try running your code like this first, function confirm_update() { alert('hello'); } in this way you can be sure that your function is being called or not. if you see pop up saying 'hello' then there would be something wrong with your code which this, function confirm_update() { if (confirm("Would you like to Inactive the same?")==true) return true; else return false; }

      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