Marcelo a écrit :
Thanks for the info, so It can't be do it? ( with php or asp ala
"robot form filler" ), can be do it with a win 32 app?
Basically I need something that hide some fields of a webpage and show
partially in other site.
field1 field2 field3
â–¼
page1(form in javascript)
it is what I don't understand : why a form in JS if you use php ?
â–¼
site1
â–¼
site2 ("masked site")
â–¼
page1
â–¼
field1 field2
â–¼
USER ( only see 2 fields )
Thanks
MARCELO
[ = PHP = ] _______________
To non display a fild already filled up :
(it will be write in html code and will be submit with others fields in
same form)
<input type="text" name="field1"
<? if(isSet $field1) echo "style=\"display:none\""; ?>
value="<? echo $field1 ?>" >
or to do not write it if previously filled up
<? if(!isSet $field1) { ?>
<input type="text" name="field1">
<? } ?>
same with a combo box
<select name="combo1">
<? if($combo1 != 'apple')
echo "<option value=\"apple\">Apple</option>\n";
?>
[ = JS = ] ______________________
(not a good idea) (suppose you are in php)
Will virtally only write empty fields
<?
/* php to set/get php _POST variables */
?>
<html>
<script type="text/javascript">
var fld = new Array();
fld[1] = '<? echo $field1 ?>';
fld[2] = '<? echo $field2 ?>';
function setFields() {
var txt = '';
var ok = false;
for(var i=0;i<fld.length;i++)
if(fld
!= '') {
txt += '<input type="text" name="field'+(+1+i)+'">
ok = true;
}
if(ok) txt += '<input type="submit" value="pronto">';
document.write(txt);
}
</script>
<form name="form1" action="myPhp.php" method="post">
<script type="text/javascript">
setFields();
</script>
</form>
</html>