• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

ajax result from a drop down in coldfusion

I have a simple form with singe drop down menu.  When the user picks something from this drop menu and clicks submit, I'd like the results of the mysql search to display in a div tag on the same page.

Can this be done with spry?  If so, how?

Thanks Experts!

0
Short-Order-Coder
Asked:
Short-Order-Coder
  • 3
  • 3
1 Solution
 
azadisaryevCommented:
it can be done, and you don't even need spry for it if you are on CF8.
if you are on cf8, check out ColdFusion.navigate() built-in function. you will use it in your select's  onChange event like this:

<select ... onchange="ColdFusion.navigate('url-of-results-page.cfm', 'id-of-div-to-show-results-in', null, null, 'POST', 'id-of-form-conteining-this-select');">

if you are on cf7, it still can be done, but not that easily, as cf7 does not have these new built-in ajax functions... shout if you are on cf7 and need help.

Azadi
0
 
Short-Order-CoderAuthor Commented:
When you refer to select, do you mean the cfquery SQL select?
0
 
azadisaryevCommented:
no, i mean what you call "drop down menu", which i assume is just a <select> or <cfselect> tag... am i wrong? what is your "drop down menu" then?

Azadi
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Short-Order-CoderAuthor Commented:
Ah, I get it.  Will look into the ColdFusion.navigate(), as you suggested.
0
 
azadisaryevCommented:
Hi, Short-Order-Coder.
How did it work out for you? Do you need more help?

Azadi
0
 
Short-Order-CoderAuthor Commented:
sorry for the pause.  schedule has been changed last minute.  I'm just looking at it further.  I'm sure I will be posting a more specific question about it.  This works as a great jumping off point.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now