![]() |
adding variable to ajax function
Code:
function dosyaSil(silinecekDosya) {Code:
<?php echo '[<a href="javascript:dosyaSil(\''. $res['picture1']. '\');">sil</a>]';?>how can i change php code and function dosyasil ? thanks |
what is hard about it?
il(\''. $res['picture1']. '\',\''. $res['foo']. '\'); and dosyaSil(silinecekDosya,foo) and var sc="yap=sil&dosya="+silinecekDosya + "&foo=" + foo; Eric |
Quote:
Code:
<?php echo '[<a href="javascript: DosyaSil(\''. $res['picture1']. '\',\''. $res['user_id']. '\');">sil</a>]';?> |
What does the following output when you do a view source on the webpage.
<?php echo '[<a href="javascript: DosyaSil(\''. $res['picture1']. '\',\''. $res['user_id']. '\');">sil</a>]';?> What is the JavaScript error? Do you use Firefox? If you do, you can install the firebug extension [http://www.getfirebug.com] which will make debugging JavaScript easier. Eric |
Error: DosyaSil is not defined
Kaynak dosya: javascript: DosyaSil('asd.jpg','115'); Hat: 1 Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIWebNavigation.loadURI]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/viewSource.js :: viewSource :: line 141" data: no] |
<?php echo '[<a href="javascript: DosyaSil(\''. $res['picture1']. '\',\''. $res['user_id']. '\');return false;">sil</a>]';?>
|
| All times are GMT +1. The time now is 01:10 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.