Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:17:01+00:00 2026-06-11T19:17:01+00:00

Hi all creating a link that when you click it, it opens a new

  • 0

Hi all creating a link that when you click it, it opens a new window. I was wondering if it’s possible to restrict the size of the window opening?

this is the code I have for the link that opens the window

<?php echo $this->Html->link(
    $this->Html->image($help, array(
    "alt" => "eBox")),
    '/accounts/help', array('target'=>'_blank', 'escape'=>false)); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:17:02+00:00Added an answer on June 11, 2026 at 7:17 pm

    You can do this, but only with Javascript.

    Raw code would be something like:

    <a href="/pages/home" target="_blank" onClick="window.open('/pages/home', 'windowname','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=300,height=290'); return false;">Text Link</a>
    

    The only parameters you really need are width and height, but you might find the others useful too. If not, just delete them. If the user doesn’t have javascript, it’ll just open the link normally.

    To do it with html helper, pass your javascript through to the onClick array key:

    <?php echo $this->Html->link(
    $this->Html->image($help, array(
    "alt" => "eBox")),
    '/accounts/help', array(
        'target'=>'_blank',
        'escape'=>false,
        'onClick'=>"window.open('/pages/home', 'windowname','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=300,height=290'); return false;"
    )); ?>
    

    PS – you can read up on the window.open method here: http://www.w3schools.com/jsref/met_win_open.asp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a log system ('outside' the application) that logs all the click on
I am creating a page that a user can click a link and it
I am creating a series of UserControls that all have some similar business logic.
I'm creating a website for a client in which he wants a link that
Like all right-thinking people, I hate to click on a link and discover too
So I'm using jquerymobile for an app I'm creating. I have a link that
I'm new to JQuery and I'm creating a site where one can click on
I'm creating an XPages application that will display a view that lists all the
I'm creating a custom Google map that plots multiple markers. View the link as
I am currently creating a game that allows the user to click on numerous

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.