I had one contact form wordpress plugin which loads with ajax so i want to remove that loader type ajax what should be done?
Inspect the element which you want to remove by going to browser.
If chrome you can directly press ctrl+shift+i and windows will open.
Locate that particular loader you want to remove and you will find it wrapped in div or id.
Find that and put it in css code with this command as shown in example.
.ajaxloader {display:none;}
#ajaxloader {display:none;}
Hope this will works.
In my particular case, the AJAX loader was enclosed with a span tag, so the code looked like this:
.ajaxloader span {display:none;}
Related
I'm able to retrieve data inside an iframe using
browser.iframe
But when I try to interact with elements inside this iframe, like for ex. click on a button, watir won't locate any of them.
I tried with all kind of elements inside this iframe, but nothing happens.
There could be more than one iframe on your page so you might be targeting the wrong one (just writing browser.iframe will target the first iframe on page.
You can could inspect the page and check if there are more than one iframe, or type:
puts "there are #{browser.iframes.count} on page"
and run the script again.
ideally iframe has an id so you could write
my_iframe = browser.iframe(id: "something")
my_iframe.buttons.last.click
# or
my_iframe.button(text: "ok").click
if it's not a secret, right click => inspect page you are automating and screenshot/paste html here. Or share the whole code that doesn't work for you.
I'm adding a facebook share button to each post on a Wordpress (Using Facebook Share Button New plugin), it works ok for each post/page except when i'm loading them trough ajax, the result it's a normal Facebook like button but the popup (to write a comment) appears inside the button it is not expanded.
To check go to: http://iwanttobeher.com/ and then click on any face at the bottom of the page, then test the like button and you'll see what happens.
I don't know what to do, i tried to FB.XFBML.parse() after loading the content but the result is the same.
Switching to HTML5 didn't help in our case. What did was to remove the FB object just prior to new content being inserted into the page via Ajax:
delete FB;
wrapper.html(response.data);
We reload full pages via Ajax and so new page content recreates the FB object and re-initializes XFBML anyway. Not sure if this workaround would work if we reloaded only parts of the page though.
The original answer is here.
I've managed to fix it by changing the implementation to HTML5 instead Iframe or XFBML using Facebook's tool to generate like buttons: https://developers.facebook.com/docs/reference/plugins/like/
Here's my issue, I'm trying to load a FB comments module via an AJAX div. Now, it works if I go directly to the php page, but if I load it from within the div, it doesn't. I've looked at the other posts (FB javascript SDK after jquery LOAD (ajax)), but still can't seem to get it to work, looking for clarification.
If you want to see what I'm talking about, check http://azconceptphoto.com/lindsey and check out testimonials.
Ideally, on the normal part of my site, I can just load the HTML5 code and it works fine, though for some reason it doesn't remotely work via the AJAX div. And considering the posts from before are out of date (2011), I was hoping to get more feedback on this.
Based on the code from your link you are not using any of the PrototypeJS Ajax methods to get the backend script. Ajax.Updater is the method you need to use so....
Here is my suggestion
change the definition of loadXMLDoc() to
function loadXMLDoc(div, location)
{
new Ajax.Updater(div,location,{'evalScripts':true});
}
this will update the contents of div with the contents of location. Also if the response has <script> tags in it then the javascript will be parsed and evaluated (thats the option evalScripts)
Read Chain
$(".ReadChainDL").colorbox();
When I click the Read Chain it runs the ajax and loads the colorbox, but the colorbox is blank! I can confirm that ajax is running and pulling the correct content via firebug. It's just not populating the generated ajax content into the colorbox. I've confirmed via firebug that colorbox is blank.
I've tried it in Firefox and Chrome
It's got to be the URL; your code works fine. Proof: http://jsfiddle.net/HP8tN/
I think there are two main possibilities:
There's no filename, so maybe Colorbox doesn't know what content type to use. Or maybe the URL is wrong, or the target has the wrong content type. I think this is the most likely option. Try $(".ReadChainDL").colorbox({photo: true}); if it's a photo. Otherwise, check out the Content Type section in the documentation.
Colorbox is supposed to figure out whether you've passed it a URL or a jQuery-style XPath selector. The 10/12/2012 could be messing up whatever logic it uses to recognize a URL. This seems unlikely, since you've confirmed that something is coming back, but it's worth a try. Try 10%2F12%2F2012 instead.
Can you post the content that is being returned by the ajax call? jQuery may not be able to append it to your document if there are issues with it being invalid or malformed.
Try validating your content.
I've two php-scripts: the first makes ajax call to the second, which returns javascript code and div for swfobject. I'm calling the second file twice: after loading page(it works ok and I can see swfobjects) and after users' clicking on button(it not works and div just goes blank).
I suggest that embedSWF works ONLY after pages' loading, because my ajax calling is correct.
But a way must be found! Any ideas?
Yes, swfobject.embedSWF is designed to work after page load -- it has a built-in domload event handler.
If you don't want swfobject to automatically embed when the page is loaded, use swfobject.createSWF instead. The official documentation explains how swfobject.createSWF works.
EDIT:
After re-reading your post, I see you want to embed a SWF after the page has already loaded. swfobject.embedSWF can be used in both cases. Here's a tutorial and an example.