masterens Posted August 17, 2010 Share Posted August 17, 2010 Hi everyone this time I want to do something everyone here knows it is possible: when posting a message at a forum you can press buttons and text appears at your pointer. Now that is not exactly what I want to do. at some forum sites (not phpfreaks) when pressing a button while posting you get a popup with buttons which make things appear in the not popup-window. that is exactly what I need to do. This is not about posting messages, btw, but a list of contacts of which you can select 2 in a popup. any ideas? any help is appreciated Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted August 17, 2010 Share Posted August 17, 2010 Parent window and Child window is something you want to work with, eventually you'll end up with something like.. to open the Child window you would use something like: Code to open window function openChild(file,window) { childWindow=open(file,window,'width=300,height=216,scrollbars=no,left=377,top=120,screenX=377,screenY=120'); if (childWindow.opener == null) childWindow.opener = self; } What to use with the function above to open the window <a href="#" onClick="javascript:openChild('newwindow.php','mywin');">Open</a> What you would use within the open window to link back to the parent window <a href="#" onClick="javascript:opener.document.myFormName.FormElementName.value = 'yourChosenValue';self.close();return false;">Text Image Whatever</a> Of course this is a javascript solution and not a PHP solution. Generally speaking in a case like what you describe your looking for javascript rather than php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.