Jump to content


Disable form button


6 replies to this topic

#1 _*Creative Insanity_*

  • Guests

Posted 09 May 2007 - 11:12 AM

Ok I have buttons on a page that I want pressed in an order and so I want to disable the buttons except the first one and then enable the next stage button and disable the first and so on.

I hunted the net but all the info I can find use a form name and these are just form buttons with no form, so could someone help with this please?

ta muchly.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 May 2007 - 11:22 AM

Use those tutorials, but give the buttons id's so that they can be selected using getElementById() rather than the DOM.

#3 _*Creative Insanity_*

  • Guests

Posted 09 May 2007 - 11:41 AM

Yeah ok, never thought of that.. will give that a crack now. Thanks

#4 Archangel

    P2L Jedi

  • Members
  • PipPipPip
  • 988 posts
  • Gender:Male
  • Location:Indiana
  • Interests:Reading (mainly fantasy books), Gaming (Xbox 360, Wii & PS3), Sports, Outdoor Recreation, Watching/Collecting Movies

Posted 09 May 2007 - 08:22 PM

and if you don't want them to submit the page just use the javascript "return false"

#5 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 May 2007 - 08:49 PM

He's not even using a form. What would return false?

#6 Archangel

    P2L Jedi

  • Members
  • PipPipPip
  • 988 posts
  • Gender:Male
  • Location:Indiana
  • Interests:Reading (mainly fantasy books), Gaming (Xbox 360, Wii & PS3), Sports, Outdoor Recreation, Watching/Collecting Movies

Posted 11 May 2007 - 08:00 AM

sorry, missed that...shoot me now. I don't deserve to live.

#7 curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 21 May 2007 - 03:39 AM

i think u will find u dont use <input type="" u actually use <button>

yes, its true, there is a button tag!! acts like input button but u can put images inside and stuff, acs like a div!!! but u can make them inactive :biggrin:...sumhow...lol

thats how people do it, just dont ask me how lol...but yes, the button tag

read...

http://particletree.com/features/rediscove...button-element/

another thing, if u use button tag, cant u just do like, onclick="document.getElementById('button').innerHTML = 'a non linking state in here'" or however u write it........

Edited by rc69, 21 May 2007 - 04:49 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users