You mean DynAPI will automatically handle resize event
even if I don't write any event handler myself?
what is the difference between using
DynAPI.addResizeFunction('document.location.reload(true)');
and
DynAPI.onResize = function() {
window.location.reload();
}
Anyway, I did find a way to get around the problem i
have in NS4.75, instead of creating DynLayer in onLoad
function, I just create it only when the user mouse
over, and delete it after the mouse out, and create
the DynLayer when mouse over again. I still don't know
what is causing the problem i had before though.
one more thing, what is the difference between
DynAPI.document.deleteChild(layer1)
and
DynAPI.document.removeChild(layer1)
Thanks a lot, guys.
Jack
--- Andrew Hull <[EMAIL PROTECTED]> wrote:
> you must be overwriting some of DynAPI's reload
> functionality. wouldnt
> this be safer?
>
DynAPI.addResizeFunction('document.location.reload(true)');
>
> Matt Lam wrote:
>
> >In fact, I did use
> >DynAPI.onResize = function() {
> > window.location.reload();
> > }
> >but that won't solve the problem either. It is
> working
> >fine in other browser except NS4.75
> >
> >I dont know what is going on.
> >
> >I really need some help :-(
> >
> >
> >
> >--- Jim Richards <[EMAIL PROTECTED]> wrote:
> >
> >>You can't use
> >>
> >> <body onresize="return something();">
> >>
> >>because that'll confuse DynAPI, I tend to force a
> >>reload of the page, as
> >>this works best across
> >>all browers
> >>
> >> DynAPI.onResize = function() {
> >> window.location.reload();
> >> }
> >>
> >>
> >>Matt Lam wrote:
> >>
> >>>Hi,
> >>>If I comment out the resize code, this problem
> will
> >>>
> >>go
> >>
> >>>away. But I have to detect the resize event so
> that
> >>>
> >>i
> >>
> >>>can move the dynlayer to the correct position in
> >>>
> >>the
> >>
> >>>browser. The problem is it doesn't matter where I
> >>>
> >>put
> >>
> >>>the onresize event handler, the problem will
> occur.
> >>><body onResize=""> no matter what code i put
> inside
> >>>that onResize="" the problem will happen, or if i
> >>>
> >>do
> >>
> >>>DynAPI.onResize = function () {
> >>> //doesn't matter what code is in here, the
> >>>problem will happen too
> >>>}
> >>>
> >>>my code is something like the following:
> >>>
> >>><HTML><HEAD><TITLE></TITLE>
> >>><Script language="Javascript">
> >>> DynAPI.setLibraryPath('/home/dynapi/src/lib/')
> >>> DynAPI.include('dynapi.api.*')
> >>> DynAPI.include('dynapi.event.*')
> >>> DynAPI.include('dynapi.ext.inline.js')
> >>></script>
> >>>
> >>></head>
> >>><body>
> >>>
> >>><script language="Javascript">
> >>> DynAPI.onLoad = function() {
> >>> x= DynAPI.document.getAll()['first']
> >>> xPos = x.getPageX()
> >>> yPos = x.getPageY()
> >>> layer1 = new DynLayer()
> >>> layer1.setSize(150, 16)
> >>> layer1.moveTo(xPos,yPos)
> >>> DynAPI.document.addChild(layer1)
> >>> layer2 = new DynLayer()
> >>> layer2.setSize(150, 16)
> >>> layer2.moveTo(xPos, yPos+16)
> >>> DynAPI.document.addChild(layer2)
> >>> }
> >>></script>
> >>>
> >>>
> >>><table align="center">
> >>> <tr>
> >>> <td valign=bottom>
> >>> <div id="first"
> style="position:relative;
> >>>left:0px; top:4px; width:125px;
> height:16px"></div>
> >>> </td>
> >>> </tr>
> >>></table>
> >>></body>
> >>></html>
> >>>Can anyone help plz.
> >>>
> >>>Thanks in advance!
> >>>
> >>>
> >>>--- Matt Lam <[EMAIL PROTECTED]> wrote:
> >>>
> >>>>In the page I have, there are only two
> DynLayers,
> >>>>and
> >>>>there are almost identical. There is no other
> >>>>
> >>DHTML
> >>
> >>>>stuff like DynImage or widget in the page.
> >>>>I tried many different ways to do it and that
> >>>>problem
> >>>>still comes up. Even if I just simply reload the
> >>>>page
> >>>>everytime the page is refreshed, that still
> can't
> >>>>solve the problem. It is working with other NS
> >>>>
> >>like
> >>
> >>>>NS4.08.
> >>>>BTW, the browser I am taking about is NS4.75.
> >>>>I will try the different ideas Richard mention
> >>>>again.
> >>>>
> >>>>Thanks a lot, Richard.
> >>>>
> >>>>Jack
> >>>>
> >>>>--- Richard Bennett <[EMAIL PROTECTED]>
> wrote:
> >>>>
> >>>>>Firstly, does the error also occur if you
> comment
> >>>>>out the resize code? - if
> >>>>>so it's probably because you have a Dynimage ,
> or
> >>>>>
> >>>>a
> >>>>
> >>>>>widget using one, on the
> >>>>>page.
> >>>>>NS4 has a bug when resizing the page, and to
> >>>>>
> >>>>counter
> >>>>
> >>>>>this DynAPI deletes,
> >>>>>and re-writes all the content to the screen
> when
> >>>>>
> >>>>you
> >>>>
> >>>>>resize the browser.
> >>>>>DynImages do however still cause an error.
> >>>>>
> >>>>>If the error stops when you comment out your
> >>>>>
> >>>>resize
> >>>>
> >>>>>code, you could try
> >>>>>delaying the resize-code using a setTimeout, so
> >>>>>
> >>>>the
> >>>>
> >>>>>layers are only moved
> >>>>>after the browser has had time to re-render
> them.
> >>>>>
> >>>>>If all else fails, simply make NS4 reload the
> >>>>>
> >>page
> >>
> >>>>>on-resize.
> >>>>>
> >>>>>Check the FAQ for more info.
> >>>>>
>
>>http://dynapi.sourceforge.net/doccenter/index.php?TroubleShooting
> >>
> >>>>>Richard
> >>>>>www.richardinfo.com
> >>>>>
> >>>>>
> >>>>>----- Original Message -----
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help