Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Window size from a form button 2

Status
Not open for further replies.

celticking

Technical User
Feb 15, 2001
69
US
Is there a way to do this, i have only done it from a text link before. The code i have is as follows...

<form method=&quot;post&quot; action=&quot;itc_message_post.lasso?to=[field:'username']&quot; target=&quot;_blank&quot;>

<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Contact Me&quot;>

I don't want to use the target=&quot;_blank&quot;. I want to be able to open the page to a set size with no scroll bars possibly using onClick or onSubmit.

Any suggestions please?
 
I'm not too sure what you mean jaredn about the window named results. I already have the page i want opened, itc_message_post. It works fine now but i'm using target so i get a full screen page. Sorry if i misunderstand your reply, still trying to come to terms with javascript. Thanks.
 
try:

<form onsubmit=&quot;window.open('','results','width=800,height=600')&quot; target=&quot;results&quot;>

What you are doing is, just before the form submits, creating a window to hold the results inside of. jared@eae.net -
 
Thanks, my code now reads

<form method=&quot;post&quot; action=&quot;itc_message_post.lasso?to=[field:'username']&quot; form onSubmit=&quot;window.open(&quot;,'results','[field:'username']','width=515,height=590,left=5,top=0,status,scrollbars=no,resizable,menubar') target=&quot;results&quot;>
<div align=&quot;center&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Contact Me&quot;>

This still opens the new window but full size?
 
why do you have the bold option below, if you take it out it should work:

(&quot;,'results','[field:'username']',[\b]'width=515,height=5 jared@eae.net -
 
Sorry, i took out the text you mention to leave...

<form method=&quot;post&quot; action=&quot;itc_message_post.lasso?to=[field:'username']&quot; form onSubmit=&quot;window.open('results','width=300,height=300,left=5,top=0,status,scrollbars=no,resizable,menubar')&quot; target=&quot;results&quot;>
<div align=&quot;center&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Contact Me&quot;>

I still get the same, opening in a full sized window. Sorry for the inconveniance, i do appreciate your help though.
 
copy & paste this and try it:

<form method=&quot;post&quot; action=&quot;itc_message_post.lasso?to=[field:'username']&quot;
onSubmit=&quot;window.open('','results','width=300,height=300,left=5,top=0,status,scrollbars=no,resizable,menubar')&quot; target=&quot;results&quot;>
<div align=&quot;center&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Contact Me&quot;>

all I did was add the bold part above. jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top