Announcement

Collapse
No announcement yet.

Floating contact form, help needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Floating contact form, help needed

    Hi Ladies and Gents

    I looking to implement the follow contact form for our website

    Full detail can be found here http://www.building58.com/examples/tabSlideOut.html

    this has the contact form working, I we would like to use it so our customers dont have to leave the page they are on.

    has anyone tried this before out there? Is there any coding changes needed for actinic?

    I have copied and pasted the code from the site below.



    See that little tab over there that says 'Contact'? If you click that it will slide out. This plugin allows you to easily add one of those to your page.
    The most important part of getting this plugin to work is to have your image path and image dimensions set correctly in the options. In this version, using the code below, I am linking directly to google code for the jquery library as well as the plugin which I am hosting at code.google.com.
    Getting started

    In your <head> tag you need the javascript (with the options customized for your image):

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
    <script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>

    <script type="text/javascript">
    $(function(){
    $('.slide-out-div').tabSlideOut({
    tabHandle: '.handle', //class of the element that will become your tab
    pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
    imageHeight: '122px', //height of tab image //Optionally can be set using css
    imageWidth: '40px', //width of tab image //Optionally can be set using css
    tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
    speed: 300, //speed of animation
    action: 'click', //options: 'click' or 'hover', action to trigger animation
    topPos: '200px', //position from the top/ use if tabLocation is left or right
    leftPos: '20px', //position from left/ use if tabLocation is bottom or top
    fixedPosition: false //options: true makes it stick(fixed position) on scroll
    });

    });

    </script>


    Below that add your css:


    <style type="text/css">

    .slide-out-div {
    padding: 20px;
    width: 250px;
    background: #ccc;
    border: 1px solid #29216d;
    }
    </style>


    Anywhere in your page, (I put mine right above my </body>) put in the html for your hidden content.

    <div class="slide-out-div">
    <a class="handle" href="http://link-for-non-js-users.html">Content</a>
    <h3>Contact me</h3>
    <p>Thanks for checking out my jQuery plugin, I hope you find this useful.
    </p>
    <p>This can be a form to submit feedback, or contact info</p>
    </div>



    yours

    Neil


    Just doing a test run on our site www.gparts.co.uk

    mmm seem to be missing something out somewhere!??
    Last edited by neilspinney; 28-Sep-2010, 10:40 AM. Reason: Update

    #2
    Make sure you define the correct image location, it can't currently find the contact button image.

    This is in the part of the code which says pathToTabImage: 'images/contact_tab.gif' you may want to change that to 'contact_tab.gif' and then use Design menu > Additional files to upload the contact_tab.gif to the acatalog folder.

    Edit: A couple of other issues I can spot:

    1) Your code is between the </head> and <body> tags and it should be between the <body> and </body>, note the difference between <body> and </body> with the slash.

    2) You also have the _gat is not defined error (not related to this issue but see the link).
    Last edited by peblaco; 26-Sep-2015, 01:48 PM.
    Peblaco

    Comment


      #3
      You can do this by embedding the Actinic "Contact Us" form into the Product Layout, with a Request information link to only display the form if clicked on.

      Adding a product details request form to a product layout.


      INSTALLATION

      Paste the following code into your Product Layout(s) at the very bottom. NB it is important that it goes after all existing code.


      Code:
      <a href="#" onclick="var mf=document.getElementById('mf_<actinic:variable name="ProductID" />');mf.style.display=mf.style.display=='block'?'none':'block';return false;">Request information</a><br/>
      <br/>
      <div id="mf_<actinic:variable name="ProductID" />" style="display:none; background-color: #eeeeff; border: 1px solid silver;">
       <form method="post" action="<Actinic:Variable Name="SendMailPageURL"/>">
        <input type="hidden" name="RANDOM" value="<actinic:variable name='Random'/>" />
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
         <!-- Hidden field when in trial mode -->
         <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
        </actinic:block>
        <actinic:variable Name="ValidationError"/>
        <table cellpadding="3" cellspacing="0">
         <tr> 
            <td width="15">&nbsp;</td>
            <td colspan="2">
               <strong>Fill in details below and press Send for info about <i><Actinic:Variable Name="ProductName"/></i>.</strong><br /> 
               <input type="hidden" name="Subject" value="Info on: <Actinic:Variable Name="ProductName"/>" /> 
                <br />
            </td>
         </tr>
         <tr> 
            <td>&nbsp;</td>
            <td>
               <span class="actrequired"><Actinic:Variable Name="MailFormName"/> *</span> 
            </td>
            <td>
               <input type="text" name="Name" size="50" value="Your name here" /> 
           </td>
         </tr>
         <tr> 
            <td>&nbsp;</td>
            <td>
               <span class="actrequired"><Actinic:Variable Name="MailFormEmail"/> *</span>
            </td>
            <td>
               <input type="text" name="EmailAddress" size="50" value="Your email address" /> 
            </td>
         </tr>
         <tr> 
            <td valign="top">&nbsp;</td>
            <td valign="top">
               <span class="actrequired"><Actinic:Variable Name="MailFormMessage"/> *</span>
            </td>
            <td>
               <textarea type="text" rows="10" cols="45" name="Message">Your message here</textarea>
            </td>
         </tr>
         <tr> 
            <td valign="top">&nbsp;</td>
            <td valign="top">&nbsp;</td>
            <td>
               <input type="submit" name="ACTION" value="<Actinic:Variable Name="MailFormSendButton"/>" />
            </td>
         </tr>
         <tr> 
            <td valign="top">&nbsp;</td>
            <td colspan="2" valign="top">
               <Actinic:Variable Name="RequiredFields"/> <span class="actrequired"><Actinic:Variable Name="Highlighted"/></span>.
            </td>
         </tr>
      </table>
      </form>
      </div>

      NOTES:

      Do not use on pages that use the Single Add to Cart button.

      This is basically the code from the Contact Us form with the Subject hidden and pre-filled with the products name.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        well I seem to have tried everything but still it not working, here's a copy of the outer layer code

        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

        <html>

        <head>

        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>

        <script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>



        <script type="text/javascript">

        $(function(){

        $('.slide-out-div').tabSlideOut({

        tabHandle: '.handle', //class of the element that will become your tab

        pathToTabImage: 'acatalog/contact_tab.gif', //path to the image for the tab //Optionally can be set using css

        imageHeight: '122px', //height of tab image //Optionally can be set using css

        imageWidth: '40px', //width of tab image //Optionally can be set using css

        tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left

        speed: 300, //speed of animation

        action: 'click', //options: 'click' or 'hover', action to trigger animation

        topPos: '200px', //position from the top/ use if tabLocation is left or right

        leftPos: '20px', //position from left/ use if tabLocation is bottom or top

        fixedPosition: false //options: true makes it stick(fixed position) on scroll

        });



        });



        </script>



        </script>

        <style type="text/css">



        .slide-out-div {

        padding: 20px;

        width: 250px;

        background: #ccc;

        border: 1px solid #29216d;

        }

        </style>



        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title><actinic:variable name="PageTitle" /></title>

        <actinic:variable name="BaseHref" />

        <actinic:variable name="MetaTags" />

        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsP3PPolicyUsed%22%20%2f%3e">

        <link rel="P3Pv1" href="<actinic:variable name="P3PFullPolicyLink" />">

        </actinic:block>

        <link href="actinic.css" rel="stylesheet" type="text/css">

        <actinic:variable name="JavaScriptFunctions" />

        <link href="gstyles.css" type="text/css" rel="stylesheet"/>

        <script src="jquery-1.3.2.min.js" language="javascript" type="text/javascript"></script>

        <script src="jquery.cycle.min.js" language="javascript" type="text/javascript"></script>

        <script>

        $(document).ready( function(){

        $('#photos').cycle('fade');

        });

        </script>



        </head>





        <body onload="<actinic:variable value="PreloadImages" name="OnLoadScript" />">

        <div id="wrap">

        <div id="header">



        <div id="reflective_top_menu_padding">

        <!-- main menu -->

        <ul id="reflective_menu_top">

        <form name="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />">

        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">

        <!-- Hidden field when in trial mode -->

        <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />

        </actinic:block>

        <input type="hidden" name="page" value="search" />

        <input type="hidden" name="PR" value="-1" />

        <input type="hidden" name="TB" value="A" />

        <li class="search_box"><input align="top" class="main_search_box" name="SS" type="text" value="search for ..." onfocus="this.value='';"></li>

        <li class="search_box_button"><input type="submit" class="button" name="ACTION" value="<actinic:variable name="QuickSearchButtonText" />"></li>

        </form>

        <li class="spacing">&nbsp;</li>

        <li><a class="reflective_cart" href="<actinic:variable name="CartLinkText" />"><actinic:variable name="CartText" /></a> </li>

        <li>

        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20false%29%20%20OR%20%28%3cactinic%3avariable%20name%3d%22IsSSLUsedForEssentialPages%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22IsSplitSSLSubdomain%22%20%2f%3e%20%3d%3d%20true%29">

        <a class="checkout" href="<actinic:variable name="OrderLinkText" />" <actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%3d%3d%20True" >target="_top" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%21%3d%20True" >target="_self" </actinic:block>><Actinic:Variable Name="CheckOutText"/></a>

        </actinic:block>

        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true%29%20%20AND%20%28%3cactinic%3avariable%20name%3d%22IsSSLUsedForEssentialPages%22%20%2f%3e%20%3d%3d%20true%29%20AND%0d%28%3cactinic%3avariable%20name%3d%22IsSplitSSLSubdomain%22%20%2f%3e%20%3d%3d%20false%29">

        <a class="checkout" href="<actinic:variable name="OrderLinkText" />" <actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%3d%3d%20True" >target="_top" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%21%3d%20True" >target="_self" </actinic:block> <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Checkout Link" />><actinic:variable name="CheckOutText" /></a>

        </actinic:block>

        </li>

        <li class="items_value"><actinic:variable name="ShoppingCartSummary" value="Shopping Cart Summary In A Line" /></li>



        <Actinic:NOTINB2B>

        <li class="spacing">&nbsp;</li>

        <li><a class="login" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?ACTION=LOGIN">Login</a></li>

        </Actinic:NOTINB2B>



        <Actinic:NOTINB2B><!--</Actinic:NOTINB2B>

        <li class="spacing">&nbsp;</li>

        <li><a class="login" HREF="http://www.gparts.co.uk/cgi-bin/bb000001.pl?ACTION=LOGOUT" TARGET="_self">Logout</a></li>

        <Actinic:NOTINB2B>--></Actinic:NOTINB2B>

        </ul>



        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e" >

        <h4 class="accdetails"><actinic:variable name="NowServing" /><actinic:variable name="CurrentAccount" /></h4>

        </actinic:block>



        </div>







        <div id="top">



        </div>

        <div id="nav">

        <ul id="nav_list">

        <li><a class="fiat" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=fiat%2ehtml&NOLOGIN=1"><span>click here for fiat</span></a></li>

        <li><a class="isuzu" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=isuzu%2ehtml&NOLOGIN=1"><span>click here for isuzu</span></a></li>

        <li><a class="subaru" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=subaru%2ehtml&NOLOGIN=1"><span>click here for subaru</span></a></li>

        <li><a class="kia" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=kia%2ehtml&NOLOGIN=1"><span>click here for <br/>kia</span></a></li>

        <li><a class="nissan" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=nissan%2ehtml&NOLOGIN=1"><span>click here for nissan</span></a></li>

        </ul>

        </div>

        </div>

        <div id="main">





















        <!-- left column -->

        <div id="sidebar-left">



        <ul>

        <actinic:block if="%3cactinic%3avariable%20name%3d%22HomePageType%22%20%2f%3e%20%21%3d%20%270%27">

        <li><actinic:variable name="NavigationIcon" value="Home Basic Link" /></li>

        </actinic:block>

        <li><actinic:variable name="NavigationIcon" value="View Cart Basic Link" /></li>

        <li><actinic:variable name="NavigationIcon" value="Checkout Basic Link" /></li>



        <Actinic:NOTINB2B>

        <li><actinic:variable name="NavigationIcon" value="Store Top Basic Link" /></li>

        <li><actinic:variable name="NavigationIcon" value="Up A Level Basic Link" /></li>

        </Actinic:NOTINB2B>



        <li><actinic:variable name="NavigationIcon" value="Contact Us Basic Link" /></li>



        <Actinic:NOTINB2B>

        <li><a href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?ACTION=LOGIN">Login</a></li>

        </Actinic:NOTINB2B>



        <Actinic:NOTINB2B><!--</Actinic:NOTINB2B>

        <li><a HREF="http://www.gparts.co.uk/cgi-bin/bb000001.pl?ACTION=LOGOUT" TARGET="_self">Logout</a></li>

        <Actinic:NOTINB2B>--></Actinic:NOTINB2B>



        </ul>



        <div id="skype-box">

        <!--

        Skype 'Chat with me' button

        http://www.skype.com/go/skypebuttons

        -->

        <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>

        <a href="skype:gparts.co.uk?chat"><img src="http://download.skype.com/share/skypebuttons/buttons/chat_blue_white_164x52.png" style="border: none;" width="120" height="38" alt="Chat with me" /></a>

        <p>Call our parts store for FREE using Skype</p></a>

        </div>



        <div id="live-chat">

        <!-- Begin Volusion Live Chat -->

        <div align="center" id="VolusionLiveChat"><a href="http://www.volusion.com/livechat_software.asp">Free Live Chat Software</a></div>

        <script defer type="text/javascript" src="https://livechat.volusion.com/script.aspx?id=488690"></script>

        <!-- End Volusion Live Chat -->

        </div>



        </div>

        <!-- end left column -->





        <div id="content">



        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e">

        <div id="welcome_plug">

        <h2>Welcome to GParts</h2>

        <p id="welcome_intro">5 simple steps to buying your car parts</p>

        <ul>

        <li>1st select your manufacturer</li>

        <li>2nd select your model</li>

        <li>3rd select your part</li>

        <li>4th add your part to the shopping cart</li>

        <li>5th pay for your items and wait for delivery</li>

        </ul>

        </div>

        <div id="photos">

        <img src="designimages/photo_01.jpg" width="370" height="269" />

        <img src="designimages/photo_02.jpg" width="370" height="269" />

        <img src="designimages/photo_03.jpg" width="370" height="269" />

        <img src="designimages/photo_04.jpg" width="370" height="269" />

        <img src="designimages/photo_05.jpg" width="370" height="269" />

        </div>



        <br class="dirtylittletrick" />



        <div id="usp">

        <ul>

        <li class="usp1"><h3>Genuine Parts</h3><p>We only supply genuine parts</p></li>

        <li class="usp2"><h3>Low Prices</h3><p>Lowest prices for genuine <br />parts online</p></li>

        <li class="usp3"><h3>Massive Stock</h3><p>We stock thousands of genuine <br />car parts</p></li>

        <li class="usp4"><h3>Established for <br />80 years</h3><p></p></li>

        <li class="usp5"><h3>Fast Delivery</h3><p>95% of all parts dispatched <br />in 48 hrs</p></li>

        <li class="usp6"><h3>Eco Friendly</h3><p>We pride ourselves in being a green company</p></li>

        </ul>

        </div>



        </actinic:block>



        <br class="dirtylittletrick" />



        <Actinic:Variable Name="INNERLAYOUT"/>



        <actinic:block if="%3cactinic%3avariable%20name%3d%22RecentlyViewedListIsEnabled%22%20%2f%3e%20%3d%3d%20True" >

        <actinic:variable name="RecentProducts" />

        </actinic:block>



        <actinic:variable name="FeefoSiteLogo" />



        <actinic:variable name="FeefoSiteFeedback" />

        </div>



        <div id="footer">

        <p><actinic:variable name="NavigationIcon" value="Terms Basic Link" /> | <actinic:variable name="NavigationIcon" value="Sitemap Basic Link" /> | &copy;2010 GParts</p>

        <script type="text/javascript">



        <!--

        var m = "<actinic:variable name="StoreName" /> was last updated: <actinic:variable name="CurrentDate" />" + document.lastModified;

        var p = m.length-8;

        document.writeln("<right>");

        document.write(m.substring(p, 0));

        document.writeln("</right>");

        -->

        </script>







        <Actinic:Variable Name="HeaderFooter"/>



        </div>

        </div>

        </div>

        </div>

        <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Tracking Code" />

        <div class="slide-out-div">

        <a class="handle" href="http://link-for-non-js-users">Content</a>

        <h3>This is extra content</h3>

        <p>Something that wasn't important enough to be in your main body,

        but that you wanted to hide off the side of your screen for some reason.

        </p>

        <p>Could be a form to submit feedback, or contact info</p>

        </div>

        </body>

        <div id="fb-root"></div>

        <script>

        window.fbAsyncInit = function() {

        FB.init({appId: 'your app id', status: true, cookie: true,

        xfbml: true});

        };

        (function() {

        var e = document.createElement('script'); e.async = true;

        e.src = document.location.protocol +

        '//connect.facebook.net/en_US/all.js';

        document.getElementById('fb-root').appendChild(e);

        }());

        </script>

        </html>




        not sure if the code is correct

        Comment


          #5
          Originally posted by peblaco View Post
          Make sure you define the correct image location, it can't currently find the contact button image, it's looking for it at gparts.co.uk/acatalog/images/contact_tab.gif

          This is in the part of the code which says pathToTabImage: 'images/contact_tab.gif' you may want to change that to 'contact_tab.gif' and then use Design menu > Additional files to upload the contact_tab.gif to the acatalog folder.

          Edit: A couple of other issues I can spot:

          1) Your code is between the </head> and <body> tags and it should be between the <body> and </body>, note the difference between <body> and </body> with the slash.

          2) You also have the _gat is not defined error (not related to this issue but see the link).
          I have tried what you pointed out but it still doesn't work! Sorry but I totally new to actinic!

          Neil

          Comment


            #6
            I see a JavaScript error: $(".slide-out-div").tabSlideOut is not a function

            You have:
            Code:
             <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
            <script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
            And seem to have missed type="text/javascript" from the second line. Try fixing that.

            Edit: Also note that the demo of this function put a mailto:me@mysite.com in plain text onto every web-page. A sure fire way of ending up on spammers lists and getting besieged by spambots.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              This Jquery page highlights "This error message appears only if another framework is in conflict with the almighty jQuery." Could it be a script conflict as I noticed you've got other jquery scripts already on the page above the </head> tag for a photo fader. Use the rule of elimination to see if saving that photo fader code then temporarily removing it relieves the error, if so you need to combine the two scripts.
              Peblaco

              Comment


                #8
                Originally posted by peblaco View Post
                This Jquery page highlights "This error message appears only if another framework is in conflict with the almighty jQuery." Could it be a script conflict as I noticed you've got other jquery scripts already on the page above the </head> tag for a photo fader. Use the rule of elimination to see if saving that photo fader code then temporarily removing it relieves the error, if so you need to combine the two scripts.
                Thank you very much had to enter the following to get to work!
                jQuery.noConflict();

                thanks very much again

                Neil

                Comment


                  #9
                  I found a totally cool site for adding various custom forms to a website http://www.jotform.com/

                  I have now used this to add a customer form to the site!

                  visit www.gparts.co.uk to see this in action

                  Many thanks to everyone for the help on this!

                  Comment

                  Working...
                  X