CodeIgniter Forums
JS problem - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: JS problem (/thread-10087.html)

JS problem - El Forum - 07-18-2008

<td class="arrangementPluspayments">
<table class="arrangementPluspayment">
<tr><td>Fotka: &lt;?php if (isset($error_pluspayment)) echo $error_pluspayment;?&gt;&lt;input type="file" id="file" name="pluspayment_title_photo" /&gt;&lt;/tr>
<tr><td>Opis: <br />&lt;textarea name="pluspayment_description"&gt;&lt;/textarea></tr>
<tr><td><a href="[removed]addArrangementPluspayment()">[+] dodaj novo</a></td></tr>

JS code

var number = 1;
function addArrangementPluspayment() {
var pluspayment = $(".arrangementPluspayment:first").clone(true);
$(pluspayment).children().children("input").name = 'pluspayment_title_photo' + number;



JS problem - El Forum - 07-18-2008

Yeah, you're gonna HAVE to be a little bit more descriptive before we can even consider giving you an answer...

What are we supposed to do with this???

JS problem - El Forum - 07-18-2008

$(pluspayment).children().children("input").name = 'pluspayment_title_photo' + number;

this part not working. Name is not changed. I need to change default name="pluspayment_title_photo" to name="pluspayment_title_photo1"

hope understand me

JS problem - El Forum - 07-20-2008

Is this jquery?

If it is your function is incorrectly formated.

Try posting in the Jquery forums.