RE : Plugin Usage…
Posted: 21 September 2009 03:05 PM   Ignore ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

Hi Mike,

Sorry for emailing you earlier on and not posting in the forums it’s just that I had a hard time finding the register link wink

You originally sent the plugin to me so I wasn’t aware that adding it to the cart and going through the checkout process would create an account for me, sorry about that.

I was just wondering how exactly to use this plugin as I’ve tried everything I can to get it working but unfortunately to no avail so far.

What I’ve tried is this :

1 - Created a standard html template that has jquery-1.3.2.min.js, the jQuery Form plugin included in it.

2 - Added in the code shown below into the <head> of the template :

{exp:ajax_redirect:headers}
{exp
:ajax_redirect form_name="mailinglist_form"
    
form_method="POST"
    
message_container_id="message"
    
redirect_variable="RET"
    
error_search="ul"
    
redirect_timer="2000"
    
no_redirect="yes"
    
message_display_id="mail-message"

3 - Added a div with the id of message and also a div with the id of mail-message to the top of the page just after the opening <body> tag.

4 - Added in the standard ExpressionEngine mailing list code to the template and also changed the {exp:ajax_redirect form_name=”“} to mailinglist_form as this is what the standard ExpressionEngine code outputs.

5 - Visited the template and placed an e-mail into the text-field in the mailing list signup form.

Click the submit button but nothing Ajaxy happens. I just get taken to the standard template that tells you your email has been added and an email has been sent to you.

I’m sure I must be missing something fairly obvious here but not really to sure what. Any help would be greatly appreciated with this one.

Thanks a lot.

Best wishes,

Mark

Profile
 
Posted: 21 September 2009 03:34 PM   Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

hmmm, looks right the only thing I see different from my templates is the jQuery level. Shouldnt have an effect but for kicks and grins try replacing you head scripts with this

type="text/javascript" src="/js/jquery-1.2.6.min.js">
script type="text/javascript" src="/js/jquery.form.js"
Signature 

Mike

HCC Development

Profile
 
Posted: 21 September 2009 04:14 PM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

Hi Mike,

Really really sorry for the previous email about not seeing the reply buttons. I was definitely logged in to the site and only went away for a few minutes, had been looking around it quite a while when the e-mail came in but then as soon as I went to the forum post I got logged out!

I’ve now logged back in again (difficult to find the login on this page though wink ) and so can now reply correctly.

Tried with 1.2.6 and that didn’t work either. Is there something else I should be placing into the template to invoke the jQuery Form plugin maybe?

Best wishes,

Mark

Profile
 
Posted: 21 September 2009 04:21 PM   Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

did you upload the files in binary mode?

Signature 

Mike

HCC Development

Profile
 
Posted: 21 September 2009 04:26 PM   Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

All the files are definitely uploaded fine as they work with other things on other pages.

I have actually just found out that I’m a slight numpty in that the standard ExpressionEngine mailing list tag from the documentation places an id=“mailinglist_form” into the html code and not a name=“mailinglist_form” so I’ve just gone in and added the name=”“ parameter into the mailing list tag. Now when I click the submit button the page doesn’t go anywhere and the div with the id of mail-message changes to have nothing in it (I originally placed some text in it so I could see if it changes or not) however I don’t get any text in that div that says anything just the original text that was in it disappears so it looks as though something’s happening but not quite everything that should be.

Should the message and mail-message divs be inside one another or anything? Also what is the error_search=“ul” parameter for? Do I need to place an un-ordered list in the page somewhere or something?

Best wishes,

Mark

Profile
 
Posted: 21 September 2009 04:33 PM   Ignore ]   [ # 5 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

All the files are definitely uploaded fine as they work with other things on other pages.

That makes no sense, did you upload the AJAX Redirect plugin files in Binary mode, not automatic or anything else.

It shouldn’t matter where the div’s are as long as they are named properly.

Signature 

Mike

HCC Development

Profile
 
Posted: 21 September 2009 04:42 PM   Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21
Admin - 21 September 2009 04:33 PM

That makes no sense

Makes sense to me wink

Perhaps a slight misunderstanding by what I meant there though? I meant that the javascript files all work as I am using them on the site with other javascript functions so they have definitely been uploaded correctly.

Admin - 21 September 2009 04:33 PM

did you upload the AJAX Redirect plugin files in Binary mode, not automatic or anything else.

Yep definitely uploaded correctly.

Admin - 21 September 2009 04:33 PM

It shouldn’t matter where the div’s are as long as they are named properly.

Thanks. They are both in the page and as the post above I now have it doing something with the mail-message div but all it is doing at the moment is deleting any text that I have in there already so it is doing something but just not placing any message in there.

Am I meant to place a message somewhere or does it just place the message from the system template into it?

Best wishes,

Mark

Profile
 
Posted: 21 September 2009 05:00 PM   Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

looks like your form name is wrong

{exp:ajax_redirect form_name="mailinglist"
    
form_method="POST"
    
message_container_id="message"
    
redirect_variable="RET"
    
error_search="ul"
    
redirect_timer="2000"
    
no_redirect="yes"
    
message_display_id="mail-message"
Signature 

Mike

HCC Development

Profile
 
Posted: 21 September 2009 05:12 PM   Ignore ]   [ # 8 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

EDIT - Nope as I thought that needs to be the same as the name of the form so I did have it correct. As mentioned previously the standard documentation for the mailing list tag doesn’t show the name=”” parameter in it so I had to add that into it myself. I now get the form submitting via AJAX using the Form plugin and the text in the mail-message div disappears but no message appears in there.


Ah right, I thought that the form_name=”“ parameter needed to have the same name that the form has?

Will try that now.

Best wishes,

Mark

Profile
 
Posted: 22 September 2009 10:59 AM   Ignore ]   [ # 9 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

Hi Mike,

Sorry to be a pain on this but was just wondering if there’s anything else I should try as at the moment I have it working in that the form is being submitted by AJAX using the jQuery Form plugin and there is definitely something happening with the mail-message div as any text that I have in there on page load disappears when the form is submitted but it isn’t replaced with anything unfortunately.

Not really too sure what I’m doing wrong though?

Best wishes,

Mark

Profile
 
Posted: 22 September 2009 01:18 PM   Ignore ]   [ # 10 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1654
Joined  2007-11-23

Not sure what to tell you Mark,

here is the template code I am using on my home page for the mailing list form in association with the script I posted earlier.

<div class="newsletter left">
        
{exp:mailinglist:form list="default" name="mailinglist" }
            
            
<div id="mail-message"></div>
            
            
Join our Mailing List

            <
input type="text" name="email" value="{email}" />

            <
input type="submit" value="submit" />
            
        
{/exp:mailinglist:form} 
    
</div
Signature 

Mike

HCC Development

Profile
 
Posted: 22 September 2009 05:25 PM   Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  7
Joined  2009-09-21

Hi Mike,

Thanks. Just tried that but still the same thing. The mailing list form does indeed get submitted and the e-mail comes through to the account but the mail-message div doesn’t get updated with any message or anything :-(

Am I right in thinking that I just need the jQuery, Form plugin and your header scripts in the page and then the mail-message div and that should be it?

I know that it seems to be working sort of because if I place some text into the mail-message div so at page load I can see something there then when I submit the form the text disappears so the content of the div is being swapped to a certain degree but just unfortunately not being swapped with anything other than blank space :-(

Sorry but I really must be doing something thick here as I really can’t see what I’m doing differently. I don’t suppose I could trouble you for a whole page template could I?

Best wishes,

Mark

Profile
 
Posted: 11 June 2010 01:44 PM   Ignore ]   [ # 12 ]  
Newbie
Rank
Total Posts:  1
Joined  2010-06-03

Hello,

I was just wondering if you ever found a resolution to this - I’m having the exact same problem and followed the possible solutions in the thread also to no avail (uploaded in binary: yes, tried using jquery 1.2.6: still no dice, tried Mike’s exact code used on the HCC site: nothing).  I am getting the same results as Mark.  I hate to trouble anyone too much over a free script (beggars can’t be choosers!) but if there was a solution to this I’d love to try it as well.

Profile
 
   
 
 

Join our Mailing List