Jonah,
Thanks a lot!!!

So far, it works perfectly as expected, the only thing I need to take care
now is the reSize event, I need to reload the page on reSize event. but
netscape has some BUGS on reSize event. Hopefully, I will get around it.

Regard,

Jack


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jonah
Sent: Sunday, July 22, 2001 8:13 PM
To: [EMAIL PROTECTED]
Subject: RE: [Dynapi-Help] Need some help with setHTML, need it badly :(
- :)


Sure. The code below will allow you to write to "layer1" in both ns and ie,
since
the layer will be absolutely positioned, even though its coordinates will be
derived from a relatively positioned layer.

<HTML>
<BODY>
<HEAD>
<SCRIPT language="JavaScript">

DynAPI.onLoad=function() {

        x= DynAPI.document.getAll()['theMark']
        xPos = x.getPageX()
        yPos = x.getPageY()

        layer1 = new DynLayer()
        layer1.moveTo(xPos,yPos)
        DynAPI.document.addChild(layer1)
        layer1.setHTML("Some text")
}

</SCRIPT>
<BODY>
some html on your page
<br><br>
now put a mark where you want your layer to go.
<span id="theMark" style="position:relative;"></span>
put some more html
</body>
</html>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jack Lin
Sent: Sunday, July 22, 2001 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] Need some help with setHTML, need it badly :(
- :)


Hi Jonah,
Thanks for your help. but I dont quite understant the workaround you
mention, is it possible that you can give me a sample. Thanks

Jack

----- Original Message -----
From: "Jonah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 22, 2001 4:45 PM
Subject: RE: [Dynapi-Help] Need some help with setHTML, need it badly :( -
:)


> Jack,
>
> I'm not positive, but I don't think setHTML() works in netscape 4 for
> relative layers, and
> I dont think theres anything you can do about it.  The workaround I've
used
> is to set empty
> marker <DIVs> on the page to get a relative page position, and then create
> an absolute layer
> at that position after the page loads.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jack Lin
> Sent: Sunday, July 22, 2001 7:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Help] Need some help with setHTML, need it badly :(
> - :)
>
>
> Hi, Michael,
>
> If you dont mind, can you let me see the web site you have.
>
> Thanks
>
> Jack
> ----- Original Message -----
> From: "Michael Pemberton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 22, 2001 7:39 AM
> Subject: Re: [Dynapi-Help] Need some help with setHTML, need it badly :( -
> :)
>
>
> > It all comes down to your code.  If it is not in the correct syntax,
this
> is
> > when NS4 starts to play up.  If you put a weird fuel in your car, you
> would
> > expect your car to do the same.
> >
> > NS4 is great for checking your code, if it doesn't work in NS4, then it
is
> most
> > likely becuase of some typpo in one of your tags or just that you've
left
> out a
> > closing tag somewhere.
> >
> > Go over your code with a fine tooth comb and if possible, try get hold
of
> an
> > editor that will do syntax highlighting.
> >
> > I know that NS4 works with mouse events in the fashion that your sre
> trying to
> > get working, I use them on my own site without problems.
> >
> > Jack Lin wrote:
> >
> > > Thanks Michael, I really appreciate your help.
> > > I tried the following code,
> > >
> > > <html>
> > > <head>
> > > <title>DynAPI Distribution: SetHTML Example</title>
> > >
> > > <script language="Javascript" src="../src/dynapi.js"></script>
> > > <script language="Javascript">
> > >         DynAPI.setLibraryPath('../src/lib/');
> > >         DynAPI.include('dynapi.api.*');
> > >         DynAPI.include('dynapi.ext.inline.js');
> > > </script>
> > > <script language="Javascript">
> > >      function changeText(param) {
> > >          DynAPI.document.all["textHere"].setHTML("<b>" + param +
"</b>")
> > >      }
> > >      function clearText () {
> > >         DynAPI.document.all["textHere"].setHTML("")
> > >      }
> > > </script>
> > > </head><body>
> > >
> > > <table width="100%" border="0" cellspacing="0" cellpadding="0">
> > >   <tr>
> > >     <td width="43%"><a href="javascript://"
> onMouseOver="changeText('Amy')"
> > > onMouseOut="clearText()"><img src="coco6.jpg" width="320" height="240"
> > > border=0></a></td>
> > >     <td width="57%">
> > >       <div id="textHere" style="position:relative; left:0px; top:0px;
> > > width:100; height:25px"></div>
> > >   </tr>
> > > </table>
> > > </body>
> > > </html>
> > >
> > > It works in IE5, and Netscape 6 as expected, but it doesnt work in
> Netscape
> > > 4
> > >
> > > I really hope some one can help me.
> > >
> > > Thanks in advance,
> > >
> > > Jack
> > >
> > > ----- Original Message -----
> > > From: "Michael Pemberton" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Saturday, July 21, 2001 7:44 PM
> > > Subject: Re: [Dynapi-Help] Need some help with setHTML, need it badly
> ( -
> > > :)
> > >
> > > > Sorry.  I should have given you a sample.  The <a> tag is the one
that
> you
> > > > need to use to trigger the mouse event.
> > > >
> > > > sample:
> > > >          <td><a href="#" onMouseOver="changeText('show different
> > > > text')"><img src="whatever.gif" border="0"></a></td>
> > > >
> > > > the "border=0" is to remove the blue (or whatever color links appear
> in)
> > > > border from arround the edge of the image.
> > > >
> > > > Also, I suggest using "javascript://" as the href to stop the page
> > > location
> > > > from possibly being effected by the mouse click.
> > > >
> > > > Matt Lam wrote:
> > > >
> > > > > Thanks Michael,
> > > > >
> > > > > Well, I tried that and it didnt work. Any idea?
> > > > > below is the new code:
> > > > > <script language=javascript>
> > > > >     function changeText(param) {
> > > > >
> > > > > DynAPI.document.all["textHere"].setHTML(param)
> > > > >     }
> > > > > </script>
> > > > >
> > > > > <table>
> > > > >     <tr>
> > > > >          <td><a href="#"><img src="whatever.gif"
> > > > > onMouseOver="changeText('show different
> > > > > text')"></a></td>
> > > > >          <td><div id="textHere"
> > > > > style="position:relative; left:0px; top:0px;
> > > > > width:100; height:25px"></div><td>
> > > > >     </tr>
> > > > > </table>
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > Jack
> > > > >
> > > > > --- Michael Pemberton <[EMAIL PROTECTED]> wrote:
> > > > > > The img object does not have any native mouse events
> > > > > > in NS4.  The best thing
> > > > > > to do is to wrap it in a <a href> tag and give you
> > > > > > will then be able to use
> > > > > > mouse events.
> > > > > >
> > > > > > Matt Lam wrote:
> > > > > >
> > > > > > > I just downloaded DynAPI 2.54 and read the
> > > > > > tutorial
> > > > > > > and document in the pages. I tried out a few
> > > > > > things
> > > > > > > and they worked fine. Later I came across a
> > > > > > problem
> > > > > > > now. I have a 1*2 table, what I want is that when
> > > > > > I
> > > > > > > mouseover an image in grid[1][1], I want the text
> > > > > > in
> > > > > > > grid[1][2] to change.
> > > > > > >
> > > > > > > <table>
> > > > > > >     <tr>
> > > > > > >         <td><img src="whatever.gif"
> > > > > > > onMouseOver="changeText('show different
> > > > > > text')"></td>
> > > > > > >         <td><div id="textHere"
> > > > > > > style="position:relative; left:0px; top:0px;
> > > > > > > width:100; height:25px"></div><td>
> > > > > > >     </tr>
> > > > > > > </table>
> > > > > > >
> > > > > > > In my javascript
> > > > > > > <script language=javascript>
> > > > > > >     function changeText(param) {
> > > > > > >
> > > > > > DynAPI.document.all["textHere"].setHTML(param)
> > > > > > >     }
> > > > > > > </script>
> > > > > > >
> > > > > > > It works fine in IE5, but It wont work in Netscape
> > > > > > 4.
> > > > > > > Any idea?
> > > > > > >
> > > > > > > Thanks in advance,
> > > > > > >
> > > > > > > Jack
> > > > > > >
> > > > > > > __________________________________________________
> > > > > > > Do You Yahoo!?
> > > > > > > Make international calls for as low as $.04/minute
> > > > > > with Yahoo! Messenger
> > > > > > > http://phonecard.yahoo.com/
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Dynapi-Help mailing list
> > > > > > > [EMAIL PROTECTED]
> > > > > > >
> > > > > >
> > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > > > >
> > > > > > --
> > > > > > Michael Pemberton
> > > > > > [EMAIL PROTECTED]
> > > > > > ICQ: 12107010
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Dynapi-Help mailing list
> > > > > > [EMAIL PROTECTED]
> > > > > >
> > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > > >
> > > > > __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> > > > > http://phonecard.yahoo.com/
> > > > >
> > > > > _______________________________________________
> > > > > Dynapi-Help mailing list
> > > > > [EMAIL PROTECTED]
> > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > >
> > > > --
> > > > Michael Pemberton
> > > > [EMAIL PROTECTED]
> > > > ICQ: 12107010
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Dynapi-Help mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > > _______________________________________________
> > > Dynapi-Help mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> >
> > --
> > Michael Pemberton
> > [EMAIL PROTECTED]
> > ICQ: 12107010
> >
> >
> >
> >
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> 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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to