Several submit actions in one form

Sometimes you need to have several actions to be submitted on the same form. Usually you only have one button for this which points to the place you define on the FORM ACTION block.
So, how can you detect which button was clicked in plain HTML?

You can use the value variable on button, this way:

1
2
3
4
5
6
<FORM METHOD="whatever" ACTION="/your/endPoint/">


<button name="btnaction" value="accept" class="..." type="submit">Accept 1</button>"
<button name="btnaction" value="dontAccept" class="..." type="submit">Dont Accept</button>"
<button name="btnaction" value="maybe" class="..." type="submit">Maybe Accept</button>"

And in your code just check the btnAction parameter variable for accept, dontAccept or maybe values. Easy!

Show block id on Linux devices

This is the kind of things I have to seach everytime I need to install a new drive on a computer. As this is the kind of things I don’t do everyday, I forget it.

So… How list the devices IDs on a Linux system?. Just like this:

1
2
3
4
5
root@caronte:~# blkid
/dev/sda1: UUID="d5a0a58e-13bc-46bb-b106-de5219dd7259" TYPE="ext4" PARTUUID="92e8992d-01"
/dev/sda2: UUID="14fa763f-0861-41c3-ba52-ce25e94e009a" TYPE="ext4" PARTUUID="92e8992d-02"
/dev/sdb1: UUID="5bd7c629-74af-4714-b3f6-34bab7a988b0" TYPE="ext4" PARTUUID="dd4daff0-c29a-4489-ab93-06e3929e2cad"
/dev/sdc1: UUID="42123f82-e997-46b6-9dc7-d1d7f521379f" TYPE="ext4" PARTUUID="151b9380-01"

My Hello World

Welcome to my brand new blog!.

As I pretend to write about technologies I use, I cannot imagine a better way to start:

1
2
3
4
5
 _   _      _ _        __        __         _     _ 
| | | | ___| | | ___ \ \ / /__ _ __| | __| |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|

Disclaimer:

I’m a non-english speaker. My spoken english is far to be fluent but I think I can make a good job trying to write it. And it should improve on future, as it’s part of what I want ot do with this new blog.

What can you find here?

I’ve been programmer (gwBasic, Clipper, Visual Basic, Perl, Java, Groovy) and systems analyst (or SysOp, SysAdmin, BOFH or whatever you want) since 1985. So I’ll write to whatever I find interesting but always related to technical questions. I have other blog for personal questions and for some time (maybe some day…) I had another one for aviation information: aerotrastornados.com

Tagging

All posts will have some tags. First for language [eng | esp]. Next for topic, and I’ll try to keep the list as short as possible: [programming | systems | java | groovy | grails | linux]

No more to write right now. Just let’s see if I can publish it without further problems before start customization, fonts, images and so on.