为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

PHP script is not executing JavaScript code correctly in firefox

  • 1 个回答
  • 2 人有此问题
  • 10 次查看
  • 最后回复者为 Michal Stanke

more options

Hello

I have a php script that should do the following echo '<script type="text/javascript">', 'cart.add("54");', '</script>'; echo '<script type="text/javascript">','location.href = "http://mysite.com/index.php?route=checkout/checkout";','</script>';

now the php page works fine in every browser and it used to work fine in previous firefox browsers. however i noticed that with the last two updates with the page is not working fine. it seems that firefox skip the execution of cart.add(54) or it does not wait till it finished and then it goes on redirecting.

i dont know why with the recent updates this code stopped working ! any suggestions would be appreciated

Hello I have a php script that should do the following echo '<script type="text/javascript">', 'cart.add("54");', '</script>'; echo '<script type="text/javascript">','location.href = "http://mysite.com/index.php?route=checkout/checkout";','</script>'; now the php page works fine in every browser and it used to work fine in previous firefox browsers. however i noticed that with the last two updates with the page is not working fine. it seems that firefox skip the execution of cart.add(54) or it does not wait till it finished and then it goes on redirecting. i dont know why with the recent updates this code stopped working ! any suggestions would be appreciated

所有回复 (1)

more options

Hello ehab92.

The PHP script is being run on the webserver (mostly independent on the browser) to generate the HTML output. This HTML output can contain JavaScript and is what is rendered and eventually executed in the browser.

I am not a good PHP developer, so can you please paste here a link on this example page, or add here the HTML output, which does not work in Firefox as expected?

Michal