I'm working on a small HTML/Javascript/PHP using a flatfile text-based DB, Guestbook Script. I will do the formatting in CSS after it is functional. I'm not concerned about the flatfile....

My problem:

I have a FORM in an IFRAME, which can be hidden or made visible to collect the data then write it to the IFRAME. Everything works to this point, except, once you add a comment, hide the guestbook entries, then try to add another entry, scrollbars appear in the IFRAME, even though they don't appear the first time using the form.

I have SCROLLING for the IFRAME set to AUTO b/c the Guestbook entries will eventually need to be scrolled...

Any suggestions/idea on how to prevent the scrollbars appearing the second time around..?

jamescover

06-28-2007, 09:41 PM

I finally figured out what is causing this....

If you add 2 comments, you get two pages inside of the iframe, 3 comments, 3 pages, etc...they were partially hidden, but I noticed the additional 2, 3, etc. pairs of scroll bars. I was nesting pages inside of the iframe, so I had to break it...

I was using
window.location.replace('addcomment.php'); to return to the main window.

I replaced that with
window.top.location.replace('addcomment.php'); and all is well....