On May 15, 3:25 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
>
> You could easily do this in JQuery, but then you have to realize that
> the site would not work with Javascript disabled.  Since you are going
> to have to do server-side processing anyway, it doesn't seem that big a
> deal to do the separation.
>
My site has two different kind of users, just visitors and workers.
Workers need to have JS albeit still many functions are usable
without. Visitors shouldn't need JS albeit some functionality already
will be missing. IMO we all are fast approching the point where JS is
a requirement for surfing the web.

Beside I asked once about how to create XMLHttpRequests (calling PHP)
so they could be used by both client and server but since I haven't
gotten any good answers I've lost interest. I definitely won't code
the same function twice.

> But if you really don't mind a complete dependency on JS, something like
> this (untested) code should work:
>
>      $("#button1").click(function() {
>          $(this).parents("form")[0].action = "action1.php";
>      });
>      $("#button2").click(function() {
>          $(this).parents("form")[0].action = "action2.php";
>      });
>
Dependency isn't a problem in my case, thanks. Do I have to care about
if these binds are fired before the form or is this guarantied be
definition?

O. Wyss

Reply via email to