Title: RE: [Dynapi-Help] RE: [Dynapi-Help] Re: [Dynapi-Help] RE: �Dynapi-Help� NS-problems with writing text to a form

Can you post a full example and what version of dynapi are you using? If I use the scrollpane in dynapi 2.54, then I cannot type in any form fields that are embedded in a layer in Netscape.  The layer can be a non dynapi generated layer too.  Here is my example that doesn't work in NS 4.77. 

<html>
<head>
<title>DynAPI Distribution: LoadPanel Example</title>
<script language="Javascript" src=""../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.*')
DynAPI.include('dynapi.util.thread.js');
DynAPI.include('dynapi.util.pathanim.js');
DynAPI.include('dynapi.gui.button.js');
DynAPI.include('dynapi.gui.scrollbar.js');
DynAPI.include('dynapi.gui.viewport.js');
DynAPI.include('dynapi.gui.scrollpane.js');
DynAPI.include('dynapi.gui.dynimage.js');
DynAPI.include('dynapi.gui.label.js');
DynAPI.include('dynapi.gui.loadpanel.js');
</script>

<script language="JavaScript">
DynAPI. {
//MetalScrollPaneURL =
//DynAPI.librarypath+"/dynapi/images/scrollpane/"

lp = new LoadPanel();
lp.setSize(200,300); // height will be overwritten by default
//lp.moveTo(200,200);

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

scrollobj = new ScrollPane(lp)  // lp will be set as the content
//scrollobj = new ScrollPane()
scrollobj.setSize(200,200)
scrollobj.moveTo(250,100)
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("test3.htm");
//lp.moveTo(10,10);
}
</script>
<script language="javascript">
function submitForm()
{

//      alert('test');
        lp.doc.mainForm.submit();
}
</script>
</head>
<body bgcolor="#ffffff">


<p><a href=""javascript:0;" Form in ScrollPane</a>


<div id="myInlineLayer">
  <form ACTION="http://www.codeave.com/asp/formtest.asp" METHOD="POST" name="myInlineLayerForm">
    <input type="text" name="test1" size="10" maxlength="10">
  </form>
</div>


</body>
</html>


If I comment out the lines for the scrollpane, then I can type in the input field in myInlineLayerForm.  When those lines are included, I cannot type in the input text field or the form in the scrollpane. 

Thanks,
Kent

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 1:56 AM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] RE: [Dynapi-Help] Re: [Dynapi-Help] RE:
�Dynapi-Help� NS-problems with writing text to a form


link seems to work.. anyway..
I needed a form widget and tried to compose one.. (btw. afroapi has a form
widget).
I came up something like this..

1. create inline layer
  <div id="myInlineLayer">
    <form action="" name="myInlineLayerForm">
      <input type="text" name="" size="1" maxlength="1">
    </form>
  </div>

2. try to restore "focus" eg. this worked for me:

  //create reference to inline layer containing form
  var inputLayer = DynAPI.document.all[myInlineLayer];

  //now manipulate <div> some how to wake up input in ns
  inputLayer.moveTo(100,100);

thats it. tested on ns4.77&winnt4.0.


-----Original Message-----
From: Kasper Schnell [mailto:[EMAIL PROTECTED]]
Sent: 25. hein�kuuta 2001 9:38
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] Re: [Dynapi-Help] RE: �Dynapi-Help� NS-problems
with writing text to a form


Yes, I know the code is a bit tricky due to all the PHP-code and stuff, but
the purpose of the attached code was mainly to give you an idea of what it
was used for. :)
Thanks for the link, but unfortunately it doesn't seem to work. Can you in
few words describe the solution???? :)
Kas
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 8:18 AM
Subject: [Dynapi-Help] RE: �Dynapi-Help� NS-problems with writing text to a
form


I had same problem. This is one solution:
http://www.mail-archive.com/dynapi-help%40lists.sourceforge.net/msg03755.htm
l.

btw. your code is lil bit hard to read.. (hint:)

-----Original Message-----
From: Kasper Schnell [mailto:[EMAIL PROTECTED]]
Sent: 24. hein�kuuta 2001 15:49
To: [EMAIL PROTECTED]
Subject: �Dynapi-Help� NS-problems with writing text to a form


Hello everybody.
I have a small problem with NS.
I have made a draggable layer which contains a form where you kan enter text
into. The problem is, that it is not possible to write in the form, even
though the layer is in focus. Why is that???
It works perfect in IE

My setHTML for the layer looks like this:

 var myHTML = '<table width=188 cellspacing=0 cellpadding=0 border=0><tr><td
colspan=3><img src='+ cSrc + 'top.gif width=188 height=18 border=0></td><td
rowspan=3 valign=top width=10><img src="/skin/<?php" echo $skinPath;
?>/blank.gif height=6 width=10><br><a href=""javascript:deleteObject(\''" + id
+  '\');"><img src="/gfx/skin/<?php" echo $skinPath; ?>/handle_delete.gif
height=10 width=10 border=0></td></tr><tr><td><img src='+ cSrc + 'left.gif
width=24 height=61 border=0></a></td><td width=106 bgcolor=ffffff
valign=top><table width=115 cellspacing=0 cellpadding=0 border=0><tr><td
rowspan=3><form name="input_' + id + '"><textarea name=content
class="createTextInput" wrap="virtual" cols=7 rows=3
print
$strComposeCreate_front['speechbubble message']; ?></textarea></td><td
bgcolor=#FFFFFF><input type="radio" class=radiobutton name="font"
value="font1" CHECKED></td></tr><tr><td bgcolor=#FFFFFF><input type="radio"
name="font" value="font2" class=radiobutton></td></tr><tr><td
bgcolor=#FFFFFF><input type="radio" name="font" value="font3"
class=radiobutton></td></tr></form></td></tr></table><td background=""'+" cSrc
+ 'right.gif" width="49" height="61"><img
src=""../fontTeaser.gif?n=1&type=front"><br><img
src=""../fontTeaser.gif?n=2&type=front"><br><img
src=""../fontTeaser.gif?n=3&type=front"></td></tr><tr><td" colspan=3><img
src='+ cSrc + 'bottom.gif width=188 height=21 border=0></td></tr></table>'


Cheers
Kas

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




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

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

Reply via email to