Ok, second question (and hopefully last) of the day. Ive hit another snag with this rather complex page im trying to put together. Im not a PHP or JavaScript developer, but i am stuck with trying to resolve the issue. So its taken a few hours having never used it before but I think i get the principal of Ajax and there is some code already built into this site (in the form of libraries) called PROTORYPE and JQUERY so i have those libraries available to me.
So what I want to do is 2 things.
Currently, there is a list of people and when you click on one, an area expands with some information. At this point i would like to call a javascript to load their related images into an ajax area.
Calling the code is not a problem when they click someone, what is a problem is loading the images from the php file that returns them into an existing DIV or SPAN area.
Now, i had functions on another page (by the other developer who has done a bunk) which looked like this:-
now there was a DIV on the calling page that would have been named "drop1" and when clicking on the load news link (which calls the above method), the text changes to the news. Hurrah.
However, on MY page when I am calling (and the correct params are getting thru as an alert in the function tells me so)
On the page i have (for now) a hardcoded link.
Elsewhere on that page I have (again temporarily hard coded)..
(ive tried a span as well)
and in the JS (which is firing correctly) I have:-
Ive tested the response from getgals_ajax.php and it returns the images as it should.
So what i want to do is return those images and put the code within a DIV/SPAN on an existing page.
Basically this part of the site is an image thumbnail viewer.
Any ideas?
A
So what I want to do is 2 things.
Currently, there is a list of people and when you click on one, an area expands with some information. At this point i would like to call a javascript to load their related images into an ajax area.
Calling the code is not a problem when they click someone, what is a problem is loading the images from the php file that returns them into an existing DIV or SPAN area.
Now, i had functions on another page (by the other developer who has done a bunk) which looked like this:-
function loadNews(id) { $("#drop"+id).load("/getcontent.php?o="+id+"&type=news"); }
now there was a DIV on the calling page that would have been named "drop1" and when clicking on the load news link (which calls the above method), the text changes to the news. Hurrah.
However, on MY page when I am calling (and the correct params are getting thru as an alert in the function tells me so)
On the page i have (for now) a hardcoded link.
<a href="javascript:loadGalleries('#pic1',1);">LoadGals</a>
Elsewhere on that page I have (again temporarily hard coded)..
<div id="pic1" class="col_x_5"> gallery goes here. </div>
(ive tried a span as well)
and in the JS (which is firing correctly) I have:-
function loadGalleries(_target, _artistId) { $("pic1").load("/getgals_ajax.php?o="+id); }
Ive tested the response from getgals_ajax.php and it returns the images as it should.
So what i want to do is return those images and put the code within a DIV/SPAN on an existing page.
Basically this part of the site is an image thumbnail viewer.
Any ideas?
A