• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with popup window.

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is a link on compose.jsf page. when I clicked on link it opens a popup window (created by javascript). There is number of check boxes and one link "Done" under a form in pop up window. A user can select number of check boxes and when he clicks on link done, browser submit the form to server.

I want that the response (after submitting the form of popup window) into parent window and popup window should be closed . I have tried for this. The code works fine in IE and Firefox. There is problem with Google chrome browser where it opens another window instead of parent window.

I am pasting below my javascript-

function set_form_target()
{
elem = document.getElementById("addressbook");// form id
elem.target=window.opener.name;// I have set the name of parent window using window.name
self.close();
}


<h:commandLink id="addContactToList" rendered="#{messageCompose.addressBook.size != 0}"
action="#{messageCompose.addContactsOnComposePage()}"
onclick="set_form_target();" value="Done" >
 
reply
    Bookmark Topic Watch Topic
  • New Topic