o = document.getElementById('callback_form'); o.setAttribute("action","handler1_bel.php"); 

Works everywhere except IE

How to write something to work in all browsers?

  • what version of IE? How determined that does not work? - Grundy
  • Version 11.0.9600 - Vlad Pazdnikov
  • @ VladPazdnikov like that at once, otherwise I’ve started to remember my knowledge of necromancy) - Duck Learns to Hide
  • 2
    as determined that does not work ??? - Grundy
  • Launched in different browsers and pressed f12)) - Vlad Pazdnikov

2 answers 2

 o.action = "handler1_bel.php"; 
  • I tried it! Does not work! - Vlad Pazdnikov

It is necessary to write like this:

 document.callback_form.setAttribute("action","handler1_bel.php"); 

where callback_form is name .

  • one
    document.callback_form almost indistinguishable from document.getElementById('callback_form') with the exception of what may be missing. - Grundy