Results 1 to 6 of 6

Thread: Events in ASP

  1. #1
    Join Date
    Jan 2004
    Posts
    53

    Unanswered: Events in ASP

    Hello,

    Is the submit button the only time I can launch an event in asp.

    I really would like to be able to re-query values on either the click event of a combo box or else another way.

    Example: customer # and customer name can either be selected. I want the one that is selected to populate the other.

    Any Suggestions

    Thanks In advance for any help
    Jason

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191

    Re: Events in ASP

    Your question indicates you're misunderstanding what ASP is.

    ASP is a scripting language that runs on the SERVER.... and all ASP code is processed BEFORE anything else. The resultant html is sent to the browser.

    You can call an ASP page in any number of ways... from a form button, from an OnCLick event, or anything else that allows you to load a new url into the browser.

    Other than server triggered events confined to the global.asa file, there are no other ASP "events" in the sense that I think you're asking about.

    To call an ASP page by clicking on something, just use onclick="location.href='yourpage.asp'" in the html element's tag

    Hope this helps.

    Tim
    Tim

  3. #3
    Join Date
    Jan 2004
    Posts
    53
    Thanks Tim,

    Although your opening line was a little harsh. Your answer covers exactly what I finally discovered.

    I wanted to perform the "submit" on something other than "submit"

    Thanks Again
    Jason

  4. #4
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    Sorry.... I did not mean to offend you.
    Tim

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Hi there,...

    To try and help,.. say you want to requery on the change of a select box value...

    In your HTML you change your select box to something like this
    Code:
    <select name="selName" id="selName" onchange="document.form.submit();">
      <option value="1">....etc...,</option>
      ...etc ...
    </select>
    This will submit your form when the value changes.....

    So basically you have to submit.... but you can use something other then a button to do your submit if you use javascript to trigger it.

    Does that help??

  6. #6
    Join Date
    Jan 2004
    Posts
    53
    Thanks so much to all for your help
    Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •