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. Using function on click event

Using function on click event

Scheduled Pinned Locked Moved ASP.NET
javascriptdatabasehelp
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.
  • M Offline
    M Offline
    mcgann
    wrote on last edited by
    #1

    I have a bound listbox to a sql datasource, the problem I have been having is that when I use the multiple select property I need to perform another procedure to find the highest factor of the selected items and return this to part of the form. I have looked at using javascript but i'm not the best at it so if anyone can think of another way could you let me know.

    M 1 Reply Last reply
    0
    • M mcgann

      I have a bound listbox to a sql datasource, the problem I have been having is that when I use the multiple select property I need to perform another procedure to find the highest factor of the selected items and return this to part of the form. I have looked at using javascript but i'm not the best at it so if anyone can think of another way could you let me know.

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

      Here are the steps that you may do: + Create the handler for the client side events of the listbox control like onclick, onchange, see select element[^]. You can register the handler in the control declaration or in code with the Attributes collection of the control. + Use javascript to walk through the item collection using the the options[^] property to collect the selected items and determine the highest one. You can also easily find lots of sample scripts out there to access the contests of the select element. Just out of curiousity why you don't just do that at the server side as it seems much easier.

      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