Page 1 of 1

Help please! How to change headings...

Posted: Wed Apr 20, 2005 10:10 am
by mattcooper
I am desperate for a solution to this problem which, after much head-scratching, I cannot easily solve.

I am building an ezine, the content of which appears in an inline frame. I have included a pop-up menu from which users can navigate to the page of their choice. When they select a page, a JavaScript event is triggered that changes the heading - which is simply text in a styled textfield.

The problem is that the user can also navigate using "previous" and "next" buttons, which means that the heading doesn't then change - it simply stays as it was for the previous page.

The other part of this beast of a problem is that I need the nav buttons to sequence through the pages without the need to reload the main page: a truly "next" and "previous" function, dependent on which page is currently displayed in the iframe. Page 1 goes to page 2 etc. without reloading. I have serious doubts that this is possible, so I'm prepared to allow the page to reload if necessary - it would then load up with the new iframe content, I suppose.

I think that this is a very complex problem, and I have a deadline to meet unfortunately. Can somebody please put me out of my misery?

Thanks in advance.

Posted: Wed Apr 20, 2005 10:46 am
by feyd
extremely simple solution: don't use iframes or frames. It works wonders.

Posted: Wed Apr 20, 2005 11:05 am
by mattcooper
Thanks Feyd...

Unfortunately, I working to a brief that states no scrolling allowed - and where there is too much content in a page of the ezine, I am forced to resort to an iframe to avoid the appearance of scrollbars (could use a layer, I suppose).

Any thoughts?

Posted: Wed Apr 20, 2005 11:17 am
by feyd
sounds more like poor page design if you can't use scrollbars. :? All your links could always reference the top level page with some information passing that tells it what junk to display... Could use div's with proper CSS controls that'd ~stop the scrollbars..

Posted: Wed Apr 20, 2005 11:55 am
by mattcooper
Can you use a cookie to provide information about the next page to load into the iframe, Feyd? So, when "page1" loads, a cookie is written with the URL of the next page to display. Is it possible to "include" cookies in the same way as files on the server?

Thanks for your input so far... :)

Posted: Wed Apr 20, 2005 12:03 pm
by feyd
cookies can be a bit of a pain between frames. I'd still suggest using a div, instead of an iframe, or working up a better page design that will work with this scrolling concept your design sounds like it'd break with...

Posted: Wed Apr 20, 2005 12:43 pm
by mattcooper
Feyd,

Can you instruct me on how to set a cookie that contains the URL of the next page to load? I'd really be most grateful!

Thank you.

Posted: Wed Apr 20, 2005 5:41 pm
by feyd
read the documentation on setcookie()

Posted: Wed Apr 20, 2005 7:57 pm
by Ambush Commander
I am forced to resort to an iframe to avoid the appearance of scrollbars
That doesn't make any sense. If you use iFrames, they still default to scrollbars if there's an overflow... so... are you clipping the data?

Then what I suggest is taking the data and intelligently truncating the text at a certain page, making the user press NEXT > to get to the next page.

Posted: Wed Apr 20, 2005 8:16 pm
by mudvein
Ambush Commander wrote:
I am forced to resort to an iframe to avoid the appearance of scrollbars
That doesn't make any sense. If you use iFrames, they still default to scrollbars if there's an overflow... so... are you clipping the data?

Then what I suggest is taking the data and intelligently truncating the text at a certain page, making the user press NEXT > to get to the next page.
that's not entirely true. if you set the frame to be a set height/width with no scrollbars, then of course they'd never show up...

Posted: Wed Apr 20, 2005 8:21 pm
by Ambush Commander
But don't iFrames by default implement the CSS attribute:

Code: Select all

overflow : scroll ;
At least from my experience if I have a frame, and it's bigger than the set size, it will scroll.

Of course, if you set:

Code: Select all

overflow : clip ;
Then the scrollbars won't show up (or theoretically they won't). I was talking about defaults. I think.

Posted: Wed Apr 20, 2005 10:00 pm
by mudvein
by default yes, but as i said, you could DEFINE it to disallow scrollbars within the original frame tag ;)