Jump to content

Preventing double clicks

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Guest_leon_*

Guest_leon_*
  • Guests
If I wanted to use CF instead of JavaScript to prevent a user from double-clicking on a submit button and submitting their data more than once, what would it be?

#2
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
I know using javascript it is very easy


<INPUT TYPE="Button" 

       VALUE="Change Quantities" 

       onClick="if(this.value == 'Change Quantities') this.form.submit(); 

        this.value = 'Button already clicked';"> 


CF is server side so it can't do much for you on the client side.

#3
Guest_Kaabi_*

Guest_Kaabi_*
  • Guests
So that's just another thing Coldfusion can't do, what is it's main purpose anyway? I think I'm going to read that "What is Coldfusion?" thread to further understand it.

#4
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Yup, coldfusion is like php. Ran on the server side. You need to use java or even better, AJAX to run things on the client side.