Comments on: AJAX-enabled Smarty plugins https://kpumuk.info/php/ajax-enabled-smarty-plugins/ In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming. Mon, 07 Sep 2015 23:28:04 +0000 hourly 1 https://wordpress.org/?v=6.5.5 By: ChaosNo1 https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-271523 Mon, 16 Feb 2009 21:17:18 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-271523 Hi,

i would like to know if it is possible to call a javascript function before the ajax request will start (to disable form elements or change the text of the button, eg)

]]>
By: raj https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-238789 Wed, 17 Sep 2008 07:22:42 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-238789
1
2
3
4
5
6
7
8
<SELECT NAME="sel_art" onchange="{ajax_update update_id="get_collections" function="show_collections" url="get_collections.php" params="artist_id=1"}">        
            {foreach from=$artist item=arti}           
                <OPTION VALUE="{$arti.id}">{$arti.artist_fname}</OPTION>
            {/foreach}


<SELECT NAME="sel_art" id="get_collections"></SELECT>
            </SELECT>
]]>
By: Alexey@towndwarf https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-219073 Thu, 03 Jul 2008 13:45:19 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-219073 Fatal error: Smarty error: unable to write to $compile_dir ‘/home/hosting/kpumuk.info/samples/smarty_ajax/resources/templates_c’. Be sure $compile_dir is writable by the web server user. in /home/hosting/kpumuk.info/samples/smarty_ajax/include/smarty/Smarty.class.php on line 1095

:-(

]]>
By: Андрей https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-180195 Fri, 04 Apr 2008 19:38:22 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-180195 Добрый день.

Дмитрий, у меня вопрос. Есть форма калькулятора.

1
{ajax_form method="post" id="calculator" url="index.php" params="task=calculator&amp;param=$someparam"}

После submit возвращает на index.php, get параметры не передаются. Если в функции smarty_block_ajax_form убрать action=” – работает, но с перезагрузкой…
Чего не так?

]]>
By: fauzia https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-174860 Tue, 01 Apr 2008 08:50:32 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-174860 hi,

I solved previouse problem.Now I am using ajax_update without function to send params to certain url.I want to send cat_id which is I am getting in section of template page.here is code:

1
2
3
4
5
6
7
8
{section name=cat loop="$category"}    
 <tr>
 <td id="category_trid{$category[cat].id}" class="contenttext2">{$category[cat].id}
 <a href="#" onclick="{ajax_update update_id='productlist_div'   params='catid=`$category[cat].id`&page=product_list_ajax'}">{$category[cat].title}</a>
 </td></tr>
 {sectionelse}
 <tr><td>No category..</td></tr>
{/section}

I am not getting catid value but “$category[cat].id”.why?
but it is giving code text in params not its value

]]>
By: fauzia https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-174832 Tue, 01 Apr 2008 07:50:40 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-174832 hi,

I made a function in index.php getting list of products.
I tpl i called ajax-update function to get list of products in a box.It is giving js-error “Object SmartyAjax not found”.What is my mistake?

]]>
By: Nattaphon https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-171060 Wed, 26 Mar 2008 12:54:12 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-171060 hello kpumuk,
great work, thank you very much.

i found the params isn’t working when using ajax_update.
can’t figure out why.

this code

1
2
3
4
5
{foreach from=$DB_RESULTS item=row_obj key=news_id }
<li>
<a href="#" onclick="{ajax_update update_id='intro_content'  function='view_news' params='page=news&&news_id='$row_obj->news_id' '}">read news</a>
</li>
 {foreachelse}

error display

1
Catchable fatal error: Object of class stdClass could not be converted to string in F:\Website\www\e-job_V2\resources\templates_c\%%3C^3CF^3CFBC54C%%news.tpl.php on line 43

$row_obj->news_id isn’t working

regards,
Nattaphon

]]>
By: digitalapha https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-148575 Wed, 06 Feb 2008 04:50:41 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-148575 I am having difficluty processing the ajax form
here. I m building a simple form, which display info in a table format like Name, Age, etc.

e.g. in the register.php example

{ajax_form method=”post” id=”myform”=”index.php?}



if $_POST()…
echo???

{/ajax_form}

is it possible in the $_POST {

instead of using the echo to put the value to an array, can we display a smarty template out e.g.

$smarty->display(outputgrid.tpl”

i.e. want to process the form, and then assign smart values, and then give back to a smarty template.

]]>
By: Vovanovski https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-127163 Fri, 30 Nov 2007 12:15:53 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-127163 Привет Критик!
Такой вот вопросик по ajax_form:
у тебя в примерах форма сабмититься без перезагрузки страницы по нажатию на кнопку типа submit, а как сделать так, чтобы форма сабмитилась, если например внутри формы есть элемент select и должен происходить сабмит по onchange селекта? Если я пишу в селекте this.form.submit() то происходит перезагрузка страницы.

]]>
By: Дмитрий https://kpumuk.info/php/ajax-enabled-smarty-plugins/comment-page-2/#comment-119390 Tue, 13 Nov 2007 07:03:27 +0000 http://kpumuk.info/ajax/ajax-enabled-smarty-pluginsajax-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd%d1%8b-%d0%b4%d0%bb%d1%8f-smarty/#comment-119390 Дмитрий, а Вы не могли бы уделить немного времени и написать третью часть по использованию данных плагинах, но в этой статье более подробно описать принцип создания и взаимодействия…. если честно, уже столько времени бьюсь и не понимаю многих вещей…вроде и и понятно, но в тоже время не получается… Где то в комментах, некий гражданин выложил улучшенную версию с поддержкой ООП – а это именно то, что меня интересует… просто хочется увидеть мануал, где по этапам расписано, как и что применять…))) Ну если не сложно… Заранее спасибо.

]]>