how to apply infinte scroll to this costom pagination page - javascript

I'm using this page to list all the users to a page. I'm listing it using custom pagination, now I have to display using infinite scroll using ajax or jquery . googled/stackoverflowed lots of solutions nothings seems to work with this custom pagination in the page
$paging_Obj = new Pagination();
$perPagerecord = 6;
$page = $this->getRequest()->getParam('page');
if($page){
$start = ($page - 1) * $perPagerecord;
}else{
$start = 0;
}
if($page == 0){
$page = 1;
}
$prev = $page - 1;
$next = $page + 1;
$limitCond = "LIMIT $start, $perPagerecord";
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
//echo $artistTotalQuery = "SELECT * FROM marketplace_userdata WHERE mageuserid IN (SELECT userid FROM marketplace_product GROUP BY userid) AND partnerstatus = 'Seller' AND wantpartner = '1' ORDER BY autoid ASC";die;
$artistTotalQuery = "SELECT mu.*,cev.value as first_name,cev1.value as last_name FROM marketplace_userdata as mu LEFT JOIN customer_entity_varchar AS cev ON (cev.entity_id = mu.mageuserid) AND (cev.attribute_id = '5') LEFT JOIN customer_entity_varchar AS cev1 ON (cev1.entity_id = mu.mageuserid) AND (cev1.attribute_id = '7') WHERE mu.mageuserid IN (SELECT userid FROM marketplace_product GROUP BY userid) AND mu.partnerstatus = 'Seller' AND mu.wantpartner = '1'
GROUP BY cev.entity_id ORDER BY cev1.value ASC";
$sellerlist_total = $readConnection->fetchAll($artistTotalQuery);
$count = count($sellerlist_total);
$artistQuery = "SELECT mu.*,cev.value as first_name,cev1.value as last_name FROM marketplace_userdata as mu LEFT JOIN customer_entity_varchar AS cev ON (cev.entity_id = mu.mageuserid) AND (cev.attribute_id = '5') LEFT JOIN customer_entity_varchar AS cev1 ON (cev1.entity_id = mu.mageuserid) AND (cev1.attribute_id = '7') WHERE mu.mageuserid IN (SELECT userid FROM marketplace_product GROUP BY userid) AND mu.partnerstatus = 'Seller' AND mu.wantpartner = '1' GROUP BY cev.entity_id ORDER BY cev1.value ASC $limitCond";
$sellerlist = $readConnection->fetchAll($artistQuery);
if($count>0){
?>
<?php
$categories = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*')->addIsActiveFilter();
$allcatid = array();
$k=0;
foreach ($categories as $c) {
$allcatid[$k] = $c->getId();
$k++;
}
$finalcat=array_shift($allcatid);
?>
<div class="div_Row">
<?php
$pagination = "";
$nextDisplayPagesLimit = 3;
$callPaging = $paging_Obj->Pagination($pagination,$count,$nextDisplayPagesLimit,$perPagerecord,$page,$next,$prev,$redirectUrl);
echo $callPaging;
?>
</div>
</div>
</div>
<div class="div_Row">
<?php
$m = 1;
foreach($sellerlist as $seller){
$customerid=$seller['mageuserid'];
$customer=Mage::getModel('customer/customer')->load($customerid);
/*********User Total Products and get last add product image Start************/
$query = "SELECT count(*) as total, max(mageproductid) as lastProduct_id FROM marketplace_product WHERE userid = $customerid";
$Product_result = $readConnection->fetchAll($query);
$totalProducts = $Product_result[0]['total'];
if(isset($totalProducts) && $totalProducts > 0){
$product_id = $Product_result[0]['lastProduct_id'];
$productDetails = Mage::getModel('catalog/product')->load($product_id);
$height = $this->helper('catalog/image')->init($productDetails, 'small_image')->getOriginalHeight();
$width = $this->helper('catalog/image')->init($productDetails, 'small_image')->getOriginalWidth();
$Product_image = $this->helper('catalog/image')->init($productDetails, 'small_image');
}else{
$Product_image = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$APHolder;
//$profileURLArtist = Mage::getUrl()."marketplace/seller/profile/".$seller['profileurl']."/list";
$profileURLArtist = Mage::getUrl()."artist/".$seller['profileurl'];
?>
<div class="Artist_list_box span4">
<div class="Artist_main_img">
<a class="product-image-listing" href="<?php echo $profileURLArtist; ?>">
<img alt="<?php echo $customer_name; ?>" title="" src="<?php echo $Product_image;?>" style="width:<?php echo $widthRe."px";?>;max-width:<?php echo $widthRe."px";?>;margin-top:<?php echo $imageHeightDiff."px";?>; margin-left:<?php echo $imageWidthDiff."px";?>;">
</a>
</div>
<div class="List_inner_box">
<!-- <div class="List_them_bg">
</div>-->
<div class="List_inner_text">
<div class="list_Name_title">
<?php echo $customer_name; ?>
<?php if($city!='' && $country!=''){?>
<span> <?php echo $city.", ".$country;?></span>
<?php }?>
<div class="pieces"><p style="margin-bottom:0;"><?php echo $totalProducts?> Artworks</p></div>
</div>
<div class="List_them">
<a href="<?php echo $profileURLArtist; ?>">
<img style="height:50px;width:50px;" alt="<?php echo $customer_name; ?>" src="<?php echo $logo;?>">
</a>
</div>
<div class="list_text"><?php //echo $customer_desc;?></div>
</div>
</div>
</div>
<?php if($m % 4 == 0){?>
<div style="clear:both"></div>
<?php } $m++;?>
<?php
} ?>
</div>
<div class="div_Row">
<div class="pager">
<?php
$pagination = "";
$nextDisplayPagesLimit = 3;
$callPaging = $paging_Obj->Pagination($pagination,$count,$nextDisplayPagesLimit,$perPagerecord,$page,$next,$prev,$redirectUrl);
echo $callPaging;
?>
</div>
</div>
<?php

have you tried Paul Irishs jquery plugin?
https://github.com/paulirish/infinite-scroll
Should work

Related

How to disable button and change color if the time is expire

PHP Code:
<?php
include 'security.php';
$mysqli = new mysqli('localhost', 'root', '', 'halcondentalclinic');
if (isset($_GET['date'])) {
$date = $_GET['date'];
$stmt = $mysqli->prepare("select * from bookings where dates = ?");
$stmt->bind_param('s', $date);
$bookings = array();
if ($stmt->execute()) {
$result = $stmt->get_result();
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$bookings[] = $row['timeslot'];
}
$stmt->close();
}
}
}
$duration = 30;
$cleanup = 00;
$start = "9:00";
$end = "16:00";
function timeslots($duration, $cleanup, $start, $end)
{
$start = new DateTime($start);
$end = new DateTime($end);
$interval = new DateInterval("PT" . $duration . "M");
$cleanupinterval = new DateInterval("PT" . $cleanup . "M");
$slots = array();
for ($intStart = $start; $intStart < $end; $intStart->add($interval)->add($cleanupinterval)) {
$endPeriod = clone $intStart;
$endPeriod->add($interval);
if ($endPeriod > $end) {
break;
}
$slots[] = $intStart->format("H:iA") . "-" . $endPeriod->format("H:iA");
}
return $slots;
}
?>
html and php
<div class="container">
<h1 class="text-center">Book for Date: <?php echo date('m/d/Y', strtotime($date)); ?></h1>
<hr>
<div class="row">
<div class="col-md-12">
<?php echo isset($msg) ? $msg : ""; ?>
</div>
<?php $timeslots = timeslots($duration, $cleanup, $start, $end);
foreach ($timeslots as $ts) {
?>
<div class="col-md-2">
<div class="form-group">
<?php if (in_array($ts, $bookings)) { ?>
<button class="btn btn-danger"><?php echo $ts; ?></button>
<?php } else { ?>
<button class="btn btn-success book"
data-timeslot="<?php echo $ts; ?>"><?php echo $ts; ?></button>
<?php } ?>
</div>
</div>
<?php
} ?>
</div>
</div>
This is the appointment system I want if the date is already past the button for the calendar time change to red and become disabled. For example, 9:00 am - 9:30 am so if the date is already 12:00 pm the 9:00 am - 9:30 become disabled
It is possible to do it? Sorry I am a beginner in PHP and MySQL.
I am not Php developer but as I see you can define a php function to check time is past
function isPastTime($time){
// check $time is past
}
And when you render view, you can add class to remark past booking
<?php if(isPastTime){ ?>
<button class="btn btn-past"><?php echo $ts;?></button>
.btn-past {
color: red;
pointer-events: none;
}
It is my advise. Hope you can resolve it.

Option buttons don't reload page automatically in PHP, I cannot find the error in my code

I am working on my PHP assignment and I want to use option buttons, which reload the page automatically when I choose between them. I tried to figure out what the problem might be, but I can't find the error in the code. Below is what I've done so far, but it doesn't work for some reason.
This is my javascript code(album-list.js):
document.getElementById("album-sort").addEventListener("change", function (e) {
let current_url = window.location.href
window.location = updateQueryStringParameter(current_url, "sort", e.value)
})
This is my own function:
function get_album_list($offset = 0, $limit = PAGE_LIMIT, $artist = null, $sorting = "title_asc")
{
global $db;
$sql = "SELECT * FROM albums";
if ($artist) {
$artist = $db->real_escape_string($artist);
$sql .= " WHERE artist = '$artist'";
}
$order = "";
switch ($sorting) {
case "title_desc":
$order = " ORDER BY title DESC";
break;
case "year_asc":
$order = " ORDER BY year ASC";
break;
case "year_desc":
$order = " ORDER BY year DESC";
break;
default:
$order = " ORDER BY title ASC";
break;
}
$sql .= $order;
$sql .= " LIMIT $limit OFFSET $offset";
$result = $db->query($sql);
return $result;
}
This is where I want to use:
<?php
$artist = isset($_GET["artist"]) ? $_GET["artist"] : null;
$sort = isset($GET["sort"]) ? $_GET["sort"] : "title_asc"; // Here is the mistake. $GET--> $_GET
$current_page = isset($_GET['page']) ? $_GET['page'] : 1;
$limit = ($current_page - 1) * PAGE_LIMIT;
$total_pages = get_album_count($artist) / PAGE_LIMIT;
$albums = get_album_list($limit, PAGE_LIMIT, $artist, $sort);
?>
<?php
<div class="page page-albums">
<h2>Just for you</h1>
<?php if ($albums->num_rows <= 0) : ?>
<div class="alert alert-warning">
There is no album
</div>
<?php else : ?>
<div class="album-list">
<select id="album-sort">
<option value="title_asc">Title asc</option>
<option value="title_desc">Title desc</option>
<option value="year_asc">Release date asc</option>
<option value="year_desc">Release date desc</option>
</select>
<?php while ($album = $albums->fetch_assoc()) : ?>
<?php include('_album_list_item.php'); ?>
<?php endwhile; ?>
</div>
<ul class="pagination">
<?php for ($i = 1; $i < $total_pages + 1; $i++) : ?>
<li>
<?php if ($i == $current_page) : ?>
<span><?php echo $i; ?></span>
<?php else : ?>
<?php echo $i; ?>
<?php endif; ?>
</li>
<?php endfor; ?>
</ul>
<?php endif; ?>
</div>
<script src="<?php echo asset('js/album-list.js'); ?>"></script>
<?php include "functions.php"; ?>
Try adding this to your album-list.js file.
function updateQueryStringParameter(uri, key, value) {
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
if (uri.match(re)) {
return uri.replace(re, '$1' + key + "=" + value + '$2');
}
else {
return uri + separator + key + "=" + value;
}
}
In answer to your other question:
<?php
$artist = isset($_GET["artist"]) ? $_GET["artist"] : null;
$sort = isset($_GET["sort"]) ? $_GET["sort"] : "title_asc";
$current_page = isset($_GET['page']) ? $_GET['page'] : 1;
$limit = ($current_page - 1) * PAGE_LIMIT;
$total_pages = get_album_count($artist) / PAGE_LIMIT;
$albums = get_album_list($limit, PAGE_LIMIT, $artist, $sort);
$titleSelect1 = '';
$titleSelect2 = '';
$titleSelect3 = '';
$titleSelect4 = '';
if($sort == 'title_asc'){
$titleSelect1 = 'selected';
}
if($sort == 'title_desc'){
$titleSelect2 = 'selected';
}
if($sort == 'year_asc'){
$titleSelect3 = 'selected';
}
if($sort == 'year_desc'){
$titleSelect4 = 'selected';
}
?>
<?php
<div class="page page-albums">
<h2>Just for you</h1>
<?php if ($albums->num_rows <= 0) : ?>
<div class="alert alert-warning">
There is no album
</div>
<?php else : ?>
<div class="album-list">
<select id="album-sort">
<option value="title_asc" <?php echo $titleSelect1;?>>Title asc</option>
<option value="title_desc" <?php echo $titleSelect2;?>>Title desc</option>
<option value="year_asc" <?php echo $titleSelect3;?>>Release date asc</option>
<option value="year_desc" <?php echo $titleSelect4;?>>Release date desc</option>
</select>
<?php while ($album = $albums->fetch_assoc()) : ?>
<?php include('_album_list_item.php'); ?>
<?php endwhile; ?>
</div>
<ul class="pagination">
<?php for ($i = 1; $i < $total_pages + 1; $i++) : ?>
<li>
<?php if ($i == $current_page) : ?>
<span><?php echo $i; ?></span>
<?php else : ?>
<?php echo $i; ?>
<?php endif; ?>
</li>
<?php endfor; ?>
</ul>
<?php endif; ?>
</div>
<script src="<?php echo asset('js/album-list.js'); ?>"></script>
<?php include "functions.php"; ?>
After I reviewed your answer again and thinking for a while, I came to the conclusion that it might be possible to solve this in a shorter way. Since it still works, I think the code is right, but correct me if I'm wrong.
<?php
$artist = isset($_GET["artist"]) ? $_GET["artist"] : null;
$sort = isset($_GET["sort"]) ? $_GET["sort"] : "title_asc";
$current_page = isset($_GET['page']) ? $_GET['page'] : 1;
$limit = ($current_page - 1) * PAGE_LIMIT;
$total_pages = get_album_count($artist) / PAGE_LIMIT;
$albums = get_album_list($limit, PAGE_LIMIT, $artist, $sort);
?>
<?php include "_header.php"; ?>
<div class="page page-albums">
<h2>Just for you</h1>
<?php if ($albums->num_rows <= 0) : ?>
<div class="alert alert-warning">
There is no album
</div>
<?php else : ?>
<div class="album-list">
<select id="album-sort">
<option value="title_asc" <?php echo isset($_GET["sort"]) ? $_GET["sort"] == "title_asc" ? "selected" : "" : ""?> >Title asc</option>
<option value="title_desc" <?php echo isset($_GET["sort"]) ? $_GET["sort"] == "title_desc" ? "selected" : "" : ""?> >Title desc</option>
<option value="year_asc" <?php echo isset($_GET["sort"]) ? $_GET["sort"] == "year_asc" ? "selected" : "" : ""?> >Release date asc</option>
<option value="year_desc" <?php echo isset($_GET["sort"]) ? $_GET["sort"] == "year_desc" ? "selected" : "" : ""?> >Release date desc</option>
</select>
<?php while ($album = $albums->fetch_assoc()) : ?>
<?php include('_album_list_item.php'); ?>
<?php endwhile; ?>
</div>
<ul class="pagination">
<?php for ($i = 1; $i < $total_pages + 1; $i++) : ?>
<li>
<?php if ($i == $current_page) : ?>
<span><?php echo $i; ?></span>
<?php else : ?>
<?php echo $i; ?>
<?php endif; ?>
</li>
<?php endfor; ?>
</ul>
<?php endif; ?>
</div>
<script src="<?php echo asset('js/album-list.js'); ?>"></script>
<?php include "_footer.php"; ?>

How to Create Load More With PHP and PDO

i want to create load more to my site, but when i try to click load more it just load 2 items.
my index.php
<div class="postList">
<?php
// Include the database configuration file
include 'koneksi.php';
// Get records from the database
$query = $db->prepare("SELECT * FROM master_post, posting WHERE master_post.master_post_name = posting.master_post_name AND posting.sticky = 'Normal' ORDER BY posting.idpost DESC LIMIT 2");
$query->execute();
if($query->rowCount() > 0){
while($row = $query->fetch()){
$postID = $row['idpost'];
?>
<div class="list_item"><?php echo $row['file_name']; ?></div>
<?php } ?>
<div class="show_more_main" id="show_more_main<?php echo $postID; ?>">
<span id="<?php echo $postID; ?>" class="show_more" title="Load more posts">Show more</span>
<span class="loding" style="display: none;"><span class="loding_txt">Loading...</span></span>
</div>
<?php } ?>
</div>
my javascript
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click','.show_more',function(){
var ID = $(this).attr('id');
$('.show_more').hide();
$('.loding').show();
$.ajax({
type:'POST',
url:'ajax_more.php',
data:'id='+ID,
success:function(html){
$('#show_more_main'+ID).remove();
$('.postList').append(html);
}
});
});
});
</script>
my ajax_more.php
if(!empty($_POST["id"])){
// Include the database configuration file
include 'koneksi.php';
// Count all records except already displayed
$query = $db->prepare("SELECT COUNT(*) as num_rows FROM master_post, posting WHERE master_post.master_post_name = posting.master_post_name AND posting.sticky = 'Normal' AND posting.idpost < ".$_POST['id']." ORDER BY posting.idpost DESC");
$row = $query->fetch();
$totalRowCount = $row['num_rows'];
$showLimit = 2;
// Get records from the database
$query = $db->query("SELECT * FROM master_post, posting WHERE master_post.master_post_name = posting.master_post_name AND posting.sticky = 'Normal' AND posting.idpost < ".$_POST['id']." ORDER BY posting.idpost DESC LIMIT $showLimit");
if($query->rowCount() > 0){
while($row = $query->fetch()){
$postID = $row['idpost'];
?>
<div class="list_item"><?php echo $row['file_name']; ?></div>
<?php } ?>
<?php if($totalRowCount > $showLimit){ ?>
<div class="show_more_main" id="show_more_main<?php echo $postID; ?>">
<span id="<?php echo $postID; ?>" class="show_more" title="Load more posts">Show more</span>
<span class="loding" style="display: none;"><span class="loding_txt">Loading...</span></span>
</div>
<?php } ?>
<?php
}
}
I'm not sure where the mistake is. im using tutorial from this site https://www.codexworld.com/load-more-data-using-jquery-ajax-php-from-database/

I am not able to display the details of products in my site

When I click on a product, I want the image to enlarge and also show the details of the product. Enlarging of image is working but I cannot get the details of the product.
Here is my code:
<script type="text/javascript">
$(function($){
var addToAll = false;
var gallery = true;
var titlePosition = 'inside';
$(addToAll ? 'img' : 'img.fancybox').each(function(){
var $this = $(this);
var title = $this.attr('title');
var src = $this.attr('data-big') || $this.attr('src');
var a = $('').attr('href', src).attr('title', title);
$this.wrap(a);
});
if (gallery)
$('a.fancybox').attr('rel', 'fancyboxgallery');
$('a.fancybox').fancybox({
titlePosition: titlePosition
});
});
$.noConflict();
</script>
fancy box
<div class="fancybox" align="center">
<?php
require_once("admin/config/connection.php");
$proname = "";
$proitems = "";
$pid = "";
$query1 = "select * from products where protype='Bicycle/ Tricycle'";
$resource1 = mysql_query($query1, $connection);
$result1 = "";
$id = "";
while ($record = mysql_fetch_array($resource1)) {
$pid = $record['pid'];
$img = "uploads/" . $record['proimg'];
$proname = $record['proname'];
//$proitems=$record['proitem'];
$result1 .= "<div class='col-lg-4 col-md-4 col-sm-4 col-xs-12 mrgn_less prd'>
<img class='fancybox' src='$img' >
</div>";
}
?>
You didn't echo the result u have to do it after the while loop. put this after the while loop.
echo $result1;
<div class="fancybox" align="center">
<?php
require_once("admin/config/connection.php");
$proname = "";
$proitems = "";
$pid = "";
$query1 = "select * from products where protype='Bicycle/ Tricycle'";
$resource1 = mysql_query($query1, $connection);
$result1 = "";
$id = "";
while ($record = mysql_fetch_array($resource1)) {
$pid = $record['pid'];
$img = "uploads/" . $record['proimg'];
$proname = $record['proname'];
//$proitems=$record['proitem']; ?>
<div class='col-lg-4 col-md-4 col-sm-4 col-xs-12 mrgn_less prd'>
<div style="float:left;"> <img class='fancybox' src= <?php echo $img; ?> /> </div>
<div style="float:left;"> <label> Product Name:-</label> <?php echo $proname;?> </div>
<?php } ?>
</div>

Dynamically values parse to Popup Model Box from PHP Page

I was trying to parse the php data values which inside the while loop to the popup model .
Sample Code
<?php
include("connect.php");
$sql = 'SELECT id FROM products WHERE tag="mixed" ORDER BY id DESC LIMIT 5';
mysql_select_db('levels');
$retval = mysql_query( $sql, $db_server );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
$id = $row['id'];
?>
<div onclick="showDialog('#dialog6');show_data();">
<div id="getid">
<?php echo $id; ?>
</div>
</div>
<?php
}
mysql_close($db_server);
?>
<script>
function showDialog(id){
var dialog = $(id).data('dialog');
dialog.open();
}
function show_data(){
var x = document.getElementById("getid").innerHTML;
document.getElementById("demo").innerHTML = x;
}
</script>
<!-- Popup Model -->
<div data-role="dialog" id="dialog6" >
<div id="demo"> </div>
</div>
Let's say if i have id => 1 to 10 , above code writing last 5 items from the table. which are 6 7 8 9 10 . ( it's working perfectly ) .
my requirement is to when i click the 7 it should parse 7 to the popup model. ( or let's say to the innerHTML of ).
it only parsing the first value ( 5 ) . to all onclick events when i click the each number.
PS : this is test using mysql not mysqli or pdo :) .
Thanks in Advance !
Try this. Hope it helps.
$sql = 'SELECT id FROM products WHERE tag="mixed" ORDER BY id DESC LIMIT 5';
mysql_select_db('levels');
$retval = mysql_query( $sql, $db_server );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
$id = $row['id'];
?>
<div onclick="showDialog('#dialog6');show_data(<?php echo $id; ?>);"> <!-- Changed -->
<div id="getid<?php echo $id; ?>"> <!-- Changed -->
<?php echo $id; ?>
</div>
</div>
<?php
}
mysql_close($db_server);
?>
<script>
function showDialog(id){
var dialog = $(id).data('dialog');
dialog.open();
}
function show_data(y){ // Changed
var x = document.getElementById("getid"+y).innerHTML; // Changed
document.getElementById("demo").innerHTML = x;
}
</script>
<!-- Popup Model -->
<div data-role="dialog" id="dialog6" >
<div id="demo"> </div>
</div>
Try This One.
<?php
include("connect.php");
$sql = 'SELECT id FROM products WHERE tag="mixed" ORDER BY id DESC LIMIT 5';
mysql_select_db('levels');
$retval = mysql_query( $sql, $db_server );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
$id = $row['id'];
?>
<div onclick="showDialog('#dialog6');show_data(<?php echo $id; ?>,'<?php echo $name; ?>','<?php echo $imgUrl; ?>');"> <!-- Changed -->
<div id="id<?php echo $id; ?>"> <!-- Changed -->
<?php echo $id; ?>
</div>
<div id="name<?php echo $name; ?>"> <!-- Changed -->
<?php echo $id; ?>
</div>
<div id="image<?php echo $id; ?>"> <!-- Changed -->
<img src="<?php echo $imgUrl; ?>" />
</div>
</div>
<?php
}
mysql_close($db_server);
?>
<script>
function showDialog(id){
var dialog = $(id).data('dialog');
dialog.open();
}
function show_data(id, name, imgUrl){ // Changed
document.getElementById("dispID").innerHTML = id;
document.getElementById("dispName").innerHTML = name;
document.getElementById("ImgDisplay").src = imgUrl;
}
</script>
<!-- Popup Model -->
<div data-role="dialog" id="dialog6" >
<div id="demo"> <!-- Changed -->
<div id="dispID"></div>
<div id="dispName"></div>
<div id="dispImg"><img id="ImgDisplay" src="" /></div>
</div>
</div>

Categories