Ali,

Thank you for the details of your current problem/solution. Richard has a
good point in that heavy dependence on JavaScript can be problematic. Your
point about server resources when using session variables is valid as well.
Ultimately then you will decide which will provide a bettor solution for
your particular needs. If you decide to use JavaScript, here is a sample of
what I was thinking.

<input type="checkbox"
    ID="cb<%=colName%><%=rowno%>"
    name=""
    onchange="checkboxChangeed(this)">
<input type="hidden"
    ID="h<%=colName%><%=rowno%>"
    name="0<%=colName%><%=rowno%>">

<SCRIPT>
function checkboxChangeed(field){
    var h = document.getElementById("h"+field.id.substr(2));
    h.name="1"+h.name.substring(1);
    h.value = field.checked;//Ali: I think you will know better than I how
to handle the value.
}
</SCRIPT>

Regards,

Colin

----- Original Message -----
From: "Ali Chadorbaf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 11:55 AM
Subject: Re: request.getParameter() question


> Thanks for your reply. Still need more help.
>
> Actually this a checkbox issue. I my case i believe
> your suggestions couldn't help me
> (req.getParameterNames(). Also assign default value)
>
> Let's explain more:
> On client: I have a JSP page like spread sheet(grid).
> some of the columns may be checkboxs. As you know
> checkbox will not pass a value to webserver when is
> un-checked. If any column changed, it's name will
> concatenated by 1. (field.name= "1"+field.name).
>
> On server: The servlet will only request for
> changed-columns and update database.
> request.getParameter("1"+col_name);
>
> This logic works good for all other tags except
> checkboxs.  Because cannot realize the
> 1- checkbox is never changed.
> 2- checkbox is changed to un-check.
> Servlet must ignore the first case but update the
> database for the second case.
>
> Thanks...Ali
> --- Mark Galbreath <[EMAIL PROTECTED]> wrote:
> > Or assign the parameter a default value.
> >
> > Mark
> >
> > -----Original Message-----
> > From: Jeremy W. Redmond
> > Sent: Friday, December 14, 2001 12:31 PM
> >
> > see if it is in the enumeration
> > req.getParameterNames().
> >
> > -----Original Message-----
> >
> > value=request.getParameter("param_name");
> >
> > The above statement in called page will return null
> > in
> > two cases:
> >
> > 1-when the "param_name" is passed with no value
> > 2-when the "param_name" didn't pass at all.
> >
> > How can I differentiate these two. I mean I need to
> > somehow know whether
> > Parameter did not pass or passed with no value.
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
> http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
> http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> > http://www.lsoft.com/manuals/user/user.html
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to