S
S
Sergey Shum2018-07-22 21:31:13
MODX
Sergey Shum, 2018-07-22 21:31:13

How can modx migx display an element in a popup window?

Good day!
there was a snag with the site on modx.
the site has product cards with a brief description made using migx, how can I display a pop-up window with this element and a full description when clicking on a button?
Is it possible to do this using migx, or something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Shum, 2018-07-23
@SHSA37 Автор вопроса

Here's what I got, but something doesn't work yet:
Snippet code
<?php
if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {return;}
if (empty($_POST['action'])) {exit();}
$result = '';
switch ($_POST['action']) {
case 'modalid':
$docid = $_POST['docid'];
$scriptProperties = array(
'docid'=>$docid,
'tvname'=>'offer_oborud',
'tpl'=>'modal_towar',
'where'=>'161770'
);
$result = $modx->runSnippet('getImageList',$scriptProperties);
break;
}
exit($result);
conclusion
Read more

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question