I guess this could be a PHP problem or a Javascript problem, depending on what I’m doing wrong but here it goes:
<script language=”javascript” type=”text/javascript”>
window.top.window.stopUpload(<?php echo $errors;?>, <?php echo $newname;?>);
</script>
For some reason I can’t pass the newname. Passing $errors (which is an integer) works fine. But passing $newname (which is a string) does not.
I even tried hard-coding it to:
[code=php]
window.top.window.stopUpload(<?php echo $errors;?>, <?php echo ‘123456.jpg’;?>);
with no results. However,
[code=php]
window.top.window.stopUpload(<?php echo $errors;?>, ‘123456.jpg’>);
does work. Which is nice, but I need to use php because it’s a variable, not a hard-coded image every time. And by the others not working, I mean literally the value doesn’t get passed.