×

info

Dear guests,
You are currently on the old forum we kept as a knowledge base. You will find the new community forum here
Welcome, Guest
Username: Password: Remember me
Keyword

TOPIC: hide message "Please enable the Javascript to be able to subscribe"

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77228

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
Hi,
i wrote some ajax code befor acymailing form subbmited, and it works well, but i dont want to the message "Please enable the Javascript to be able to subscribe" shown in my web site and i want to replace this masage with another message
Please Guide me to solve this problem ..
Thanx for yor attention...
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77232

  • Anonymous user
  • Adrien's Avatar
  • Posts: 20233
  • Karma: 680
Hello,

You're not supposed to see this message... what did you customize and how did you customize Acy?
Please have a look at our official documentation before posting a new message!

Do you like AcyMailing? We love your reviews!
We would appreciate if you could take 5 minutes to post a review on the Joomla! Extensions Directory.
We answered one of your question? Well, it's the best way to thank us!
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77241

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
I used ajax to connected to smtp-validation calss in php and check if email is exist or not if exist, submit form and show successful message and if not exist shown this message
i want to dont show this message and show an unsuccessful message...
i hope to explained well my idea...
please guide me...
thank you..
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77265

  • Anonymous user
  • Adrien's Avatar
  • Posts: 20233
  • Karma: 680
Hello,

This message is displayed when there is no task submitted with the form.
So maybe you just need to add the "optin" task with your form?

By the way, what does your smtp-validation class does?
We have a few email validation (check domain name or check based on blacklists) that can be turned ON via the security tab on the Acy configuration page. Does your php class do something else?
Please have a look at our official documentation before posting a new message!

Do you like AcyMailing? We love your reviews!
We would appreciate if you could take 5 minutes to post a review on the Joomla! Extensions Directory.
We answered one of your question? Well, it's the best way to thank us!
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77696

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
Hi
i used a smtp-validation class that checked if an account is exist in a domain (such as google,..) or not ,if its exist my form submite correctly ,and if this account is not build yet in a certain domain (dose not exist) this account dose not save and show message "Please enable the Javascript to be able to subscribe", i dont want my users see this error i want to replace this message to another such as "Your account is not exist , please subscribe with a valid account"
please help me to solve this problem
thanks a lot ...
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 4 months ago #77730

  • Anonymous user
  • Adrien's Avatar
  • Posts: 20233
  • Karma: 680
Hi,

My point is that you probably do something wrong because there is no reason to have this message on your screen.
When you trigger your function via ajax, I guess you wait for the ajax result before triggering the real subscription.
In case of the smtp-validation fails, you should simply display an error message on the screen and don't submit the form at all.

Do you see what I mean?
Please have a look at our official documentation before posting a new message!

Do you like AcyMailing? We love your reviews!
We would appreciate if you could take 5 minutes to post a review on the Joomla! Extensions Directory.
We answered one of your question? Well, it's the best way to thank us!
Last Edit: 5 years 4 months ago by Anonymous user.
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 3 months ago #77855

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
my ajax code that is in the top of default.php in mod_acymailing/tmpl is:

$document = JFactory::getDocument();

// Add Javascript
$document->addScriptDeclaration('

function PostData(formname) {
var txt = document.getElementsByName("user")[0].value; $.ajax({ type: "POST", async: false, url: "../modules/mod_acymailing/tmpl/result.php", data: {name:txt}, success: function (msg) { if(msg.indexOf("invalid")!=-1){ alert("Please Enter a Valid Email!!") }else if(msg.indexOf("valid")!=-1){ try{ return submitacymailingform("optin",formname); }catch(err){alert("The form could not be submitted "+err);return false;} } }//success }); } '); when a user enter a VALID email my form subscribe and everything is OK, but when the email is INVALID show an alert window that user click on ok button , then show message "Please enable the Javascript to be able to subscribe" what should i do to improve my code and dont see this message thanks for your good replys... :)[email]")[0].value;
$.ajax({
type: "POST",
async: false,
url: "../modules/mod_acymailing/tmpl/result.php",
data: {name:txt},
success: function (msg) {

if(msg.indexOf("invalid")!=-1){

alert("Please Enter a Valid Email!!")
}else if(msg.indexOf("valid")!=-1){

try{ return submitacymailingform("optin",formname); }catch(err){alert("The form could not be submitted "+err);return false;}

}

}//success

});


}

');

when a user enter a VALID email my form subscribe and everything is OK, but when the email is INVALID show an alert window that user click on ok button , then show message "Please enable the Javascript to be able to subscribe"
what should i do to improve my code and dont see this message
thanks for your good replys... :)
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 3 months ago #77859

  • Anonymous user
  • Adrien's Avatar
  • Posts: 20233
  • Karma: 680
Hi,

You should make sure to block the form submission in case of the email is not valid.
Actually it may be easier to just remove our
onclick="return submitacymailingform('optout','<?php echo $formName;?>')"
from our own module view so you're sure to trigger that function only if the email address is valid.
Please have a look at our official documentation before posting a new message!

Do you like AcyMailing? We love your reviews!
We would appreciate if you could take 5 minutes to post a review on the Joomla! Extensions Directory.
We answered one of your question? Well, it's the best way to thank us!
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 3 months ago #77861

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
i removed it and replace with

onclick="PostData('<?php echo $formName ?>')"

according to the my previous post , in the PostData() function , i checked, if the email is valid " return submitacymailingform('optout','<?php echo $formName;?>')" and if email is invalid just show an alert with a message, but when i ran this code,after alert showed, i see javascript enable message...?????
Last Edit: 5 years 3 months ago by Anonymous user.
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 3 months ago #77871

  • Anonymous user
  • Adrien's Avatar
  • Posts: 20233
  • Karma: 680
Hello,

This message is displayed if the form is submitted without a "task" set... so the form must be submitted somehow.
Please add a "return false" after your PostData function to make sure the form is not submitted.
Please have a look at our official documentation before posting a new message!

Do you like AcyMailing? We love your reviews!
We would appreciate if you could take 5 minutes to post a review on the Joomla! Extensions Directory.
We answered one of your question? Well, it's the best way to thank us!
Please log in to post a reply

hide message "Please enable the Javascript to be able to subscribe" 5 years 3 months ago #78525

  • Anonymous user
  • nooran's Avatar
  • Posts: 10
  • Karma: 0
thanks adrin it works correctly.. :)
I’m grateful to you for all of your guidence....
Please log in to post a reply
Time to create page: 0.233 seconds
Powered by Kunena Forum