WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Skinning check boxes, Guillermo, September 3, 2003
     Re:Skinning check boxes, Johan Tejle, September 3, 2003
         Re:Skinning check boxes, Guillermo, September 3, 2003
             Re:Skinning check boxes, Guilherme Blanco, September 3, 2003
                 Re:Skinning check boxes , Guillermo, September 4, 2003
                 Re:Skinning check boxes, Johan Tejle, September 4, 2003
                     Re:Skinning check boxes, Guillermo, September 17, 2003

Subject: Re:Skinning check boxes From: Guilherme Blanco Date: September 3, 2003

If you'll submit the form (with the checkboxes), you should add:

<form action="page.ext" method="method" name="name_of_form">

Now, in your hidden inputs, follow the same usage you did.

The JS code for the check/uncheck is this:

function check(n) {
  if( document.forms['name_of_form'].elements['ch'+n].value == 1) {
    document.forms['name_of_form'].elements['ch'+n].value = 0;
    out('ImgCh'+n);
  } else {
   
document.forms['name_of_form'].elements['ch'+n].value = 1;
    over('ImgCh'+n);
  }
}


This solves your frm's bug.

PS.: I didn't answer in Spanish (I'm sorry) because I just started learning this language! Maybe in the future I answer it. =)

Hasta luego,
Guilherme Blanco

From: Guillermo
Sent: September 3, 2003
Subject: Re:Skinning check boxes

Yeah, that's what I figured. I used this code:

function check(n){
        if ( document.frm['ch' + n].value == 1){
                document.frm['ch' + n].value = 0;
                out('ImgCh' + n);
        }else{
                document.frm['ch' + n].value = 1;
                over('ImgCh' + n);
        }
}

The form is named "frm", and the check boxes look like this:

<img src="imagenes/nav/check1.gif" name=ImgCh1  id="ImgCh1" onMouseDown="check('1')">
<input name=ch1 type=hidden id="ch12" value=1>

However, I keep getting an error stating that 'document.frm' is null or not a valid object.

 

From: Johan Tejle
Sent: September 3, 2003
Subject: Re:Skinning check boxes

Its done with an image that changes uppon mouseclick and an hidden input field that gets the correct value.

From: Guillermo
Sent: September 3, 2003
Subject: Re:Skinning check boxes

While visiting http://www.intermanagers.com.ar/archivo/archivo.jsp I noticed the skinned check boxes on the right sidabar. I would like to know how this was accomplished, as I tried to do it myself with no luck. I tried to imitate the code used in the site, but I keep getting sintax errors. This is a nice effect, not seen around much.

Thanks for any help.







Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX