open a action in Pop up window

I have a link that works fyn but i want it to open up in a pop up window rather than in new tab.

 echo $this->Html->link($book['Book']['serial_num'], array('controller' => 'books', 'action' => 'view', $book['Book']['id']), array('title' => 'View Book details of '.$book['Book']['serial_num']));

Any help. Thanks In Advance.
RaktttAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Try
echo $this->Html->link($book['Book']['serial_num'], array('controller' => 'books', 'action' => 'view', $book['Book']['id']), array('title' => 'View Book details of '.$book['Book']['serial_num'],'target'=>'_blank'));

Open in new window

0
RaktttAuthor Commented:
@GaryC123: Thanks for the help.
But it doesn't solve my problem. It open up in new tab as before, I want action to open in a new pop up window.
0
GaryCommented:
Sorry misread the question.
echo $this->Html->link($book['Book']['serial_num'],
array('controller' => 'books', 'action' => 'view',
		$book['Book']['id']),
		array(
		'title' => 'View Book details of '.$book['Book']['serial_num'],
		'onclick' => "var openWin = window.open('".$this->Html->link($book['Book']['serial_num'].'"','_blank')
	)
))
);

Open in new window


Just double check my syntax, and you haven't mentioned if you need additional attributes set.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

RaktttAuthor Commented:
@GaryC123: It still doesn't open up a pop up. It opens the action in same window and same tab.
Earlier it opens up in same window but new tab.
0
GaryCommented:
Getting late...try this
echo $this->Html->link($book['Book']['serial_num'],
array('controller' => 'books', 'action' => 'view',
		$book['Book']['id']),
		array(
		'title' => 'View Book details of '.$book['Book']['serial_num'],
		'onclick' => "var openWin = window.open('".$this->Html->link($book['Book']['serial_num']."','_blank');return false;"
);

Open in new window

If it doesn't work can you post the rendered HTML.

Note: you cannot force a popup if it is set to open in a new tab by user preferences.
0
RaktttAuthor Commented:
@Garyc123: it gives me syntax error.
0
GaryCommented:
echo $this->Html->link($book['Book']['serial_num'],
array('controller' => 'books', 'action' => 'view',
		$book['Book']['id']),
		array(
		'title' => 'View Book details of '.$book['Book']['serial_num'],
		'onclick' => "var openWin = window.open(this.href,'_blank');return false;")
);

Open in new window


I have to go now, if it's still not working just check the syntax
0
RaktttAuthor Commented:
@GaryC: This thing doesn't open a pop up window yet.
0
GaryCommented:
Can you paste the actual html from the webpage source
0
RaktttAuthor Commented:
have got it using Mootools window.
In view:
 echo $this->Html->link($book['Book']['serial_num'],'#', array('onclick' => "MUI.viewDetailWindow(".$book['Book']['id'].");", 'escape' => false));

<script type="text/javascript">
MUI.viewDetailWindow = function(argID, argName){
            MUI.opsAddWindow({
                    'winID'            : 'viewDetail',
                    'title'            : 'Related Book Details',
                    'width'            : 1200,
                    'height'           : 500,
                    'url'              : '<?php echo $this->Html->url(array('controller' => 'books', 'action' => 'view'))?>' + '/' + argID,
                    'formName'         : 'ViewDetailAddForm',
                    'validateForm'     : true        // This will validate form after content loaded, use isvalidate and isajax flag attribute
                });

        }
</script>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RaktttAuthor Commented:
It was as easy as 1 2 3.. n done
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AJAX

From novice to tech pro — start learning today.