Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I really don't know what you are really doing. But if you just wan't to write it in a more jQuery way.. This may help..</p> <pre><code>$('#basephoto').append('&lt;tr /&gt;'); $('#basephoto tr').append( $('&lt;td /&gt;') .attr('valign','bottom') .html('Additional photo:') ); $('#basephoto tr').append( $('&lt;td /&gt;') .html('&amp;nbsp;&amp;nbsp;&amp;nbsp;') ); $('#basephoto tr').append( $('&lt;td /&gt;') .html( $('&lt;div /&gt;') .attr({ "id":"addphoto-"+curupld, "class":"browsebg" }) .html( $('&lt;p /&gt;') .attr('class','bpath') .html('') ) ) ); $('#addphoto-'+curupfld).append( $('&lt;input /&gt;') .attr({ "class":"browse transfield", "type":"file", "name":"altphoto-"+curupfld, "size":"40" }) .change(function(){ functionCaller('#addphoto-'+curupfld,this); validateExt(field); }) ); $('#addphoto-'+curupfld).append( $('&lt;span /&gt;') .attr({ "class":"abuttons delbtn", "id":"delbtn-"+curupfld }) .click(function(){ delImgField($(this).attr('id')); }) ); </code></pre> <p>Check out this post to know more how to create elements using jQuery:</p> <ul> <li><a href="http://mongsang-ga.tumblr.com/post/19914049827/how-to-create-a-element-in-jquery" rel="nofollow">http://mongsang-ga.tumblr.com/post/19914049827/how-to-create-a-element-in-jquery</a></li> </ul> <blockquote> <p>I guess you just need to add a line like this then to fix your problem:</p> <pre><code>$('#input_that_has_the_change_event').change(function(){ fillBrowse('#addphoto'+curupfld,this); validateExt(field); }); </code></pre> </blockquote> <p>*P.S.: Don't say it's stupid. I'm just like you before.. :]</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload