Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joel 40 posts 62 karma points
    May 05, 2011 @ 14:09
    Joel
    0

    Contactform stuck at loading image

    After some startup problems getting the form visible on my contactpage (it took some time before it noticed you need to add a contact page with the required fields as childnodes in the content area).

    I added the smtp & login details in the web.config and filled in the various inputfields like sender email, succesmessages etc. 

    But now I got a problem with the actual sending of the email. I filled in al the fields, pressed ´send mail´ and I see the loading image popping up. Hereafter nothing happens, it seems like the script isn´t doing anything. What goes wrong? Or what can I check?

    I´m running everything local on Win7, .NET 4.0, IIS7.0 with Umbraco 4.7.0

     

     

     

     

     

  • Jon Cuthbert 84 posts 173 karma points
    May 05, 2011 @ 14:54
    Jon Cuthbert
    0

    Hey Joel,

    sorry to hear your having difficulties. Any Javascript errors?

    Jon

  • Joel 40 posts 62 karma points
    May 05, 2011 @ 14:59
    Joel
    0

    That´s the problem...I don´t get any errors at all. So it´s hard to figure out why the form isn´t working correctly. After pressing the submit button it shows the loader and nothing more.

    EDIT:

    I just noticed Firebug gives me the following errors:

    jQuery.toJSON is not a function



     

  • Jon Cuthbert 84 posts 173 karma points
    May 05, 2011 @ 15:14
    Jon Cuthbert
    0

    The toJSON function is a jQuery plugin. jQuery plugins are all lost if jQuery is loaded on the page after the PliableForm.js file is loaded. Try looking for a second jQuery call and remove it or try jQuery's No Conflict will revert the $ back to how it was.

    This is a just a guess but it's worth a try.

    Jon

  • Joel 40 posts 62 karma points
    May 05, 2011 @ 16:00
    Joel
    0

    I´m including the following script in my masterpage:

    <script type="text/javascript" src="scripts/jquery-1.2.6.min.js" />
    <script type="text/javascript" src="scripts/superfish.js" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.timers.js"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>  
    <script type="text/javascript" src="/scripts/default.js"></script>      
    <script type="text/javascript" src="scripts/PliableForm.js" />

    <
    script type="text/javascript" src="scripts/hoverIntent.js" />

    There are the only one included. Furthermore I´m using the Formtable to show my contactform on a page:

    <div umb_formnode="1191" umb_jquery="1" umb_macroalias="PliableForm_table" ismacro="true" onresizestart="return false;" umbversionid="f927c731-085a-4fc8-887e-a426a3389160" umbpageid="1078" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro -->
    <div id="PliableForm">
    <table border="0">
    <tbody>
    <tr>
    <td class="label">E-mail adres:</td>
    <td class="errorMessage"><span class="pErrorMessage">U bent vergeten uw e-mailadres in te vullen.</span></td>
    </tr>
    <tr>
    <td class="label">Naam:</td>
    <td class="errorMessage"><span class="pErrorMessage">U bent vergeten uw naam in te vullen.</span></td>
    </tr>
    </tbody>
    </table>
    <p> </p>
    </div>
    <div id="PliableForm_loading" style="display: none;"><img src="/media/1870/ajax-loader.gif" alt="Loader" /></div>
    <div id="PliableForm_success" style="display: none;">
    <p>Uw e-mail is verstuurd.</p>
    </div>
    <div id="PliableForm_error" style="display: none;">
    <p>Helaas...er is iets misgegaan.</p>
    </div>
    <!-- endUmbMacro --></div>

    If I don´t include the JQuery within the Pliable formtable, the form won´t work (Submit button won´t trigger a submitcommand).

     

  • Joel 40 posts 62 karma points
    May 05, 2011 @ 16:07
    Joel
    0

    Posting the above code seemed to gave me the bright moment :)

    After removing the Google Maps script, the form worked perfectly!

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>  
  • Jon Cuthbert 84 posts 173 karma points
    May 05, 2011 @ 16:11
    Jon Cuthbert
    0

    Okay,

    I would suggest not loading:

    <script type="text/javascript" src="scripts/jquery-1.2.6.min.js" />

    Because you are already loading:

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

    The second jQuery overwrites the first.

    But the real problem is probably:

    umb_jquery="1"

    Change this value to "0"

    This is loading a third jQuery in the xslt. This might be the one erasing the jQuery plugins and if it is than I will remove the whole umb_jquery parameter in the next version of Pliable Form to avoid confusion.

    Sorry for the problems but thank you for helping me make this easier for future package users.

    Jon

  • Jon Cuthbert 84 posts 173 karma points
    May 05, 2011 @ 16:15
    Jon Cuthbert
    0

    Oh, just saw your other post that you got things working. Also, I believe some browsers require <script> tags to have ending </script> tags instead of self closing <script /> tags. :)

  • Joel 40 posts 62 karma points
    May 05, 2011 @ 16:32
    Joel
    0

    I did some testing and might came to an interesting conclusion:

    For a slideshow on the homepage I need

    <script type="text/javascript" src="scripts/jquery-1.2.6.min.js" />

    and by setting umb_jquery = "0" resulted in a non-responsive submit button for the PliableForm.

    By removingthe Gmaps script, my map on the contact paged stopped working

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

    But by setting umb_jquery = "1", both Google map and the PliableForm started to work correctly again.

     

    I gues the slideshow is referring to jquery-1.2.6.min.js and both gmaps and Pliable to jquery.js.


Please Sign in or register to post replies

Write your reply to:

Draft