If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Events in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-04, 11:18
jhuck jhuck is offline
Registered User
 
Join Date: Jan 2004
Posts: 53
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
Reply With Quote
  #2 (permalink)  
Old 03-13-04, 23:33
MrWizard MrWizard is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 03-16-04, 15:14
jhuck jhuck is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 03-16-04, 15:18
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
Sorry.... I did not mean to offend you.
__________________
Tim
Reply With Quote
  #5 (permalink)  
Old 03-16-04, 16:10
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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??
Reply With Quote
  #6 (permalink)  
Old 03-22-04, 10:53
jhuck jhuck is offline
Registered User
 
Join Date: Jan 2004
Posts: 53
Thanks so much to all for your help
__________________
Jason
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On