DynAPI.addResizeFunction('document.location.reload(true)');
Matt Lam wrote:
[EMAIL PROTECTED]">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 willgoaway. But I have to detect the resize event so thatican move the dynlayer to the correct position inthebrowser. The problem is it doesn't matter where Iputthe onresize event handler, the problem will occur.
<body onResize=""> no matter what code i put inside
that onResize="" the problem will happen, or if idoDynAPI.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. {
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>
< br><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 otherDHTMLstuff 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 NSlikeNS4.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 , orawidget using one, on the
page.
NS4 has a bug when resizing the page, and tocounterthis DynAPI deletes,
and re-writes all the content to the screen whenyouresize the browser.
DynImages do however still cause an error.
If the error stops when you comment out yourresizecode, you could try
delaying the resize-code using a setTimeout, sothelayers are only moved
after the browser has had time to re-render them.
If all else fails, simply make NS4 reload thepageon-resize.
Check the FAQ for more info.http://dynapi.sourceforge.net/doccenter/index.php?TroubleShootingRichard
www.richardinfo.com
----- Original Message -----
From: "Song Lin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 8:53 PM
Subject: [Dynapi-Help] Problem with Resize on
Netscape message "Alert, did
not find converter or decoder"Hi, all
I create an inline layer relative to a <td>,whenthe user resize thebrowser, I need to move the layer to a correctposition, something likelayer1.moveTo(DynAPI.document.getWidth()-100,30).I put those statements
inthe DynAPI.onResize function. It is workinggreatwith IE, but I couldn'tget it to work on Netscape, everytime I resizethat page on Netscape 4.*,
itgive me a message "Alert, did not find converteror decoder" and the pagestops loading.
Anyone had this problem before? Or Anyone knowshow to solve it?Thanks in advance.
Jack=== 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
--
ANDREW HULL |
software engineer
Nine Dots
416-977-6660 ext.231
Portland . Irvine . San Francisco . Toronto
[EMAIL PROTECTED]
