天道酬勤,学无止境

ajax

Using Nutch how to crawl the dynamic content of web page that are uisng ajax?

I am using apache Nutch 1.10 to crawl the web pages and to extract the contents in the page. Some of the links contains dynamic contents which are loaded on the call of ajax. Nutch cannot able to crawl and extract the dynamic contents of ajax. How can I solve this? Is there any solution? if yes please help me with your answers. Thanks in advance.

2022-01-19 02:13:47    分类:问答    java   ajax   plugins   web-crawler   Nutch

Is there any way to add cookie in method with @ResponseBody annotation?

I build my web application based on Spring MVC and come across a problem whilst trying to add a cookie in a method handling an ajax request. I realized that method with @ResponseBody (in my example it returns a string value) does not create a "real" response and added cookies are lost. Is there any way to add a cookie in a method called via ajax (and therefore annotated with @ResponseBody) in Spring MVC?

2022-01-19 02:13:08    分类:问答    ajax   web-applications   spring-mvc   cookies   annotations

Echo JS onclick fill function AJAX not working

I have a search bar with AJAX, MySQL, PHP, and JS. The search bar gives live search results in a div in a list and works in that respect. My problem is the live search results in the div list when clicked on do not fill the search bar's input. Nothing happens and the list just stays open unless I click out of it. I used to have it working in my old code where when you click on any result it fills the search bar's input, but ever since I rewrote the whole code I can't figure out why the onclick and fill functions aren't working now. How can I fix this code so that when a user clicks on one of

2022-01-19 01:51:13    分类:问答    javascript   php   mysql   ajax

when is triggered AJAX success?

I want load some HTML document by AJAX, but I want to show it when all images in this document are loded. $('.about').click(function () { $(".back").load('Tour.html', function () { $(".back").show(); }); }); ".back" should be visible when all images in Tour.html are loaded, when is triggered a success event??

2022-01-19 01:44:14    分类:问答    javascript   jquery   ajax

Close the Ajax Modal popup window on Esc keypress

I had shown a Panel Pop up windows using Ajax and what i have to do is i want to close the window when user press the Esc key. IS this is possible? Please help me if any one know about this or previously done this. Thanks

2022-01-19 01:25:15    分类:问答    c#   ajax   modalpopupextender

Using :remote => true with hover event

I want to invoke an Ajax call in Rails. I've seen a good way of doing so with the :remote option. I've got this working example: <%= button_to('Get Transfers', {:action => 'get_transfers', :section_id => params[:section_id]}, :method => :get, :remote => true) %> However, I don't want the user to invoke the call by pressing a button or clicking a link, but rather invoke it on a Javascript event (hovering over an element). Is there a way to use :remote => true, but invoke it automatically when hovering over an element? If yes, how?

2022-01-19 01:03:23    分类:问答    ruby-on-rails   ajax

Ajax submit makes a full post after first submit

The first submit works as expected, but the next time it's fully posted back. I'm using jQuery.form plugin, specifically the .ajaxSubmit(options) call to submit the form. There are a couple levels of wrapper div's, but I debug the button.click binds and I can't figure out why the second time, even with the same variables, it does a full post and my partial view is returned on a brand new page. here, buttonid and screenid are the same on both posts. I indicate this because they're calculated as per a naming convention like <name>Outer (wrapper), <name> (update target), and <name>Form (form to

2022-01-19 00:26:04    分类:问答    jquery   asp.net-mvc   ajax   jquery-plugins

javascript class property not set in success function of ajax call [duplicate]

This question already has answers here: How to access the correct `this` inside a callback (13 answers) Closed 5 years ago. Sorry for the duplication but I can find any solution in the others posts. I'm trying to fill a javascript object using a ajax call to a webservice. I don't understand the logic of this and why my object in not set after the call. I wrote this little example to explain my problem : Code : function Cellule(){ this.test = 0; this.textfunction(); } Cellule.prototype.textfunction = function(){ this.test = 1; $.ajax({ type: "GET", url: "BASEURL/cellules", data: "", success

2022-01-19 00:11:02    分类:问答    javascript   jquery   ajax   object   asynchronous

Script5 access denied in IE9 in same domain

I'm developing a site in django, which uses a jquery multi file upload plugin. When i register to my site, a confirmation email is sent to my gmail account, i click the activation link and my website is opened in a new tab. I login, then I try to upload a file and it fails in IE9... F12 says "Script5 access denied" However, if I type the link in the URL address bar instead of clicking the link in my email it works perfectly. It allows my to upload anything I want. Im testing in a development server, and the host name is http://192.168.0.1:8085 My problem is that when i access my site via the

2022-01-18 23:37:49    分类:问答    javascript   jquery   ajax   django   multi-upload

Stop bot sending multiple requests quickly. PHP + AJAX

I am having an issue with someone who keeps exploiting my betting site with a bot. He is able to (presumably) use a bot to press the "Roll" button multiple times very quickly and get the same roll numbers. The roll button using a function to work. Here is this function: var rolling=false; var lastBet=(Date.now()-<?php echo $settings['rolls_mintime']; ?>-1000); function place(wager,multiplier,bot) { if ((rolling==false && (Date.now())>=(lastBet+<?php echo $settings['rolls_mintime']; ?>)) || bot==true) { rolling=true; lastBet=Date.now(); $("#betBtn").html('ROLLING'); if (bot!=true) _stats

2022-01-18 23:37:13    分类:问答    php   jquery   mysql   ajax   bots