Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

PHP script is not executing JavaScript code correctly in firefox

  • 1 risposta
  • 2 hanno questo problema
  • 10 visualizzazioni
  • Ultima risposta di 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

Tutte le risposte (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