Keeping with the idea of progressive implementation, I have a simple page refresh button on my page. Is there an elegant way to turn that button into an onclick=”ajaxfunction()” event if javascript is enabled?
All I’ve come up with having two buttons, and hiding one with CSS — which seems a bit clunky.
Note, I have the ajax call working, etc – I just want that $%@# button to switch over…
Assuming you’ve a
formwith abuttontype ofsubmit:You can do this: