JQuery :: Partial Load Multiple Div With 1 .get/.ajax Call

Sep 2, 2010

I am trying to update 2 div with a .ajax (i tried also .get ) call and i make this code working, so that the updating is realized within 2 url calls. but i can 't figure out how to do it within 1 call?

if i try the read the data var then i get the innerHTML of the clicked node (dhis) i thought i could read up the data var and extract somehow the innerHTML of #checkout_basketList but i can't because .ajax/.get somehow takes the innerHTML of the clicked node (dhis). so i have to make a new call that i do with .load (because of the partial load capabillities) but then again its stupid to do 2 call when all the info is already in the first call, is mine approch not good.

jQuery(document).ready( function($) {
$('.link').live('click', function() {
dhis = $(this);
RETURN_POSTID = do_some_js( dhis, 1 );

[Code]....

View 10 Replies


ADVERTISEMENT

JQuery :: .load() To Partial Load Multiple Containers From The Same Source?

Dec 1, 2010

Basically there are 2 elements on the target page that I would like to load into the calling page, but I would like to do it without making 2 calls to the page if possible.

View 11 Replies View Related

JQuery :: Call A Script After A Ajax Partial View Refreshed?

Nov 22, 2010

I have a jQuery script that would highlight some listbox items (listbox ison a partial view)on document ready.

My problem is, the highlights in the listbox gone after the mvc controller ajaxpost returnthe partial view. How should I call the highlight script again after the ajax post return?

View 3 Replies View Related

JQuery :: Click Function Not Working After Document-load Ajax Call?

Oct 15, 2011

big fan -- first time poster. I've been learning javascript and jquery on the fly so bear with me if I seem to lack understanding of what may be semantic basics.

Anyway, I'm building a mobile app using phonegap. One page grabs data for a table from ajax, and each table element has a delete button in one of the cells. In short: the clicks aren't working. I put the alert in to test, and no dice. I'm not asking for help on the internals, I'm just stumped on why the function isn't being activated,

[Code]...

View 6 Replies View Related

JQuery :: Ajax Event When Partial Response Chunk Done?

Feb 20, 2011

I have a page that takes about 15 seconds to complete. But the page starts outputing content after a half second. Is there a way for jquery to throw an event at that time? For every chunk?

Maby there is a plugin that I can use where I can define "chunk"? Maby an event when there is a newline or some other marker.

My visitors would rather see something else than "please wait", if possible.

View 1 Replies View Related

JQuery :: Ajax: How To Display Partial Server Content

Jan 26, 2010

I have a webpage which handle a time-consuming backend processing on the server side. I am hoping to use ajax and display the back-end processing process on the web-front(i.e. in a DIV). .ajaxStart and .ajaxStop sound to be OK if I want to display some fixed content. Is it possible that I grab partial server-side resultset and update a DIV at the front-end without having to wait for the server-side to finish all of the processing.

Below is my sample code which does NOT work for my purpose.

----
<span id="processing_status" class="blink"></span>
<div id="processing_log" style="display:none"></div>
<script type="text/javascript">
/* This is OK, but I want to display server-side processing records */

[Code].....

View 2 Replies View Related

JQuery :: Ajax Load Multiple Pieces Of Html?

Aug 19, 2010

So I know that with .load I can load a specific chunk of html. What if I want to load 2 chunks of html in one request? For instance my current page has

#nav and #content. My loaded page has the same and I want to replace these 2 elements with the new one (or it contents).

$('#nav').load(loadUrl + " #nav");
$('#content').load(loadUrl + " #content");

So the above doesn't work for me for 2 reasons: 1. I load twice. I don't want to do that (but I also don't want to load the js and all because it will mess things up) 2. This puts #content inside #content

View 2 Replies View Related

Ajax :: Call PHP File On Load?

Mar 29, 2009

What I'm trying to achieve is, when my page loads, I want a ajax script to send data to a php file and then I want the php file to echo the data sent to it. Later I'll insert this ajax data into the database but for testing I want it to echo.

For example let's say the javascript collects the user's browser info, On page load I want the ajax to send this browser info to a php script, the php script should echo back the browser info sent to it and it displayed on the calling html page. (this is example I know this can be done with just javascript or php but it will be simple enough to show me how the 2 interact)

View 19 Replies View Related

JQuery :: Load Content From Multiple Txt Files Into Divs Using Ajax?

Jun 8, 2011

This is my current script

<script type="text/javascript">
$(document).ready(function(){
$("div.content1").load("content_1.txt");
$("div.content2").load("content_2.txt");

[Code].....

What I'm trying to do is get the script to look for class names div.content"x" and then correctly load content_"x".txt

View 4 Replies View Related

Updating Multiple Elements Using One Ajax Call?

Dec 1, 2009

How could I go about doing this?

View 9 Replies View Related

AJAX :: Call Multiple Functions On Onload?

Jan 28, 2010

how to load multiple functions on window.onload and these functions could be in a seperate ajax file.

<html>
<head>
<script type="text/javascript">
window.onload(func1);

[Code]....

func1 and func2 are in a seprate ajax file. In this case only func2 works and func1 is not works.

View 2 Replies View Related

Ajax :: First Function Call On Page Load Always Skipped

Oct 9, 2010

Trying to call the same Ajax function twice on initial load of the page, but only the second one executed. I try to load mainpage, and inside mainpage I try to use ajax to load content1.asp to div1 and content2.asp to div2.

Test scenario (based on the Situation below):
- Page loaded, 1st ajax function skipped, 2nd ajax function loaded
- Remarked 1st ajax function, then 2nd ajax function loaded
- Remarked 2nd ajax function, then 1st ajax function loaded
- Moved the 2nd ajax function to above 1st ajax function, the 2nd ajax function is skipped.

Conclusion:
- the 1st ajax function always skipped. But Why? How to ensure both ajax is called upon loading of the page?

Situation:
mainpage.asp
<div id="div1"></div>
<div id="div2"></div>
<script language="JavaScript1.2">
ajax('div1', 'GET', 'page1.asp');
ajax('div2', 'GET', 'page2.asp');
</script>

ajax.js -
function ajax(strDivID, strMethod, strURL){
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
document.getElementById(strDivID).innerHTML=xmlhttp.responseText;
}}
xmlhttp.open(strMethod,strURL,true);
if (strMethod="POST"){
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
}xmlhttp.send();
}

View 1 Replies View Related

JQuery :: Load A Pdf File Using Div.load() Call?

Mar 7, 2011

I was trying to display a pdf file inside a HTML div and was using JQuery $('#divid').load(url) to load the file inside a div. While other HTML files are loading properly, i am facing problem loading a pdf file.

The content does not get rendered properly, i am not sure whether this load function is supposed to handle this, but is there any other way to load a pdf inside a div?

View 1 Replies View Related

JQuery :: Load Contents Into Two Div With One Load Call Possible?

Dec 13, 2010

This is my actual code:

var sub_listings_url = "index.php?option=com_mtree&task=listcats" + " #sub_listings > *";
var pagination1_url = "index.php?option=com_mtree&task=listcats"+ " .#pagination1 > *";

[Code].....

Would it be possible to fill #sub_listings and #pagination1 with only one .load?

View 11 Replies View Related

JQuery :: Ajax.load() Seems Unable To Load HTML5 Tags Under IE?

Mar 3, 2011

I have a problem when trying to load an HTML5 element with Ajax (jQuery.load ()).Here is a simplified example of the problem.

Main page :
<!DOCTYPE HTML>
<html>
<head>
<title>Title</title>
<!--[if lt IE 9]>

[Code]...

View 5 Replies View Related

JQuery :: Load Pages Into A Div Using The Load Function With AJAX

Feb 15, 2011

I have the following code to load some pages into a div using the load function. When I click one of the links though, nothing happens. I have read a couple of books on JQuery and looking at the examples they give, this looks correct so I am at a loss.

[Code]...

View 4 Replies View Related

AJAX :: Call Based On Results Of A Previous Call

Dec 14, 2010

The general framework is a simple user login function. The user name is selected and a password entered as usual. The function grabs the element values and passes them to a php page that queries the database. An AJAX call returns the password to the function and then I want the innerHTML to be a choice of two web pages, depending on success or failure of validation. There are existing AJAX functions available on the internet but they are overly complicated for what I think should be a simple, quick to load function.

Where I am stuck is that the standard procedure to make an AJAX call is the browser window event. How do you make the call from within the function? I have tried creating two new variables, "success" and "again" to replace xmlhttp, but still stumble on the event to assign a value. I left the blank password protection (if statement) with that variable to demonstrate what I mean.

I've put in my code below, which is in development and successfully alters the innerHTML text depending on user input but I can't figure out how to insert the relevant php page. I have '// out' the testing bits, but left them for info. (I have tried full 'scripting' as the innerHTML, but it's messy.)

View 4 Replies View Related

JQuery :: Call Function In Load?

Oct 12, 2009

Did I do this right? I can't test right now but I think this should work:

function doSomething()
{
...
}
(".someImage").load(doSomething()) ;

I want to fire off doSomething() when the image is fully loaded.

View 2 Replies View Related

JQuery :: Call A Function After Tabs.load()?

Apr 26, 2010

I have this couple of instruction in an ajax structure:

$("#jtabs").tabs("load", $("#jtabs").tabs("option", "selected"));

createMessageBox(...);I want to see the message created by createMessageBox when the load is complete and not before (as it happens).I also tried to bind the tabsload event and callback createMessageBox but it doesn't work

View 5 Replies View Related

JQuery :: Call Click Event On Load?

Jun 5, 2009

This is first shot at jQuery and I need some help to achieve what I intend to do.

I have a click event associated with a div

[Code]...

Currently the function is called on click. I would like to call that function for the ul on load. How do I do this?

View 1 Replies View Related

JQuery :: Call A Page With Load And Attr?

Dec 17, 2010

I try to call a web (demo.php) and i show in a popup divTHIS IS MY IDEA:

$("#link").click(function(call_link){
call_link.preventDefault();
var url = $(this).attr("href"); $("#show").load(url);

[code]....

View 4 Replies View Related

JQuery :: Embedded - Not Loading With .load() Call

Aug 11, 2009

I'm using this code for my website to load pages dynamically:

It works great. However, I'm using a script for tooltips as well - when I load a page that has links/abbr's that need tooltips, the JavaScript doesn't run on them. My solution to this was to add a <script> in the #content of each page that needed tooltips, except that doesn't work either.

View 1 Replies View Related

JQuery :: Call In Head Section After Load

Jul 1, 2010

I have a webpage which allows the user to select the content they would like to display using ajax to do this. the problem i have is that one display option is a file tree which only works when loaded in the head section.

The following code is loaded in the head section:

Cannot figure out whether or not i can adjust the code to load only when the ajax call to the file tree is made.

View 9 Replies View Related

JQuery :: Call Function After Page Load In Iframe?

Apr 23, 2009

My iframe id is 'bpd'. I would like to call a function after the page loads into the iframe.

Here is my code and I am getting 'Invalid Argument' error.

$('#bpd').load('/main/buspd.cfm', function () {
setHeight();
});

View 4 Replies View Related

JQuery :: .load() Doesn't Work On First Call In FF3 And IE (But Works In FF3.5)?

Aug 25, 2009

We're attempting to load a snippet of XHTML into a container on a page via .load() from a fancyBox pop-up.
Here's the bit of jQuery we're using:

[Code]...

View 7 Replies View Related

Jquery :: Slideshow - Call Image With Load Function?

Sep 30, 2011

In my website I have a slideshow that is working properly with this jQuery code:
Code:
$(function(){$('.fadein img:gt(0)').hide();
setInterval(function(){
$('.fadein :first-child').fadeOut(2000)
.next('img').fadeIn(2000)
.end().appendTo('.fadein');},
5000);
});

In another page I call one HTML file by the function .load with some imgs sources exactly as I have in my main page slideshow that is working well. The problem is that this last slideshow (that I call the images with the .load function) is not working properly as you can see here (too hard to explain, better just see, 1st thumbnail). I call the HTML file with this code:
Code:
$('#hab_ab').click(function(){
$('#target').removeClass('thumbs').load('slideshows/arq/hab/boavista/ab_ss.html');
I use .removeClass because of the positioning...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved