yeah,, I missed </td>, but It is still doesnt work in NS4 after I put it in.
and I tried using <layer> and tested it in NS4 and it works fine, but layer
is for absolute positioning only, if I used Ilayer, then it would not work
again.
Here is a summary of what I have tried:
<td><div id="textHere" style="position:relative; left:0px;
top:0px"></div></td>
This one works in IE, for relative positioning. (I guess I will work for
absolutet positioning too, but what I want is relative positioning.)
<td><layer id="textHere" style="position:relative; left:0px;
top:0px"></layer></td>
This one works in NS4, but only for absolute positioning, (damn,, I hate
this, all I want now is to get relative positioning to work in NS4)
<td><layer id="textHere" style="position:relative; left:0px; top:0px;"><div
id="textHere" style="position:relative; left:0px;
top:0px;"></div></layer></td>
This one works in IE and NS4, with just one line of code, but it will
not work for relative positioning in NS4.
<td><ilayer id="textHere" style="position:absolute; left:0px;
top:0px"></ilayer></td>
This one doesn't work anywhere!!!
I am thinking of what I need to do now:
1. Create a DynLayer of desired size in onLoad function.
2. Calculate the positions depending on the size of the browser window.
3. Move the DynLayer to that position.
4. Add an onResize even listener to move the layer to the proper position
when the user resize the window.
GOD!!!! I wish there is an easier way to do it!
Again, below is my problem, if anyone knows how to do it, please let me
know. Thanks
when mouseOver an image (inside a grid of a table), the text in another grid
of the table will change(the layer containing the text need to be relatively
positioned).
I could get it to work in IE and NS6 now, but I could not get it to work in
NS4.
Thanks in advance,
Jack
----- Original Message -----
From: "Robert Rainwater" <[EMAIL PROTECTED]>
To: "Jack Lin" <[EMAIL PROTECTED]>
Sent: Sunday, July 22, 2001 7:20 AM
Subject: Re[2]: [Dynapi-Help] Need some help with setHTML, need it badly
( - :)
>
> You are missing a </td> after the div. Plus, I don't believe you can
> use divs inside of tables in NS 4.
>
> --
> Robert Rainwater
>
>
> On 7/22/2001, 3:57:51 AM EST, Jack wrote about "[Dynapi-Help] Need some
help with setHTML, need it badly :( - :)":
>
>
> JL> Thanks Michael, I really appreciate your help.
> JL> I tried the following code,
>
> JL> <html>
> JL> <head>
> JL> <title>DynAPI Distribution: SetHTML Example</title>
>
> JL> <script language="Javascript" src="../src/dynapi.js"></script>
> JL> <script language="Javascript">
> JL> DynAPI.setLibraryPath('../src/lib/');
> JL> DynAPI.include('dynapi.api.*');
> JL> DynAPI.include('dynapi.ext.inline.js');
> JL> </script>
> JL> <script language="Javascript">
> JL> function changeText(param) {
> JL> DynAPI.document.all["textHere"].setHTML("<b>" + param +
"</b>")
> JL> }
> JL> function clearText () {
> JL> DynAPI.document.all["textHere"].setHTML("")
> JL> }
> JL> </script>
> JL> </head><body>
>
> JL> <table width="100%" border="0" cellspacing="0" cellpadding="0">
> JL> <tr>
> JL> <td width="43%"><a href="javascript://"
onMouseOver="changeText('Amy')"
> JL> onMouseOut="clearText()"><img src="coco6.jpg" width="320" height="240"
> border=0>></a></td>
> JL> <td width="57%">
> JL> <div id="textHere" style="position:relative; left:0px; top:0px;
> JL> width:100; height:25px"></div>
> JL> </tr>
> JL> </table>
> JL> </body>
> JL> </html>
>
> JL> It works in IE5, and Netscape 6 as expected, but it doesnt work in
Netscape
> JL> 4
>
> JL> I really hope some one can help me.
>
> JL> Thanks in advance,
>
> JL> Jack
>
> JL> ----- Original Message -----
> JL> From: "Michael Pemberton" <[EMAIL PROTECTED]>
> JL> To: <[EMAIL PROTECTED]>
> JL> Sent: Saturday, July 21, 2001 7:44 PM
> JL> Subject: Re: [Dynapi-Help] Need some help with setHTML, need it badly
:( -
> JL> :)
>
>
> >> 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
> JL> 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
>
>
> JL> _________________________________________________________
> JL> Do You Yahoo!?
> JL> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> JL> _______________________________________________
> JL> Dynapi-Help mailing list
> JL> [EMAIL PROTECTED]
> JL> 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