/    Sign up×
Community /Pin to ProfileBookmark

Help please!

I’m trying to open up a pop up window via javascript that sets the window size of the new form.

<input name=”submit” type=”submit” onClick=”window.location.reload()” value=”Execute Command 22″ action=”window.open(‘response_time_actions.php’,’width=460,height=600,resizable=yes,status=yes’); return false” >

For some reason it only opens a normal sized window ?

Help!!

Cheers,

Kirky

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@rootMay 23.2007 — [COLOR="DimGray"]<input name="submit" type="submit" onClick="window.location.reload()" value="Execute Command 22" [/COLOR][B]action="window.open('response_time_actions.php','width=460,height=600,resizable=yes,status=yes'); return false"[/B] >

action is a property of the tag <form>

You have an onClick event that triggers a page reload.

try here: http://www.w3schools.com/html/html_forms.asp
Copy linkTweet thisAlerts:
@felgallMay 23.2007 — You have named the new window 'width=460,height=600,resizable=yes,status=yes' but not told it how big to make the window.
Copy linkTweet thisAlerts:
@smeezekittyMay 23.2007 — javascript.internet.com has a popup generator
Copy linkTweet thisAlerts:
@kirkyauthorMay 24.2007 — Ok I've sorted it so that it opens up a pop up window with the size I want but it's not sending the data from the textfields on the page?

<input name="submit" type="submit" value="Execute Command 22" onclick="window.open('response_time_actions.php','RESPONSETIME','width=460,height=600,resizable=yes,status=yes'); return false"

Any ideas?

Cheers Kirky
Copy linkTweet thisAlerts:
@Tweak4May 24.2007 — Make sure the button and text fields are contained within a form, and make sure your form's action points towards your target page, and that the method is set correctly. If that all checks out, post code from both the sending and receiving pages and we'll take a look...
Copy linkTweet thisAlerts:
@kirkyauthorMay 24.2007 — Ok this is the code that I have on the page

<form target="_blank" name="form1" method="get" action="response_time_actions.php">

<div align="center">

<p>&nbsp;</p>

<p><span class="rowColumnTitle style2">Description:</span><span class="style2"> This tool will bring up the current response time of the service that you enter and on which Unix box you enter. </span></p>

<p align="center">&nbsp;</p>
<font face="Verdana, Arial, Helvetica, sans-serif">
<table width="53%" border="1">
<tr>
<td width="170" height="41"><strong><font face="Verdana, Arial, Helvetica, sans-serif">Please Enter : </font></strong>
<tr >
<td align="center"><label>Unix Box
<input type="text" name="textfield">
</label></td>

<td><label>Service
<input type="text" name="textfield2">
</label>
<div align="center"></div></td>
</tr>
<tr>
<td align="center" colspan="1"><input name="button" type="button" onClick="window.location.reload()" value="Refresh This Page"></td>
<td colspan="2" align="center"><input name="submit" type="submit" onClick="window.location.reload()" value="Execute Command" action="/aahelp/oci8/response_time_actions.php" ></td>
</tr>
<td colspan="2" align="center"><input name="submit" type="submit" value="Execute Command 22" onclick="window.open('response_time_actions.php','RESPONSETIME','width=460,height=600,resizable=yes,status=yes'); return false" onSubmit=" " ></td>
</tr>

</table>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif"> </font>
<p>&nbsp;</p>

</div>

</form>[/QUOTE]
Copy linkTweet thisAlerts:
@kirkyauthorMay 25.2007 — Any ideas as to why its not sending the data from the textbox's to the next form?

Cheers,

Kirky
×

Success!

Help @kirky spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...