document.writeが含まれている古いコードがあります。
<script type="text/javascript" language="JavaScript1.2">
document.write('<form name="InvGenPayDonation" action="'+PostURL+'" onsubmit="return validateForm();" method="POST">');
</script>
アクションを、ページが読み込まれたときに決定されたjavascript変数に置き換えるにはどうすればよいですか?これが関数の一部ではないそのコードです。(私は名前を置き換えたので、substrインデックスは正しくありませんが、あなたがポイントを得ると確信しています。)
// Check where we came from so that we can go to the right spot when the
// form gets posted from outside of our HTML tree.
var PostURL = '/event.php';
if (window.location.href.substr(0, 21) == 'http://10.10.10.10:80')
PostURL = 'http://10.10.10.10:8580/event.php';
else if (window.location.href.substr(0, 14) == 'http://webapps')
PostURL = 'http://10.100.0.11:8580/event.php';
else if (window.location.href.substr(0, 7) == 'webapps')
PostURL = 'http://10.10.10.10:8580/event.php';
else if (window.location.href.substr(0, 10) == 'http://www')
PostURL = 'https://secure.french.toast.new_zeland.france/event.php';
PostURLをフォームのアクションに入れてほしい。document.writeなしでそれができれば、それは素晴らしいことです。助けが必要です。ありがとう。