1

As you may have seen my other questions almost all are realted to input box and sql's, I'm still learning any help is well appreciated.

The following question is how do I show a button to upload... let say an image... using PHP of curse.. but for this example I will only use html, since the ruslt has to be manage by java...

so I have my button working as follow

    <input type="button" id="filers_bordado" value="Upload" class="imgBordado   ">
<script>
 new AjaxUpload("filers_bordado",{action:"upload.php?tmpl=up&amp;op=product&amp;view=product&amp;task=ajaxupload",data :{mname:"filers_bordado"}, name:"filers_bordado",onSubmit : function(file , ext){jQuery("filers_bordado").text("Subiendo" + file);this.disable();}, onComplete :function(file,response){jQuery("&lt;li&gt;&lt;/li&gt;").appendTo(jQuery("#ol_rs_bordado")).text(response);var uploadfiles = jQuery("#ol_rs_bordado li").map(function() {return jQuery(this).text();}).get().join(",");jQuery("#rs_bordado_15").val(uploadfiles);this.enable();jQuery("#rs_bordado").val(uploadfiles);}});
 </script>

This is almost the same as if I where using [ <input type="file" name="file" id="file"> ]

the problem here is not the functionality of my button to upload files to the server, the problem is the way that is use... please allow me...

I have a check box as follow

<input type="checkbox" onclick="javascript:changePropertyDropdown(&quot;15&quot;,&quot;0&quot;,&quot;0&quot;,&quot;8&quot;,&quot;27&quot;,&quot;50&quot;,&quot;50&quot;);" required="0" attribute_name="Posición" class="inputbox" id="property_id_prd_15_0_8" name="property_id_prd_15_0_8[]" value="27">

The script in this checkbox is use to add that value to a different value input which is irrelevant for what I need... when the user check that box I want to show the upload button and make it required, to show or hide the button I'm using the same technique as on my previews question: Show box or input box on checked box

What I can't do is to make that button required... how do I make that button required? ...

Thank you.

Community
  • 1
  • 1
Tanker
  • 1,178
  • 3
  • 16
  • 49

1 Answers1

0

you could add this.required='true'; before your changePropertyDropdown() function.

grape_mao
  • 1,153
  • 1
  • 8
  • 16