Hi all,

This DynAPI still amazes people I show this to!  There is a little problem
that we have been encountering with the forms... this is sort of related to
the post "Help of Forms" but it adds another layer of complexity I believe
and I guess knowing if it can be done will probably help us figure out
whether it's worth it to keep going along our path...

When using the loadpanel.js to load another page into a scroll pane (for
example).... how do you call the <form> inside this "external file"... The
idea is to have a button on the calling page to submit the form inside the
scroll pane....

===================
scrollpane.htm

<html>
<head>
...
<script language="JavaScript">
DynAPI.onLoad = function() {
        MetalScrollPaneURL = DynAPI.librarypath+"/dynapi/images/scrollpane/"

        lp = new LoadPanel();
        lp.setSize(350,250); // height will be overwritten by default
        lp.moveTo(10,10);

        counter = 0;
        var el = new EventListener()
        el.onload = function(e) {
                status = 'got load event '+ counter++;
        }
        lp.addEventListener(el)

        scrollobj = new ScrollPane(lp)  // lp will be set as the content
        scrollobj.setSize(350,250)
        scrollobj.moveTo(250,50)
        scrollobj.setBgColor('#c0c0c0')

        DynAPI.document.addChild(scrollobj)

        // set the URL for the lp after the main scroll object is added to the
document
        lp.setURL("form.htm");
}
</script>
</head>
<body>
<form name="scrollform">
<!---------------- BUTTON TO SUBMIT FORM INSIDE
LOADPANEL ------------------>
<input type="button" onClick="lp.doc.form1.submit()">
</form>
<body>
</html>

==================
form.htm

<form name="form1" action="blah.htm" method="post">
Field 1: <input type="text" name="field1" value="Field1Value">
Field 2: <input type="text" name="field1" value="Field2Value">
</form>

==================

Questions:
1.  Is this possible?
2.  Is it the same as using frames or something?
3.  Does the "button" element after the comment "BUTTON TO SUBMIT...." look
right?

==================

Thanks,
Chris


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help

Reply via email to