Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
var windowUrl = 'mypage.aspx?sId=' + sid + '&sname=' + sname + '&sdt=' + sdate;
          var uniqueName = new Date();
          var windowName = 'Print' + uniqueName.getTime();
          var printWindow = window.open(windowUrl, windowName, 'left=0,top=0,width=100,height=100');


it working in other browser but not working in chrome
Posted

1 solution

I guess Popups are blocked in Chrome for your App.

Allow Popup, it will show you the window. I tried at my end and it is working.


[Update]

After discussion with OP, here is what I suggested and it worked.

Then check how it is working in my Demo

[Issue] print window not opening in chrome but it is working in other browser[^]

I have provided values as...
var sid = 1;
var sname = "Renuka";
var sdate = "31/12/2013";

If you will see the code, then you can know.

Make sure there are no errors in Developer Tool's Console tab.
Next thing is make sure the values of sid, sname and sdate are coming properly.
If any of these values are missing or null or undefined, then it would not open any window.
 
Share this answer
 
v2
Comments
Renuka Ruke 31-Dec-13 6:08am    
I already allowed Popup.
Then check how it is working in my Demo

[Issue] print window not opening in chrome but it is working in other browser[^]

I have provided values as...

var sid = 1;
var sname = "Renuka";
var sdate = "31/12/2013";

If you will see the code, then you can know.

Make sure there are no errors in Developer Tool's Console tab.
Next thing is make sure the values of sid, sname and sdate are coming properly.
If any of these values are missing or null or undefined, then it would not open any window.
Renuka Ruke 3-Jan-14 0:51am    
thanks its working
Glad to hear that. :)

Please accept this answer, if it has helped you in any way.
This will help others to find the answer in one go and you will also be awarded with some points for this action...

Thanks,
Tadit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900