JavaScript mystery

Results 1 to 2 of 2

Thread: JavaScript mystery

  1. #1
    Join Date
    Dec 1969

    Default JavaScript mystery

    Hi all,<BR>I have a page called order.asp that has a frameset with 2 frames as follows:<BR><BR>order.asp<BR>---------<BR>&#060;FRAMESET ROWS="*,90px"&#062;<BR> &#060;FRAME SRC="top.asp" NAME="topframe"&#062;<BR> &#060;FRAME SRC="bottom.asp" NAME="bottom"&#062; <BR>&#060;/FRAMESET&#062;<BR><BR>in bottom.asp, I have several buttons and also a number of javascript functions one of which is a function that diables all the buttons on the page(bottom.asp). It is as follows:<BR><BR>function disableButtons()<BR>{<BR> var obj;<BR> for(var i = 0; i &#060; document.forms(0).length; i++)<BR> {<BR> obj = document.forms(0).item(i);<BR> //mouseout is another function that changes colors<BR> mouseout(obj,&#039;YELLOW&#039;,&#039;WHITE&#039;, 1);<BR> obj.disabled = true;<BR> } <BR>}<BR><BR>Now, to the problem. when the page top.asp finishes loading, I want to disable the buttons in the bottom frame. I am doing it this way<BR>&#060;body onload="parent.frames(&#039;bottom&#039;).disableb uttons()"&#062; Sometimes, I get an error message "object doesn&#039;t support this property or method". This error message shows up randomly. Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: JavaScript mystery

    I could shoot from the hip and say<BR>that your browser isn&#039;t loading the page <BR>in the same order each time.<BR><BR>I don&#039;t know if its guaranteed, but won&#039;t the top frame load first and then the bottom one, so in theory, wouldn&#039;t an onload in the bottom frame disable the buttons after the top is finished loading. <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts