0

I have link which will open new page by ID, now I would like it to open in new window (not tab) and it wont work can you help?

<?php echo "<a href='ureditev_v_formo_test.php?ID=" . $row1['ID'] . "' onclick='javascript:window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=200,height=500')return false;'>" . $row1['ImePriimek'] . "</a>"; ?>

2 Answers 2

1

try this,

echo "<a href='ureditev_v_formo_test.php?ID='".$row1['ID']."' onclick=\"javascript:window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=200,height=500');return false;\">" . $row1['ImePriimek'] . "</a>";
Sign up to request clarification or add additional context in comments.

3 Comments

This works it open new window, but full size how to make it smaller like in the code with width and height?
It works, but I have noticed just now that in new window doesn't open data anymore, I have this for editing person's data and it should open with new window now it doesn't?
@perofurid check the url, open it new window and then try to debug your script.
0
window.open(''+self.location,'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');

hope this help you

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.