umekille78 Posted March 14, 2006 Share Posted March 14, 2006 Hi all!Its me again Per.I almost have a working chatroom now. Some small things left.When I open a new window for the chat page it dosn't get resizeble as I whant it to be. win=window.open('','Chatt','height=600','width=800','status=no','toolbar=no','menubar=no','location=no','resizable=yes'); Can anyone figure out why this dont work?/PerPS. The height and width is in pixels right? It dosn't seems to be as big as a would like. Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 To resize an window.open:<INPUT type="button" value="New Window!" onClick="window.open('http://www.google.com/','mywindow','width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=yes')"> Link to comment Share on other sites More sharing options...
miteshbhimjiyaani Posted March 14, 2006 Share Posted March 14, 2006 hi try this :win=window.open('','Chatt','height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes');it will work Link to comment Share on other sites More sharing options...
miteshbhimjiyaani Posted March 14, 2006 Share Posted March 14, 2006 Hi all!Its me again Per.I almost have a working chatroom now. Some small things left.When I open a new window for the chat page it dosn't get resizeble as I whant it to be.win=window.open('','Chatt','height=600','width=800','status=no','toolbar=no','menubar=no','location=no','resizable=yes'); Can anyone figure out why this dont work?/PerPS. The height and width is in pixels right? It dosn't seems to be as big as a would like. <{POST_SNAPBACK}> hi try this :win=window.open('','Chatt','height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes');it will work Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Hi all!Im sorry to say but this dose not work at all!When I added the & #39; part it dont open the chatpage in a new window any more. It opens it in the same window as the login page is in.Look at this: <script>function cForm(form){win=window.open('','Chatt',& #39;height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes);form.target='Chatt';}</script> Like you told me to right? The script function is used by a onClick in a form. We can look at that too: <form action="http://exampel/chat.php" method="post"><input type="hidden" name="first" value=true><p> <input name="submitButton" type="submit" value="Enter" onclick="cForm(this.form)"></p></form> Before i added the & #39 bit it was working fine. Exept for the resizeing thing.Im not that familiar with Java Script. I hope some one can help me find the problem here./Per Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 /Per try this <head><script>function cForm(form){var hello=form.action;window.open('hello','','width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=yes');}</script></head><body><form action="http://exampel/chat.php" method="post"><input type="hidden" name="first" value=true><p> <input name="submitButton" type="submit" value="Enter" onclick="cForm(this.form)"></p></form></body> Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Nope, sorry.It feels like the function never is executed.It behaves just like an ordenary submitbutton/Per Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 There seems to be a problem with this board it keeps changing ' to & #39make sure the window.open used 'window.open('hello','','width Link to comment Share on other sites More sharing options...
miteshbhimjiyaani Posted March 14, 2006 Share Posted March 14, 2006 Hi all!Im sorry to say but this dose not work at all!When I added the & #39; part it dont open the chatpage in a new window any more. It opens it in the same window as the login page is in.Look at this:<script>function cForm(form){win=window.open('','Chatt',& #39;height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes);form.target='Chatt';}</script> Like you told me to right? The script function is used by a onClick in a form. We can look at that too: <form action="http://exampel/chat.php" method="post"><input type="hidden" name="first" value=true><p> <input name="submitButton" type="submit" value="Enter" onclick="cForm(this.form)"></p></form> Before i added the & #39 bit it was working fine. Exept for the resizeing thing.Im not that familiar with Java Script. I hope some one can help me find the problem here./Per <{POST_SNAPBACK}> hi ,remove & #39; with single quote then it will work Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Ok!Now its geting strange!It opens a new window. But it dont putt the chatpage in it. And after that it opens the chatpage in the log in window.Any new ideas?Thanks for the help by the way. You are all wery nice to me./Per Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 Try this, remember to change the & #39 to ' if it appears again<head><script>function cForm(){window.open('http://exampel/chat.php','','width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=yes');}</script></head><body><form><input type="hidden" name="first" value=true><p> <input name="submitButton" type="button" value="Enter" onclick="cForm()"></p></form></body> Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Wouldnt that forget to send the formdata?I can try but if you like./Per Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 I tryed it!And the form data dont get sent.Otherwise it works perfect. Resizeble and all.But it feels like we only tradede one problem for another Anyway. Greatful for the help!/Per Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 Would it maybe be an idea to have a link on your main page that says log-in, click that and it opens up the window.open() with the login page in it, then submit that page to the php?That would make it allot easier, we can persist with the other method if you like though Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Its an ide ofcourse! But the page is part of a greater project. And if it is posible to solve the problem in the original way it would be better./Per Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 Can i just check, when you first posted was everything working ok apart from the resize, ie was the form passing info to the new window and the only problems was that it wouldn't resize or was it not at the passing info stage?ta Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Can i just check, when you first posted was everything working ok apart from the resize, ie was the form passing info to the new window and the only problems was that it wouldn't resize or was it not at the passing info stage?ta<{POST_SNAPBACK}> Yes!It worked fine! The resize was the only problem Link to comment Share on other sites More sharing options...
scott100 Posted March 14, 2006 Share Posted March 14, 2006 ok,<head><script>function cForm(form){win=window.open('','Chatt',' height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes');form.target='Chatt';}</script></head><body><form action="http://exampel/chat.php" method="post"><input type="hidden" name="first" value=true><p> <input name="submitButton" type="submit" value="Enter" onclick="cForm(this.form)"></p></form></body> Link to comment Share on other sites More sharing options...
umekille78 Posted March 14, 2006 Author Share Posted March 14, 2006 Good idea to go back to the start!I fixed it from there. With the help I got on the way I was able to fix it. Strange but good.Thansk to all you how have helped me./Per Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now