V
VitaminB
Hi Guys,
I want to change a attribute of an HTML page via JavaScript during its
initial load. The value for the attribute is requested by an HTTP
Request. Unfortenately, the Element is not changed after/during the
page loaded. The value is founded by the HTTP request but not assigned
to the attribute "value" of the element "input" with "name=userid" ...
Anybody who can helps me? I am pleased for any help...
<body>
<?php include("header.inc.php"); ?>
<?php include("menu_top.inc.php"); ?>
<?php include("shadow.inc.php"); ?>
<?php include("menu.inc.php"); ?>
<script language="JavaScript" type="text/javascript">
<!--
HttpRequest=null
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
HttpRequest=new XMLHttpRequest()
}
// code for IE
else if (window.ActiveXObject)
{
HttpRequest=new ActiveXObject("Microsoft.XMLHTTP")
}
if (HttpRequest!=null)
{
HttpRequest.onreadystatechange = changeUserID;
HttpRequest.open('GET', '/tinc?key=NN7R2ZgI&formname=Bestellung',
true);
HttpRequest.send(null);
}
else
{
alert("Your browser does not support XMLHTTP.")
}
function changeUserID() {
if (HttpRequest.readyState == 4) {
alert(HttpRequest.responseText);
var doc = HttpRequest.responseText;
var pos = doc.search(/userid/);
//alert(pos)
var Extrakt = doc.slice(pos+14,pos+36);
alert(Extrakt);
document.getElementsByName('userid')[0].value =
Extrakt;
}
}
// -->
</script>
<div id="content">
<FORM class=body accept-charset=UTF-8
action=http://www.christo-zigarre.de/tinc
method=post encType=multipart/form-data><INPUT type=hidden
value=KhLM5GD0
name=key></INPUT><INPUT type=hidden value=Bestellung
name=formname></INPUT>
<INPUT type=hidden value=1158799889;3169;240 name=userid></INPUT>
.....
I want to change a attribute of an HTML page via JavaScript during its
initial load. The value for the attribute is requested by an HTTP
Request. Unfortenately, the Element is not changed after/during the
page loaded. The value is founded by the HTTP request but not assigned
to the attribute "value" of the element "input" with "name=userid" ...
Anybody who can helps me? I am pleased for any help...
<body>
<?php include("header.inc.php"); ?>
<?php include("menu_top.inc.php"); ?>
<?php include("shadow.inc.php"); ?>
<?php include("menu.inc.php"); ?>
<script language="JavaScript" type="text/javascript">
<!--
HttpRequest=null
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
HttpRequest=new XMLHttpRequest()
}
// code for IE
else if (window.ActiveXObject)
{
HttpRequest=new ActiveXObject("Microsoft.XMLHTTP")
}
if (HttpRequest!=null)
{
HttpRequest.onreadystatechange = changeUserID;
HttpRequest.open('GET', '/tinc?key=NN7R2ZgI&formname=Bestellung',
true);
HttpRequest.send(null);
}
else
{
alert("Your browser does not support XMLHTTP.")
}
function changeUserID() {
if (HttpRequest.readyState == 4) {
alert(HttpRequest.responseText);
var doc = HttpRequest.responseText;
var pos = doc.search(/userid/);
//alert(pos)
var Extrakt = doc.slice(pos+14,pos+36);
alert(Extrakt);
document.getElementsByName('userid')[0].value =
Extrakt;
}
}
// -->
</script>
<div id="content">
<FORM class=body accept-charset=UTF-8
action=http://www.christo-zigarre.de/tinc
method=post encType=multipart/form-data><INPUT type=hidden
value=KhLM5GD0
name=key></INPUT><INPUT type=hidden value=Bestellung
name=formname></INPUT>
<INPUT type=hidden value=1158799889;3169;240 name=userid></INPUT>
.....