View Full Version : execute a link

07-16-2012, 04:42 AM
following link opens up a videobox and plays a video

<a href="<?php echo $rows['image1'] ; ?> " rel="vidbox" title="<?php echo $rows['name']."<br>".nl2br($rows['detail']) ; ?>" id="m2"><?php echo $rows['name'] ; ?></a>

Can i execute this link using javascript

This link can be formed from of the video record id
and i want to use javascript to execute the link

this will help me to hide the video file name.

Please help

07-16-2012, 07:12 AM
The easiest way is to us:

window.location.href = document.getElementById('m2').href;