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

setting a variable without get or post

Explorer ,
Jan 26, 2009 Jan 26, 2009
Hi,

I want to create and set a variable without get or post, (ajax I suppose then) so I can set a variable without posting my form.

How can I do this?
588
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 ,
Jan 26, 2009 Jan 26, 2009
Hulfy wrote:
> Hi,
>
> I want to create and set a variable without get or post, (ajax I suppose then)
> so I can set a variable without posting my form.
>

You can't do this without get or post. AJAX is still a post, it just
does the post behind the scenes of the browser so that the user
interface is not affected.

But from the server's (aka ColdFusion's) viewpoint, it is just a post,
AKA form variable, no different from any other HTTP post.

There are good "Hello World." ColdFusion and AJAX tutorials all over the
internet. Which one you use depends greatly on what version of
ColdFusion you are using. CF8 has built in AJAX functionality that does
allot of the ground work for you. Earlier versions of ColdFusion work
with AJAX just fine. You just need to take care of more of the details
yourself and|or use one of the community frameworks such as CFCAjax or
the older CFAjax.
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 ,
Jan 26, 2009 Jan 26, 2009
What do you intend to do with the variable after you create it?
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
Explorer ,
Jan 27, 2009 Jan 27, 2009
Hi,

am creating a 5 step form with next and previous buttons. I found an example in CFWACK that does it the way I am at present. I have next and previous button and every step sends the form and sets a part of the form into session variables.

I just thought it may be more economical to set these using CF AJAX features and only post the form after step 5.

cheers,

H.
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 ,
Jan 27, 2009 Jan 27, 2009
LATEST
it is not going to be any more 'economical', because, as has been
mentioned already, even doing it with AJAX call, it will still be a POST
of complete form data, every time, just the posting will happen
'behind-the-scenes', which, in fact, may create more problems with a
multi-step form then solve... i.e. you won't be able to perform
server-side validation and notify user of any errors (important for
those users taht have js disabled, for instance)...

Ben Nadel over at http://www.bennadel.com/ has a very good multi-part
form tutorial (and i think it is different from the one in CFWACK)


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