PupStar Posted February 11, 2013 Posted February 11, 2013 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
♥mattjt83 Posted February 11, 2013 Posted February 11, 2013 @@PupStar <script type="text/javascript"> $('#contactus').dialog({ autoOpen: false, width: 500, modal:true }); </script> Matt
NodsDorf Posted February 12, 2013 Posted February 12, 2013 Hi Matt, I have been inactive for a bit, but have using these forums for 8+years. I find your anwser very good. Knowing wtf the modal call is in jquery seems like an eventual Jeporady answer. Kudos
♥mattjt83 Posted February 12, 2013 Posted February 12, 2013 @@NodsDorf I work a lot with jquery so it's all fresh in my head (w00t) Matt
PupStar Posted February 12, 2013 Author Posted February 12, 2013 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
♥mattjt83 Posted February 12, 2013 Posted February 12, 2013 @@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
PupStar Posted February 17, 2013 Author Posted February 17, 2013 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
PupStar Posted February 21, 2013 Author Posted February 21, 2013 Hi Guys, I have still not managed to solve this. Any help would be appreciated. Thanks Mark
Recommended Posts
Archived
This topic is now archived and is closed to further replies.