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. onclientclick problem

onclientclick problem

Scheduled Pinned Locked Moved ASP.NET
javascripthelpsysadmintoolstutorial
1 Posts 1 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.
  • T Offline
    T Offline
    theOzLizard
    wrote on last edited by
    #1

    I am trying to get a value in response to user button selection, eg Butoon 1, button 2, button 3 selected, want sequenceObj ="1,2,3,", this part is ok but not getting anything in code behind. This is what I have and I know it's probably not right but I have not done things like this before. I am hoping some one can tell me how to go about it. in .cs file //there is probably a lot more to do in relation to this but don't know how and is probably why I am not getting values. bnSubmit.OnClientClick = Page.ClientScript.GetPostBackEventReference(this, "sequenceObj.value"); in .js file function buttonClick(s) { sequenceObj.value += s + ","; } function getSequence() //does not get here! { return sequenceObj.value; } in .aspx file <script type="text/javascript"> sequenceObj = new Object(); sequenceObj.value = ""</script> <asp:Button ID="bnSubmit" runat="server" Text="Submit" Width="100%" onclick="bnSubmit_Click" Height="38px" onclientclick="return getSequence()" UseSubmitBehavior="False"/>; Any help would be greatly appreciated.

    theLizard

    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