Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

A very simple jquery dialog question


PupStar

Recommended Posts

I have a popup contact form that is triggered by this script

 

<script type="text/javascript">
$('#contactus').dialog({
 autoOpen: false,
 width: 500,
});
</script>

 

my questions are ..... how do I have the website behind the dialog box fade out???

 

Is there an effect that can be applied or would I need to add a class to the stylesheet and if so how to incorporate that into the script???

 

Thanks

 

Mark

Link to comment
Share on other sites

Hi Matt,

 

I have the modal on my product listing page. Basically I have changed the code so that 'Price on Application' displays if the price is 0.00

 

Now when you click 'POA' the dialog box opens with the a contact form (same as contact_us.php) and what I need to do is pass the product name into the dialog box but I am struggling a bit.

 

The code I use for the dialog is

 

<div id="contactus" title="<?php echo TEXT_GET_PRICE_PRODUCT . ' ' . $listing['products_name']; ?>">
 <?php include(FILENAME_CONTACT_US_POPUP); ?>
</div>
<script type="text/javascript">
$('#contactus').dialog({
autoOpen: false,
width: 500,
modal:true
});
</script>

 

and at the minute it is dumped at the bottom of the product_listing code.

 

Do you have a take on passing the product_name into the dialog?

 

Thanks

 

Mark

Link to comment
Share on other sites

@@PupStar

 

So right now the product name isn't showing up at all or???

 

Since the product name would be different depending on which product you click on you will need to add some logic to the js to grab the proper info.

 

You can PM me the url so I can see what's going on if you like.

Matt

Link to comment
Share on other sites

The above issue is now solved with a big shout out to @@mattjt83 who set the ball rolling :thumbsup:

 

Now my jquery dialog contains a contact form (see attached screenshot)

 

I am trying to prefill the 'Part Name' field with the name of the product from the product listing. However whatever I try does not display, I think due to it being outside of the loop.

 

This is the line I need the product name to fill:

 

    <td class="fieldValue"><?php echo tep_draw_input_field('part', '', $parameters = 'size="50"'); ?></td>

 

I have tried the likes of

 

$listing[products_name]

 

but to no avail.

 

Mark

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...