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

A submenu with cf

Explorer ,
Nov 27, 2008 Nov 27, 2008
Hi,

I have a submenu on a page and I want the user to choose an option without re-sending the current page.

I was going to use the ajax load function in Jquery,( http://docs.jquery.com/Ajax/load#urldatacallback) but the amount of users with javascript turned off makes me a bit nervous. Im using CF8 and was wondering if there is a CF8 way to load my html into a div without sending the current page?

234
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
Engaged ,
Nov 27, 2008 Nov 27, 2008
LATEST
I'm afraid what you're asking is impossible without JavaScript. ColdFusion is server side code, the browser thus needs to request from the server what it wants via loading a page. You can use Ajax to do this without a page refresh, but Ajax is JavaScript...so, yeah.

Create your menu the normal page refresh way, the way forms were meant to work. THEN, add on some JavaScript to submit onchange via Ajax. This way, if the user has JS off, they'll just get the old method instead.

It's called "unobtrusive" use of JavaScript. Where both options are available.

Mikey.
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