editLowerDiv.doc.form1.submit(this.form1) won't works as 'this' refers to
the current document (the main document)
try document.editLowerDiv.document.form1.submit()
Doug Melvin
----- Original Message -----
From: "Max Campsell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 03, 2001 12:27 PM
Subject: Re: [Dynapi-Help] Help on forms
Thanks for the hint,
I have tried;
editLowerDiv.doc.form1.submit(this.form1)
and
editLowerDiv.doc.form1.submit()
All with no result. The code that sets it up is as follows.
/* This is the layer that will be used to edit property details */
editLowerDiv = new DynLayer()
editLowerDiv.setSize(618,editTableHeight+30)
editLowerDiv.setBgColor('lightslategray')
editLowerDiv.moveTo(1,283)
editLowerDiv.setHTML(LoadPropertyTable())
this.document.addChild(editLowerDiv)
editLowerDiv.css.borderWidth="2px"
editLowerDiv.css.borderColor="#d4947f"
editLowerDiv.css.borderStyle="solid"
editLowerDiv.setVisible(false)
/* This is the HTML building function */
function LoadPropertyTable() {
var strTable = "";
var i;
var arrRowData;
var textWidth;
strTable = "<form method='post' enctype='multipart/form-data'
action='UploadPic.asp' id='form1' name='form1'>"
strTable += "<TABLE class='editTable' border='0' cellpadding='1'
cellspacing='1' width='615'>";
if(arrPropertyRecords.length <= 0) {
strTable += "<TR class='SelectText'><TD>No selections
available</FONT></TD></FONT></TR>";
}else{
for (i = 0; i < arrPropertyRecords.length-2; i++) {
arrRowData = arrPropertyRecords[i].split("�");
if(arrRowData[5] > 0) {
textWidth = arrRowData[5];
}else{
textWidth = "40";
}
strTable += "<TR class='SelectText'><TD width=300 HEIGHT=18
style='FONT-SIZE: 8pt; HEIGHT: 18px'>" + arrRowData[4] + "</TD>";
strTable += "<TD width=315 HEIGHT=18 style='FONT-SIZE: 8pt; HEIGHT: 18px'>"
strTable += "<INPUT id=txt" + (i+1) + " name=txt" + (i+1) + " value=''
size=" + textWidth + " style='FONT-SIZE: 8pt; HEIGHT: 18px'></TD></TR>";
}
strTable += "<TR class='SelectText'><TD HEIGHT=18 style='FONT-SIZE: 8pt;
HEIGHT: 18px'> Picture File:</TD>";
strTable += "<TD width=315 HEIGHT=18 style='FONT-SIZE: 8pt; HEIGHT: 18px'>"
strTable += "<INPUT TYPE=FILE SIZE=40 NAME='picture'></TD></TR>"
strTable += "<TR><TD><INPUT TYPE='SUBMIT' NAME='SUB1' VALUE='Upload
File'></TD></TR>";
strTable += "</TABLE></form>";
}
return strTable;
}
I am sure that I am missing something very basic, but as yet cannot identify
what.
Thanks again for your help
Max Campsell
----- Original Message -----
From: "Jordi 'IlMaestro' Ministral" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 6:20 AM
Subject: Re: [Dynapi-Help] Help on forms
> Once a form is writen inside a DynLayer, it doesn't live in the document
> object but in that layer's document object. Any javascript wanting to
> access the form should go
>
> holdinglayer.doc.formname.submit()
>
>
> Max Campsell wrote:
>
> > Hi, I am having a problem using forms and the DynAPI V2. I have
> > several layers, which contain tables used for data entry. I would like
> > one of these to be an<INPUT TYPE="SUBMIT" NAME="btnSubmit"
> > VALUE="Upload"> on a button click event using the DynAPI buttons. I
> > would like to use the submit() method of the form. The first line of
> > my, first layer is;<FORM method='post' enctype='multipart/form-data'
> > action='iploadcls.asp' id=form1 name=form1> The last line of the last
> > layer loaded is ;</FORM> All the layers repond as expected except that
> > when I try to for a form1.submit() event in my button click function,
> > I get nothing. Any help would be appreciated. Thanks Max Campsell
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help