Function JavaScript not works

QuestionsFunction JavaScript not works
C3media asked 8 years ago

Hi Community,

I'm trying to send grid ID from Javascript function and not works, this is my function code:

<script>
function process(){
var rowid = jQuery('#list1').jqGrid('getGridParam','selrow');
$.ajax({
data: rowid,
url: 'file.php',
type: 'post',
beforeSend: function () {
$("#result").html("Processing, please wait…");
},
success: function (response) {
$("#result").html(response);
}
});
}
</script>

And this is my button Call from grid:

$buttons_html = "<input type='image' width=250 height=120 src='$upload_url/{tarjeton}' href='javascript:;' onclick='process();return false;'>";
$col["default"] = $buttons_html;

Somebody maybe have any solution to my problem, Thanks!

1 Answers
Abu Ghufran answered 8 years ago

Everything looks ok. Check if there is some JS error in debugger console tab (f12)
Another issue could be of timings. Try calling process() in setTimeout('process()',200);

Your Answer

19 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?