Jump to content

Resizeble = yes DONT WORK


umekille78

Recommended Posts

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

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

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.

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

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

/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

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

hi ,remove & #39; with single quote then it will work
Link to comment
Share on other sites

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...