Gonzalo Floria
unread,Apr 23, 2010, 8:35:17 AM4/23/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jqt...@googlegroups.com
Hi
Im having a very stupid problem.
I have a main page that loads some children via AJAX. That part was working fine.
Now I want to load a page with 2 divs. I want to show "firstDiv". This div has a link that will show/load secondDiv.
I saw in the examples that something like this is done in the Ajax part: "load('ajax.html .info'..."
I tried the same but Im failing...
All I get is a blank screen, with no toolbar or body :(
This is the structure of my pages:
1) The TARGET page:
<div id="firstDiv">
<div class="toolbar">
<h1>First div</h1>
<a class="back" href="#">Back</a>
</div>
<div class="firstDivBody">
First div body here
<ul class="rounded">
<li class="arrow"><a href="#secondDiv">Jump to 2nd div</a></li>
</ul>
</div>
</div>
<div id="secondDiv">
Second div body goes here
</div>
2) The MAIN page:
<div id="sales" class="current">
<div class="toolbar">
<h1>Master page</h1>
<a class="back" href="#">Back</a>
</div>
<ul class="rounded">
<li class="arrow"><a href="#moveOn" onclick="loadNewDiv('newDiv','SecondPage.jsp .firstDiv')">Second page first div</a></li>
</ul>
</div>
3) My loading method: I created it to automatically have a "loading" screen on all AJAX links
function loadNewDiv(newDivId, targetURL){
$("body").append('<div id="'+newDivId+'">\
<div class="toolbar">\
<h1>Loading</h1>\
<a class="back" href="#">Back</a>\
</div>\
<div style="text-align:center; font-size: 17px; margin-top: 16px; font-weight: bold;">Loading...</div></div>');
//fetch data
$('#'+newDivId).load(targetURL);
// Replace loading screen with report we just loaded
jQT.goTo('#'+newDivId, 'slide');
}
please please please, a hand????
thanks in advance.
Gonso
--
-----------------------------------
Gonzalo Floría Giráldez