Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: BLANK PAGE


Message #1 by "Claudio Pallone" <pallone@l...> on Fri, 13 Dec 2002 15:06:31
Hmm Perhaps this may be a little easier (Still looking for old code)

in your top frame add this javascript

function rightBottomFrameLoaded() { alert("bottom page has loaded") }

and in the body of your bottom frames page add this to the onload event
onLoad=3D'parent.topFrameNAME.rightBottomFrameLoaded();'
This will call back the main fram when its loaded and call a javascript 
to do whatever you want.

(Will continue to look for setInterval sample)


Keith Bamberger
Programmare
Plakat AB
Kungsgatan 51
903 26 Ume=E5

0730-37 51 79 mobil
keith@p...

090-71 77 00 v=E4xel
090-71 77 01 fax
www.plakat.se
----- Original Message -----
From: "Claudio Pallone" <pallone@l...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Friday, December 13, 2002 3:53 PM
Subject: [javascript_howto] Re: BLANK PAGE


> Hi Keith,
>
> Thansk for your reply.
>
> It would be very helpful if you can show me how to do it. Basically I 
want
> to make sure that the user can click the link only after the 
rightbottom
> frame is fully loaded.
>
> Cheers,
>
> Claudio
>
> > Hi Claudio if I read your article right, you want something like 
this to
> =3D
> happen. When you load the page the Link you can click to create your 
=3D
> file shouldnt be able to be clicked UNTIL the Right fram has finished 
=3D
> loading?
>
> If thats right then perhaps you can use setInterval to give you a 
pause =3D
> before you display your link.
>
> I have a page which loads an Object which at somepoint should hold 
some =3D
> text, but sometimes it was slow to load and when I was trying to set 
its =3D
> text with a value, if it wasnt loaded I would get a "not an Object" 
=3D
> error from Javascript.
>
> Look for setInterval at google for an example (I'll try to find this 
old =3D
> page if you think it may be something you could use)
>
> Hope this helps=3D20
>
> Keith
>
>
>
>
>
>
>
> Keith Bamberger
> Programmare
> Plakat AB
> Kungsgatan 51
> 903 26 Ume=3DE5
>
> 0730-37 51 79 mobil
> keith@p...
>
> 090-71 77 00 v=3DE4xel
> 090-71 77 01 fax
> www.plakat.se
> ----- Original Message -----=3D20
> From: "Claudio Pallone" <pallone@l...>
> To: "JavaScript HowTo" <javascript_howto@p...>
> Sent: Friday, December 13, 2002 3:06 PM
> Subject: [javascript_howto] BLANK PAGE
>
>
> > Hi,
> >=3D20
> > I am having a problem with a link. when I click this link I am =3D
> creating a=3D20
> > text file based on the content of a frame(rightBottom). Since the 
=3D
> content=3D20
> > takes longer to download than my link bar, if I click on the link 
=3D
> before=3D20
> > the frame(rightBottom) is displayed then page stops loading and the 
=3D
> text=3D20
> > file created is empty.
> >=3D20
> > I have tried to use the typeof operator to check if a div is an 
object =3D
> but=3D20
> > it is not doing the trick.
> >=3D20
> > if(typeof =3D
> parent.frames[1].rightBottom.document.getElementsByTagName('Div')
> > =3D3D=3D3D'object') GoURL('csv/csv_svr.aspx', =3D
> '<%=3D3DstrFullQuery%>&sep=3D3D1');">
> >=3D20
> > I have also tried to set a boolean in the rightBottom and on the 
body =3D
> load=3D20
> > set it to true but this is not working as well. There is something 
=3D
> missing=3D20
> > somewhere=3D20
> >=3D20
> > <script language=3D3D"JavaScript" type=3D3D"text/javascript">
> > var bLoaded =3D3D false;
> > window.onload =3D3D function (){
> > bLoaded =3D3D true;
> > }
> > </script>
> > </head>
> > <body>
> > </body>
> > </html>
> > ....
> >=3D20
> > if(bIsLoaded)
> >=3D20
> > ....
> >=3D20
> > If I click the link before the page is completelly loaded the page 
=3D
> stops=3D20
> > loading and I get a blank screen. How do I stop that from happening?
> >=3D20
> > Also, Maybe it would easier to make sure the link bar is loaded only 
=3D
> after=3D20
> > the rightBottom frame is loaded. But How do I do that??
> >=3D20
> > I would appreciate your help.
> >=3D20
> > This is the function I am calling:
> >=3D20
> > function GoURL(strURL, strQuery)
> > {
> >=3D20
> > if(typeof parent.frames
> > [1].rightBottom.document.getElementsByTagName("Div")!=3D3D"object")
> > //if(typeof parent.frames[1].rightBottom.document.getElementById
> > ("Rights"))
> > {
> > alert("no");
> > }
> > else
> > {
> > // build full url - add local query string
> > // nb: assume strQuery contains initial ?
> > var strFullURL =3D3D strURL + strQuery;
> > //alert(strFullURL);
> >=3D20
> > // add state variables
> > if (bColoredTDs)
> > strFullURL +=3D3D "&idxhlt=3D3D1";
> > else
> > strFullURL +=3D3D "&idxhlt=3D3D0";
> >=3D20
> > // add column hidden status
> > var arrDivs =3D3D parent.frames
> > [1].rightBottom.document.getElementsByTagName("Div");
> > strFullURL +=3D3D "&show=3D3D";
> > var nLayer=3D3D1;
> >=3D20
> > for (i=3D3D0; i<arrDivs.length; i++)
> > {
> > var re;
> > re =3D3D /layer*/i;
> >=3D20
> > var re1;
> > re1 =3D3D /HideTable*/i;
> >=3D20
> > if (arrDivs[i].id.search(re)!=3D3D-1)
> > {
> > if (arrDivs[i].className.search(re1)=3D3D=3D3D-1)
> > strFullURL +=3D3D "[" + nLayer + "]";
> > nLayer++;
> > }
> > }
> >=3D20
> >=3D20
> > parent.navigate(strFullURL);
> >=3D20
> >  }
> > }
> >=3D20
> > </script>
> >=3D20
> > Cheers,
> >=3D20
> > Claudio
> > ---
> > Change your mail options at http://p2p.wrox.com/manager.asp or=3D20
> > to unsubscribe send a blank email to =3D
> >=3D20
>
>
>



  Return to Index