Welcome Guest, Not a member yet? Register   Sign In
JS problem
#1

[eluser]Mitja[/eluser]
Code:
<tr>
<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>
</table>
</td>
</tr>
<tr><td><a href="[removed]addArrangementPluspayment()">[+] dodaj novo</a></td></tr>

JS code

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

number++;

}
#2

[eluser]Bramme[/eluser]
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???
#3

[eluser]Mitja[/eluser]
Code:
$(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
#4

[eluser]thinkigniter[/eluser]
Is this jquery?

If it is your function is incorrectly formated.

Try posting in the Jquery forums.




Theme © iAndrew 2016 - Forum software by © MyBB