> Message: 2
> From: Venkata Banda <[EMAIL PROTECTED]>
> To: "Dbforms (E-mail)" <[EMAIL PROTECTED]>
> Date: Thu, 29 Aug 2002 11:25:28 +0530
> Subject: [dbforms] Goto button .
> 
> Hi,
> I have been using DbForms to develop an application.
> I have a small requirement :
> 
> From a table I tried to display the records with a radio button attached to
> each row.I have provided two buttons namely Edit and Delete.Both these
> buttons are "goTo" buttons.I have gone for a goTo button instead of
> db:update and db:delete buttons, the reason being, I want the user to
> navigate to a page where he can update/delete the details of the selected
> row.
> 
> Now the problem here is: If the user skips selecting a radio and tries to
> use the Edit button, he will get the edit page with details from the first
> row of the destination table.
> To be clear enough, if the radio is not selected the default key position is
> set to the first row of the table.In the destination jsp I can't use a
> whereClause since this dominates the key position value sent by the goto
> button.How do I stop the user from using the goto button without selecting
> the radio ?
> 
> Please send me a solution  for the above problem.

You can make use of the javascript "onClick" event of the deleteButton
and updateButton tags. Find all radioboxes in the form
(document.forms[dbform].etc) and check if anyone is checked. If all are
unchecked, then, display an alert message and return false, else return true:

<db:updateButton onCheck="return checkRadioBoxes()"/>

---
Stratos Nikolaidis
Thessaloniki, Greece

-------------------------------------------------------------
http://www.mail.gr/ - Get Your Private Free Email Address!
http://www.ringtone.gr/ - Ringtones & Logos for your mobile!


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to