Hello, I have a function using $.ajax() to get values from an XML file, when the info is loaded and success event is fired, I use $(xml).find('').each(function(){}); to populate some vars...
function getData()
{
$.ajax({
type: 'GET',
url : 'info.xml',
dataType: 'xml',
success: function(xml)
{
...
i need to show the number of online visitors, but there is a problem with selecting algoritm to do it!
maybe i must create a table in DB, where i'll store ip addresses of visitors and time of visit! by so i can show the count of ip addresses, which's time >= NOW() - 10 minutes, for example...("now()-10 minutes" is just to show the logic,...
Basically, I want to translate the following into Seaside Smalltalk:
$(".myDiv").bind('click', function(e) {
console.log(e);
});
Besides that I don't want to console.log the event, but access it in my ajax callback.
The most promising approach seemed to be something like
html div
onClick: (html jQuery ajax callback: [:v | s...
Hey guys here is my code (roughly):
books.html.erb
<% @books.each do |book| %>
<% @bookid = book.id %>
<div id="enter_stuff">
<%= render "input", :bookid => @bookid %>
</div>
<%end%>
_input.html.erb
<% @book = Book.find_by_id(@bookid) %>
<strong>your book is: <%=h @book.name %></strong>
create.rjs
page.replace_h...
Hi,
I have a very specific problem. The site I'm developing loads the FB connect button by ajax (it loads the box that includes FBC button).
And when user logs in it loads instead of it the box with FB logout link.
The problem is that FB requires to call FB.init() at the end of the body (when all the FB stuff is already on the page) an...
I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).
So, how do I setup my WCF service to accept calls fro...
Hi folks,
I have a client who wants to open variously sized images in a centered popup. I tried to get them to use FancyBox but they don't want interstitial presentation, so...
I initially was opening a generic popup which resized and centered onload based on image size but they don't like the shift so I added a PHP script to echo the...
In my rails app, I want to have a sortable list as part of an object creation. The best practice suggested in Railscast adds the acts_as_list plugin and then initiates AJAX calls to update item position. However, AJAX calls won't work on an unsaved model, which is the situation with new.
One solution would be to save the model immediate...
Hey!
I have a cool bit of dojo running where I click a button - and it brings a success message on the screen via javascript. Is it possible to issue a call to a server side Groovy script foo.groovy from within this Javascript - because not only do I want to show the cool success message - but I need to do some work in the background at...
Hello.
I have a text field. When I type something into than text field, I want to load stuff into the DIV below. That's my code equivalent:
<input type="text" onkeyup="/* I am not sure how it's done, but I'll just write: */ document.getElementById('search_results').innerHTML = getContents('search.php?query='+this.value);" /><br/>
<div ...
Hi,
I am developing an asp.net web application and stand on jQuery plug-ins for any aspects of my Interface. But unfortunately I have to use AJAX only for its UpdatePanel to enable partial rendering. Is there any way to use jQuery for partial rendering and act such an UpdatePanel?
...
How to make Keyboard navigation left/up/right/down (like for photo gallery) feature for jQury Tabs with History? Demo without Keyboard feature in http://dl.dropbox.com/u/6594481/tabs/index.html
Needed functions:
1. on keyboardtop/down> make select and CSS showactivenested ajax tabs from 1-st to last level
2. on keyboardleft/right> chang...
$(function(){
$('#tabsSlide #nav li a').click(function(){
var currentNum = $(this).attr('id').slice(-1);
$('#tabsSlide #nav li a').removeClass('current');
$(this).addClass('current');
$('#tabsSlide #content .tab-slide').slideUp(300);
$('#tabsSlide #content #slide-'+currentNum+'.tab-slide').slideDown(300)...
My understanding is that in order to return a complex PHP variable to Javascript, it should be done via AJAX and json_encode. Could somebody give me an actual example (both PHP and Javascript code) of this? Lets say we have the two-dim array in PHP:
$twoDArr = array( array('Greg', 44, 'Owner'),
array('Joe', 23, 'Rent...
Hey guys,
I need a little help..
iv'e been developing a Jqery plug-in to get the page ranks of urls on a website using XHR,
The problem is when requesting the rank from google servers the page is returned no content, but if i use an inspector and get the url that was requests and go to it via my browser the pageranks are shown. so it ...
I want create a loading progress bar like Gmail in center and top of the page,
and work in all browsers
...
At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName,...
Hi folks, I wish to authenticate a user without having the page reloaded, and having the user submit a given form.
However, the problem that I immediately run into here is that the authenticity token typically gets set when the page is reloaded.
I need the authenticity token for the form submission, but i do not have it yet because t...
I have an AJAX-enabled SharePoint 2007 site. I have also created a user control that has an interactive ajax form. It obviuosly works like a charm locally, but I am trying to get it working on the SharePoint site. The problem is that once I load up the user control on to an aspx page inside SharePoint, the form (which has ajax), causes t...
I am creating one admin page where I have multiple textboxes.when I enter the userid in one textbox I want to display user name in next textbox when admin moves to next text box.for this I can use ajax or javascript? which one will be better?how can I do it through javascript.
...