php new window popup

Posted on 2010-01-06
Medium Priority
Last Modified: 2012-05-08
must open in a new popup window

echo '<input type="submit" name "click" value="click" location"www.website.com">';
Question by:rgb192
LVL 82

Accepted Solution

hielo earned 1000 total points
ID: 26195808
echo '<input type="submit" name "click" value="click" onclick=\'window.open("http://www.website.com")\'>';
LVL 11

Assisted Solution

VanHackman earned 1000 total points
ID: 26196029

Use the function:

Insert this function in your page:

<script type="text/javascript">

var newwindow;

function popup(url)
      newwindow=window.open(url,'My PopPup','height=400,width=200');
      if (window.focus) {newwindow.focus()}


And in your submit button:

'<input type="submit" name "click" value="click" onclick=\'popup("page.html")\'>';

Author Closing Comment

ID: 31673785

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question