originally posted by jeff_borden it keeps returning a javascript error
Dare I ask you to post the issue, then, to a Javascript forum? 😉 JS is so much harder to debug, as its error messages tend to be quite a bit more cryptic than PHP's.....
What's the JS error? And what really is this PHP function doing? When you tell the browser to do this Javascript operation, you are telling it to open the browser/OS's print dialog, assuming of course that it has one. Is that really what needs done at this point?
Let me tell you why I ask. This PHP function appears to do some logic, some variable assignment, etc. However, since there is no return statement, the only thing I see it doing in practice is outputting HTML/JS to the browser...
I daresay there are more issues here to deal with...of course, I have been wrong before....