Hi David,

Below is the code:

Java script function in the Iframe is:

function addStudentInfo() {

        var dataObjArr = new Array();
        var studJson1 = {"name": "Stud1", "age": "21", "gender": "Male",
"course" : "Physics", "location": "XYZ"}        ;
        var studJson2 = {"name": "Stud2", "age": "22", "gender": "Female",
"course" : "Chemistry", "location": "XYZ"};
        var studJson3 = {"name": "Stud3", "age": "23", "gender": "Male",
"course" : "Matchs", "location": "XYZ"};

        dataObjArr.push(studJson1)
        dataObjArr.push(studJson2)
        dataObjArr.push(studJson3)

        parent.processStudentFromIframe(dataObjArr);
}

java script function in the parent page, which basically creates a
Ajax request, adds the student to Database and updates the display.

function processStudentFromIframe(dataObj) {
        var studParamAttributes = "";
        for(var a = 0; a < dataObj.length; a++) {
                studParamAttributes = studParamAttributes + dataObj[a].name + 
"~~" +
dataObj[a].age + "~~" + dataObj[a].gender
                + "~~" + dataObj[a].course + "~~" + dataObj[a].location;

                studParamAttributes = studParamAttributes + ",";
        }

        //removing the last trailing comma.
        studParamAttributes = studParamAttributes.replace(/^,+|,+$/, '');

        var searchParam ="cmd=ProfileController&studentParamAttributes=" +
studParamAttributes + "&action=addStudentFromIframe";

        showProgress();
        var url = "./ab";
        new Ajax.Request(url,
                                                        {
                                                                method:'post',
                                                                
parameters:searchParam,
                                                                onComplete: 
function(request) {
                                                                        
hideProgress();
                                                                        
updateMessageAndStudentSummary(request);
                                                                }
                                                        }
                                        );

}

Parent page function is getting called and showprogress function
displayed the progress bar but since the response never comes back
from Ajax.request, page simply gets hanged with the progress bar
display.

-- Atif

On Feb 12, 4:21 pm, david <david.brill...@gmail.com> wrote:
> Hi, Atif,
>
> is it possible to have the code, because it could be a problem in
> Safari.
> Safari have some hidden bug, it could be that.
>
> --
> david
>
> On 12 fév, 10:58, Atif <atif.siddiq...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I am using prototype and scriptaculous in my application. Normally all
> > the functionalities works fine with all the browsers. Current
> > situation is I have a parent page in JSP which is having an Iframe
> > with an src of a PHP page. After doing some search in the Iframe page
> > I am calling a parent page function which is basicaly calling ajax and
> > updating the UI.
>
> > Ajax request is going properly but I never get the response back. The
> > screen simply get hanged.
>
> > Thanks and regards,
>
> > Atif Ahmad Siddiqui.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to