jquery looping include php
Posted
by mapet
on Stack Overflow
See other posts from Stack Overflow
or by mapet
Published on 2010-05-19T06:25:51Z
Indexed on
2010/05/19
6:30 UTC
Read the original article
Hit count: 134
jQuery
Jquery Code:
$(function() {
$("#submit").click(function(){
var pilaMan = 2;
for (i=0; i < pilaMan; i++)
{
$('#dialog_link').dialog({
modal: false,
autoOpen: false,
width: 800,
height: 300,
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('#dialog' + i).click(function(){
$('#dialog_link' ).dialog('open');
var lineCode = $('#lineCode').currentElem.prev().val();
alert(lineCode);
return false;
});
}
});
My Problem with my jquery Code i cant get the exact value of $amew.. and also when i alert the lineCode it will return undefined :(
php code:
$amew = "loso, nimo";
$count = 0;
$array = explode(" ", $amew)
foreach ($array as $value) {
echo '<td width="68" class="rep" id="dialog'.$count.'">';
echo '<input type="text" id="lineCode'" value="'.$value.'">';
echo '</td';
}
my problem with my php code is so redundant my jquery codes i solving this for 10 hours and still i cant get it need help guys:(
© Stack Overflow or respective owner