Quantcast

[ htmlunit-Bugs-1185806 ] frame content should be loaded first when </frameset> found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ htmlunit-Bugs-1185806 ] frame content should be loaded first when </frameset> found

SourceForge.net
Bugs item #1185806, was opened at 2005-04-19 12:10
Message generated for change (Comment added) made by mguillem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1185806&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: BhupeshReddy (bhupeshreddy)
>Assigned to: Marc Guillemot (mguillem)
Summary: frame content should be loaded first when </frameset> found

Initial Comment:
The onLoad event on my page calls the hideLeftnav()
javascript function.

I am getting the following exception.
======= EXCEPTION START ========
EcmaError: lineNumber=[148] column=[0] lineSource=
[null] name=[TypeError] sourceName=
[/zpm/jscripts/navbar.js] message=[TypeError: Cannot
set property "cols" of null to "0,*"
(/zpm/jscripts/navbar.js#148)]
com.gargoylesoftware.htmlunit.ScriptException:
TypeError: Cannot set property "cols" of null to "0,*"
(/zpm/jscripts/navbar.js#148)
        at
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngin
e.callFunction(JavaScriptEngine.java:344)


Apparantly the function call getFrameset("bottom") is
returning null.

/**
 * function called to hide the left nav bar
 *
 */
function hideLeftnav() {
    var bottom = getFrameset("bottom") ;
    bottom.cols="0,*";
}
/**
 * function called to access frame elements
 *
 */
function getFrameset(aFrame) {
    if (document.getElementById) {
        elm = parent.document.getElementById(aFrame);
    } else if (document.all) {
        elm = parent.frames[1].document.all[aFrame];
    } else if (document.layers) {
        elm = parent.frames[1].document.layers[aFrame];
    }

    return elm;
}

the frameset code is as follows.

<frameset id="application" title="Application"
rows="60,0,*" framespacing="0"  frameborder="1" >
    <frame noresize id="navbar" name="navbar" src="<%
= navbar %>" marginwidth="0" marginheight="0"
scrolling="no" frameborder="0">
    <frame noresize id="subnavbar"  name="subnavbar"  
src="subNavblank.jsp" marginwidth="0"
marginheight="0" scrolling="no"  frameborder="0">
    <frameset id="bottom" title="bottom" cols="<%=
bodysize %>" framespacing="0">
        <frame class="leftNav" id="leftNav" name="leftNav"
noresize src="<%= leftnav %>" marginwidth="0"
marginheight="0" frameborder="0" scrolling="auto">
        <frame class="workArea" id="workarea"
name="workArea" marginwidth="0" marginheight="0"
scrolling="auto" frameborder="0" src="<%= workarea %
>">
  </frameset>
</frameset>

----------------------------------------------------------------------

>Comment By: Marc Guillemot (mguillem)
Date: 2005-10-19 11:23

Message:
Logged In: YES
user_id=402164

Should now work with latest source from CVS

----------------------------------------------------------------------

Comment By: Marc Guillemot (mguillem)
Date: 2005-04-28 21:37

Message:
Logged In: YES
user_id=402164

Htmlunit seems to wrongly load frame content too early,
before it finds the closing </frameset> tag.
The problem can be shown with simplier example (below).
Firefox and IE display alert with "true" whereas htmlunit
says "false".
I change the bug's title to better express the cause of the
problem.

<html>
<frameset rows="60,0,*">
        <frame src="1.html">
        <frame id="bottom" src="about:blank">
</frameset>
</html>

1.html:
<html>
<head>
<script>
function test()
{
        alert(parent.document.getElementById('bottom') != null);
}
</script>
</head>
<body onload="test()" ></body>
</html>

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1185806&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...