iframes usage? [Solved]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

iframes usage? [Solved]

Post by J_Iceman05 »

i have a page and i want them to be able to scroll certain sections if needed (based on data from the database)

say....
there is a table containing the year, bill amount, how much they paid at this time, the date of transaction, and payment method.
but i have limited height for the table. so if the person only has 2 or 3 records of this, then it would be fine.
but if they have 10, then the whole thing gets distorted. so if they have too many entries then it needs to scroll

i would think that iframes would do this just fine, but i dont know how transfer the information between them.
I dont know how i would make the table in the iframe.

I welcome all comments and input. Thank you for your time
Last edited by J_Iceman05 on Thu Nov 03, 2005 12:39 pm, edited 3 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why not emit an allowance for scrolling when the data reaches a certain number of records? i.e. tell it via CSS that the table can scroll when you hit a specified length of rows?
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Post by J_Iceman05 »

how do i specify that?

overflow:scroll; i know of
i tried using height and i even tried size but neither do anything, whether i have one entry, or 20, there is no scrolling...
what is the css tag i need to make it scroll how i want?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

J_Iceman05 wrote:how do i specify that?

overflow:scroll; i know of
i tried using height and i even tried size but neither do anything, whether i have one entry, or 20, there is no scrolling...
what is the css tag i need to make it scroll how i want?
overflow: auto or overflow: scroll yes.

It won't work with tables or table cells though.... it needs to work with block-level xhtml elements.

Put a <div> inside your table cell or iframe that is the correct dimensions and then apply the property to that :)
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Post by J_Iceman05 »

That works great. Thank you both for the replies.
I wasn't using a div... i was trying to put the css straight onto the table ::smacks himself in the head::

Thank you again, and keep up the good work.
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Post by J_Iceman05 »

ok... i think i jumped the gun alittle when i said it was solved and it all worked fine and dandy...

now, the problem is... this table scrolling doesn't work in IE... good old microsoft back again
if everyone used firefox it would work great; but a lot of people use IE, so i have to make it compatible...
i'm back to the iframe question, unless there is something that can be done to make this work in IE as well...
... maybe i am just using it incorrectly (wouldn't be surprised...)

Code: Select all

<style>
	.scroll {overflow:auto; overflow-y:auto; height:120px; width:570px;}
</style>
from what i could gather on the net (and understand) this would scroll vertically and horizontally...

Thanks again for your help.
Last edited by J_Iceman05 on Thu Nov 03, 2005 12:35 pm, edited 2 times in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

J_Iceman05 wrote:ok... i think i jumped the gun alittle when i said it was solved and it all worked fine and dandy...

now, the problem is... this table scrolling doesn't work in IE... good old microsoft back again
if everyone used firefox it would work great; but a lot of people use IE, so i have to make it compatible...
i'm back to the iframe question, unless there is something that can be done to make this work in IE as well...
... maybe i am just using it incorrectly (wouldn't be surprised...)

Code: Select all

<style>
	.scroll {overflow:auto; overflow-y:auto; height:120px; width:570px;}
</style>
from what i could gather on the net (and understand) this would scroll vertically and horizontally...

Thanks again for your help.
Just "overflow: auto;" will make it scroll vertically and horizontally. "overflow-y:" is invalid CSS (MS-specific?).

Make sure that your div has fixed width and height.
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Post by J_Iceman05 »

... i feel dumber and dumber everyday it seems...
take out the overflow-y and it seems to be working correctly in both browsers.

Thanks again
Post Reply