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. doubt in Classic ASP

doubt in Classic ASP

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

    Integrator: <Select name=Integrator id=Integrator Size=1 onChange= <% dim sqlTemp dim arrRSTemp dim ConnTemp : Set ConnTemp = cf_OpenConnection() sqlTemp = "Select * from Integrator where atnINtegratorID = 1" set arrRSTemp = Conn.Execute(sqlTemp) Response.Write "Integrator Address: " & arrRSTemp("txtIntegratorAddress") Response.Write "<br>" %>> <option value=''>**No Integrator**</option> <% do until arrRS_Integrator.EOF Response.Write "<option value='" & arrRS_Integrator.Fields(0).value & "'" Response.Write ">" & arrRS_Integrator.Fields(1).value & "</option>" & vbcrlf Call arrRS_Integrator.moveNext() loop %> </select> </code> I have a combo which is used to dropdown some info. Now i want do some coding in the onchange event, as shown above. is this possible? please help me in this, because the code above is not working a bit. NB: I'm a beginner

    A 1 Reply Last reply
    0
    • X Xandip

      Integrator: <Select name=Integrator id=Integrator Size=1 onChange= <% dim sqlTemp dim arrRSTemp dim ConnTemp : Set ConnTemp = cf_OpenConnection() sqlTemp = "Select * from Integrator where atnINtegratorID = 1" set arrRSTemp = Conn.Execute(sqlTemp) Response.Write "Integrator Address: " & arrRSTemp("txtIntegratorAddress") Response.Write "<br>" %>> <option value=''>**No Integrator**</option> <% do until arrRS_Integrator.EOF Response.Write "<option value='" & arrRS_Integrator.Fields(0).value & "'" Response.Write ">" & arrRS_Integrator.Fields(1).value & "</option>" & vbcrlf Call arrRS_Integrator.moveNext() loop %> </select> </code> I have a combo which is used to dropdown some info. Now i want do some coding in the onchange event, as shown above. is this possible? please help me in this, because the code above is not working a bit. NB: I'm a beginner

      A Offline
      A Offline
      Ankur m
      wrote on last edited by
      #2

      AFAIK, this is not the correct way of doing it. You must know that onChange function of the Select box will be executed on the client side. You have written code that will be executed on the server, which is wrong. So what you could do is: onChange of combo box, write a javascript function which will post back the page to itself. Pass the selected id in the QueryString. Now check for the corresponding QueryString in the page. If value is not null, write the code to get values from database (which you have already written). The important thing here is you need to understand how Classic ASP works. Once you know that, it would be easy for you to write code using Classic ASP.

      Xandip wrote:

      NB: I'm a beginner

      I would suggest you to go for ASP.NET if you are starting with Classic ASP. It has a lot of advantages over Classic ASP. You can always Google for them. :rolleyes:

      ..Go Green..

      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