afrausto
Posts: 66
|
| Posted: 08/04/2005, 2:31 PM |
|
Hello,
Does anyone have any info on how to create a form and grid on a page where the grid is placed in an iframe. I would like to have the data grid refresh when a record has been updated in the form?
Come to think of it, would it better to place the form in an iframe as well?
Any help is greatly appreciated.
Thanks,
Albert
|
 |
 |
marcwolf
Posts: 361
|
| Posted: 08/04/2005, 3:55 PM |
|
Ok..
One of the things about IFrames is that they are a instance of the browser in their own right. You can put an iframe on the page and then give the iframe the URL of the grid page.
Seeing that you are going to update the form.. you don't specify if this is to be a update where the user just changes the information, or changes where the form is submitted.
I fthe form is submitted then using an iframe for the grid will be a mute point as you are going to have to redraw the screen anyway so just draw the grid at the same time.
If the change is just a field change then you can use the OnChange Javascrip event or use a button to change the iframe's URL and thus redisplay the grid without submitting the form.
We use this techniqe a lot including getting the iframe to run Javascript that updates the main form.. i.e. pricing lookups.
Hopes this helps.
Take Care
Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
|
 |
 |
afrausto
Posts: 66
|
| Posted: 08/04/2005, 4:16 PM |
|
You make some great points.
My intention for the grid in the iframe was to use it in a way for the user to quickly scan the whole list of records before submitting a new record or updating a record. This would save the user from scrolling up and down to look at all the records before modifying one of them or entering a new record. It's more for convenience if anything else.
Thanks for your suggestions.
Albert
|
 |
 |
dataobjx
Posts: 181
|
| Posted: 08/04/2005, 6:07 PM |
|
afrausto
Notwithstanding the many arguements surrounding the use of iFrames, they are still widely used.
However, I would like to point out that many other techniques such as CSS driven interfaces can make iframes a mute point - at some point in the future.
In any event, people are sometimes required to create interfaces - not necessarily based on 'best practices' as such - but instead for such reasons as;
A) Thats how the client wants it.
B) The skills of the user base are impared in some fashion (many people who have had head injuries or were born with a handicap may require an interface not otherwise considered to be the best from a technical standpoint.)
C) A thousand other realstic reasons - logical or practical.
In any event, I posted an example of a 'Dynamic iFrame' within the public area of dmpro.dataobjx.net - for all users to download. A normal iFrame uses a specific height and therefore scrolls. A Dynamic iFrame detects the height of the page its about to load and 'dynamically resizes' to the appropriate height for the document - thus no scroll bars on the inside of the page.. or the dual scroll bar effect where the parent has a scroll bar and the iFrame has a scroll bar. This example code prevents this additional complication.
Speaking of handicaps... when I'm presented with an outer scroll bar on the parent and an inner scroll bar on an iFrame, I don't know how many times I've grabbed the wrong scroll bar to scroll with.... I'm sure readers can sympathise with this.
Anyway, you can login at dmpro.dataobjx.net and download the example from the Public File Area.
The easiest thing to do is download the example and try it out. If your users prefer it that way and it's more efficient to display the records in this fashion for productivity or other reasons... and most importantly - that it works right every time... then your hunt is done. Otherwise, I - like you will watch this post and hopefully - We'll see other examples posted on dmpro.dataobjx.net.
Readers of this post should also refer to - http://forums.codecharge.com/posts.php?post_id=62390 and consider posting such example and any others they've found usefull on dmpro.dataobjx.net.
_________________
www.DataObjx.net
www.mydigitalapps.com |
 |
 |
DonB
|
| Posted: 08/04/2005, 7:08 PM |
|
If all you really want is a scrollable region to contain the grid, it's much
simpler to declare a <DIV style="overflow: scrollable"> block (with the grid
inside). This was discussed in detail recently in one of these forums.
Another alternative is a floating <DIV> that you can move around wherever it
is most convenient.
See these two in action at: http://www.gotodon.com/ccbth/examples/scrollgrid.asp
The floating <DIV> is using wz_dragdrop library from http://www.walterzorn.com and gives a simple 'window-like' floating region.
The one limitation of it is you can't let it overlay a dropdown list because
those will 'bleed through' (at least with Internet Explorer, I think Mozilla
has fixed this so it's not a problem).
--
DonB
http://www.gotodon.com/ccbth
"afrausto" <afrausto@forum.codecharge> wrote in message
news:642f2a1c193411@news.codecharge.com...
> You make some great points.
>
> My intention for the grid in the iframe was to use it in a way for the
user to
> quickly scan the whole list of records before submitting a new record or
> updating a record. This would save the user from scrolling up and down to
look
> at all the records before modifying one of them or entering a new record.
It's
> more for convenience if anything else.
>
> Thanks for your suggestions.
>
> Albert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
marcwolf
Posts: 361
|
| Posted: 08/08/2005, 9:11 PM |
|
Hi DonB
Yes - the dreaded Listbox issue and floating items on the page.
We had that trouble but fixed it by having essentially 2 Divs one inside the other.
The first div had a very tiny border than that is what is 'clobbered' by the list box.
The second div inside has a nicer border but it will never get 'clobbered' because the first div thats the brunt of the action.
We also use draggable iframes and there is an excellent library for this here, and some other really cool stuff.
http://www.mattkruse.com/javascript/
Likewise the above warning holds re Divs and Iframes. Always have something that can be clobbered by the list box but wll not visually impare the look.
Now - why do Listboxes clobber things. Because they are not really part of HTML but a windows control that is placed on the page at a particular location by the browser. And thus the Z order is impared and does not work correcly
Take Care
Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
|
 |
 |
Oper
Posts: 1195
|
| Posted: 08/08/2005, 10:00 PM |
|
Great Site marcwolf..................
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |