Jump to content

jQuery Twitter Not Loading


MrSaints

Recommended Posts

Hello,

 

I did a quick search to see if anyone posted about this yet, but I could not find any, so here I go. Basically I have installed WHMCS to be accessed as a Directory NOT a sub-domain. I noticed a problem with WHMCS use of jQuery's $.post here as it is throwing "Permission Denied" errors on line 19 of jquery.js:

 

J.open(G,M.url,M.async)

 

This error occurs when visiting my site via: http://mydomain.com/whmcshere, however, when visiting http://www.mydomain.com/whmcshere, it works absolutely fine. Through a quick modification of portal 'homepage.tpl' template file I managed to get it working by changing:

 

$.post("announcements.php", { action: "twitterfeed", numtweets: 3 },

 

To:

 

$.post("http://"+location.host+"/announcements.php", { action: "twitterfeed", numtweets: 3 },

 

When using jQuery's $.ajax call, I do believe with 'www' would be considered a DIFFERENT domain than without 'www'. By adding 'location.host' it seems to be working just fine now. Sorry if someone has already reported this.

 

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated