Advertisement:

Author Topic: [SOLVED] Contact seller button on latest listing (home) page  (Read 1797 times)

nektm

  • Newbie
  • *
  • Posts: 15
[SOLVED] Contact seller button on latest listing (home) page
« on: March 18, 2014, 08:36:18 am »
I am trying to manage to put contact seller button for each latest listing on home page. i copied code from item.php and used some jquery to load form on modal box, till here looks everything fine.

the real problem i am facing is that contact seller button works for only top first listing item but it shows on every listing item, and whenever clicked multiple modal boxes are open for all the listing items, and for rest of the listing items contact seller button does not work.

can anybody help me to figure it out?

Thanks in advance.
« Last Edit: March 19, 2014, 06:17:59 pm by nektm »

Ramesh

  • Jr. Member
  • **
  • Posts: 61
Re: [SOLVED] Contact seller button on latest listing (home) page
« Reply #1 on: March 22, 2014, 02:33:24 pm »
once please show your code and discuss here ...

nektm

  • Newbie
  • *
  • Posts: 15
Re: [SOLVED] Contact seller button on latest listing (home) page
« Reply #2 on: March 23, 2014, 12:49:30 am »
I used function to assign unique DIV id for each contact seller button (reply me) on latest listing home page. which opens jquery UI.

Code: [Select]

<script type="text/javascript">
function displaymessage(val) {
$(".P-"+val).dialog("destroy");
    $(".P-"+val).dialog({ autoOpen: false, resizable: true, width: 375, height: 'auto'})
    .siblings('.ui-dialog-titlebar').removeClass('ui-widget-header');
    $(".P-"+val).dialog('open');
$(".P-"+val).dialog('widget').position({ of: $(".contact_button-"+val), my: 'left top', at: 'left bottom'});
}

</script>

Code: [Select]
<div id="contact_button-<?php echo osc_item_id();?>" style="margin-top:20px; margin-bottom:20px; text-align:center; ">
<a class="reply_me" onClick="displaymessage(<?php echo osc_item_id();?>)" class="trigger T-<?php echo osc_item_id();?>" href="javascript:void(0)" >reply me</a>


http://www.adsumpire.com/