Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Use a Jump Menu to Make Selection and stay on same page.

Guest
May 14, 2008 May 14, 2008
I have a form that you select a ID from a drop down list click submit, and then are redirected back to the same page with the results of a query based on the selection from the drop down list. I want to change this so the user doesn't have to click submit... I want my drop down list to act as a jump menu. How do I get my dropdown list to act like a jump menu, which essentially submits the form, and posts the results below?
399
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 14, 2008 May 14, 2008
LATEST
2 ways, both use javascript (you can't do it with just cf):

1) add an onChange attribute to your select with 'this.form.submit()' as
value. this will submit the form, refresh the page and show your results
- just as if user clicked your 'submit' button. be careful, though, if
you are checking for existence of the submit button in your action page
- it won;t be there since it has not been clicked.
2) you can also employ some ajax features to submit your form
asynchronously, 'behind the scenes', and show results without refreshing
the page. CF8 has built-in ajax js functions and tags to do it,
otherwise look into ajaxcfc by rob gonda or jQuery or other js framework
that has these features.

hth


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources