73 users online (0 members and 73 guests)  


  Results 1 to 4 of 4

Related

  1. Popup-like window    Forum: HTML Forum
    Replies: 0
  2. javascript onclick event to refresh iframe.    Forum: Javascript Forum
    Replies: 5
  3. popup window    Forum: HTML Forum
    Replies: 1
  4. Popup Window    Forum: HTML Forum
    Replies: 2
  5. Popup window to fit?    Forum: HTML Forum
    Replies: 1
  1. #1
    sandy's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2006
    Posts
    4

    Re: I need a script...dunno where to post..Me too

    Hi All,
    Can anyone suggest me how to refresh the popup window using the javascript.
    Currently I am displaying static contents in a pop up window based on the hyperlink the user clicks onto the main page. In order to avoid the overhead on the database side all objects are stored in session and the requested info is fetched from them. I can see that when a link is clicked the popup window getting loaded with the required info. But the problem lies with the window not getting refreshed which prevents the new content to be overwritten on the old one. How do I resolve this. Our application is absed on Struts 1.2
    I don't want to use window.reload as this will call the struts action class and fetches the data again to store it in the session.
    My javascript function calls the action class directly inorder to pass the id from the jsp page (Is this clear ????)
    Hope I was clear.
    I appreciate any help in this regard. I am stuck.

  2. #2
    sandy's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2006
    Posts
    4

    Re: I need a script...dunno where to post..Me too

    Quote Originally Posted by sandy
    Hi All,
    Can anyone suggest me how to refresh the popup window using the javascript.
    Currently I am displaying static contents in a pop up window based on the hyperlink the user clicks onto the main page. In order to avoid the overhead on the database side all objects are stored in session and the requested info is fetched from them. I can see that when a link is clicked the popup window getting loaded with the required info. But the problem lies with the window not getting refreshed which prevents the new content to be overwritten on the old one. How do I resolve this. Our application is absed on Struts 1.2
    I don't want to use window.reload as this will call the struts action class and fetches the data again to store it in the session.
    My javascript function calls the action class directly inorder to pass the id from the jsp page (Is this clear ????)
    Hope I was clear.
    I appreciate any help in this regard. I am stuck.
    Sorry for the mislead about the window.reload(). I can use it. IT will cause no issue. but still I couldn't bring up the refreshed contents to the view. Only way which I can do when I have the window.reload(true) and still I need to click on to the link twice inorder for the popup window to show the contents.
    This is my javascript code. Any help is appreciated. I couldn't figure out why the window is not showing the refreshed contents though it gets loaded. hmmmmmm....
    var msgWindow = null;

    function viewElementDetails(element_id){


    msgWindow = window.open("/PMW/maintainModifiedDataset.do?action=ShowElementDetails&element_id="+element_id,"displayWindow","resizable=0,scrollbars=1,menubar=0,toolbar=0,height=400,width=700");

    alert("Click Ok To Continue...");

    msgWindow.focus();

    if
    (msgWindow && !msgWindow.closed){

    msgWindow.location.reload(true);

    msgWindow.focus();
    }
    }

    Last edited by sandy; 09-13-2006 at 02:39 PM.

  3. #3
    sandy's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2006
    Posts
    4

    Re: I need a script...dunno where to post..Me too

    Quote Originally Posted by sandy
    Sorry for the mislead about the window.reload(). I can use it. IT will cause no issue. but still I couldn't bring up the refreshed contents to the view. Only way which I can do when I have the window.reload(true) and still I need to click on to the link twice inorder for the popup window to show the contents.
    This is my javascript code. Any help is appreciated. I couldn't figure out why the window is not showing the refreshed contents though it gets loaded. hmmmmmm....
    var msgWindow = null;

    function viewElementDetails(element_id){


    msgWindow = window.open("/PMW/maintainModifiedDataset.do?action=ShowElementDetails&element_id="+element_id,"displayWindow","resizable=0,scrollbars=1,menubar=0,toolbar=0,height=400,width=700");

    alert("Click Ok To Continue...");

    msgWindow.focus();

    if
    (msgWindow && !msgWindow.closed){

    msgWindow.location.reload(true);

    msgWindow.focus();
    }
    }

    Ok Guys,
    I got it after a few hours of struggle. Now my popup window is getting refreshed. Thanks for all who ever tried to find a solution to this.

  4. #4
    sandy's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2006
    Posts
    4

    Re: I need a script...dunno where to post..Me too

    Quote Originally Posted by sandy
    Ok Guys,
    I got it after a few hours of struggle. Now my popup window is getting refreshed. Thanks for all who ever tried to find a solution to this.



Tags for this Thread