PDA

View Full Version : ddparentcombo



Hanna Philippi
14-Nov-2005, 11:52 AM
hi everybody,

I've been using ddparentcombo in an orderdetails database where the customer
is linked.It is been working great until The users exceeds 800 and some
records in the customers database then it doesn't save anymore and it bring
all customer in the comboform

any idea why


<tr>
<td class="Label" width="100" ><font size="2"
face="Arial">Shipper/Exporter</font></td>
<td
class="data"><%=oorderdetails.DDValue("shipper.customer#",ddparentcombo)%><%=oOrderdetails.DDValue("shipper.name1")%></td>


</tr>

many thanks

Knut Sparhell
14-Nov-2005, 10:19 PM
(sorry for accidentially mailing this reply)

Hanna Philippi wrote:

> I've been using ddparentcombo in an orderdetails database where the
> customer is linked.It is been working great until The users exceeds
> 800 and some records in the customers database then it doesn't save
> anymore and it bring all customer in the comboform
>
> any idea why
>
>
> <tr>
> <td class="Label" width="100" ><font size="2"
> face="Arial">Shipper/Exporter</font></td>
> <td
>class="data"><%=oorderdetails.DDValue("shipper.customer#",ddparentcombo)%>
> <%=oOrderdetails.DDValue("shipper.name1")%></td>
>
>
> </tr>


The ddParentCombo is a function that returns a string containing all the
options. I don't know the maximum lenght, or if it depends on any
setting. But user convenience I will not recommend a combo for more
that about hundred records or so.

The solution is to make a lookup list by using a web report. This *may*
create a select control as before, or better, uses a standard page
design. There are many possibilites:

a) Call a new page over the existing. Simple, but you have to update
all the previously entered user data into the ddo before calling.

b) Call a new window using link target. Simple, but may be confusing.
To help add some script to close it when tha parent is selected.

c) Call a popup window (without browser tools, adress bar and so on).
This may be smaller and overlay the current input page. Close upon
selection by script. Disadavntage is the the window is not modal and
the user may just leave it open, creating som confusion later.

d) Make the selection list (a web report) as a hidden DIV, using CSS and
javascript to reveal the lookup when the user clicks a button. This may
overlay the current page by absolute positioning and z-index in CSS,
until parent is selected and the page is reloaded wiyh this set.
(advanced, but quite easy to do, given a good script)


Try this URL for a test page using last option above:

http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp


Source files:

http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js

http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)

--
Knut Sparhell, Norway

Ian Telfer
14-Nov-2005, 11:04 PM
Knut,

The simplicity of that is beautiful!

Thanks for sharing that Knut, really.

Ian

Knut Sparhell wrote:

> (sorry for accidentially mailing this reply)
>
> Hanna Philippi wrote:
>
> > I've been using ddparentcombo in an orderdetails database where the
> > customer is linked.It is been working great until The users exceeds
> > 800 and some records in the customers database then it doesn't save
> > anymore and it bring all customer in the comboform
> >
> > any idea why
> >
> >
> > <tr>
> > <td class="Label" width="100" ><font size="2"
> > face="Arial">Shipper/Exporter</font></td>
> > <td
> >class="data"><%=oorderdetails.DDValue("shipper.customer#",ddparentcombo)%>
>
> > <%=oOrderdetails.DDValue("shipper.name1")%></td>
> >
> >
> > </tr>
>
>
> The ddParentCombo is a function that returns a string containing all
> the options. I don't know the maximum lenght, or if it depends on any
> setting. But user convenience I will not recommend a combo for more
> that about hundred records or so.
>
> The solution is to make a lookup list by using a web report. This
> *may* create a select control as before, or better, uses a standard
> page design. There are many possibilites:
>
> a) Call a new page over the existing. Simple, but you have to update
> all the previously entered user data into the ddo before calling.
>
> b) Call a new window using link target. Simple, but may be
> confusing. To help add some script to close it when tha parent is
> selected.
>
> c) Call a popup window (without browser tools, adress bar and so on).
> This may be smaller and overlay the current input page. Close upon
> selection by script. Disadavntage is the the window is not modal and
> the user may just leave it open, creating som confusion later.
>
> d) Make the selection list (a web report) as a hidden DIV, using CSS
> and javascript to reveal the lookup when the user clicks a button.
> This may overlay the current page by absolute positioning and z-index
> in CSS, until parent is selected and the page is reloaded wiyh this
> set. (advanced, but quite easy to do, given a good script)
>
>
> Try this URL for a test page using last option above:
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp
>
>
> Source files:
>
> http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)
>

Ian Telfer
15-Nov-2005, 05:09 PM
Of course, if you need to select from a list when the page has a lot of
unposted information on it, then a popup is probably still the easiest
way, non-modal aspect aside.

Ian

Knut Sparhell wrote:

> (sorry for accidentially mailing this reply)
>
> Hanna Philippi wrote:
>
> > I've been using ddparentcombo in an orderdetails database where the
> > customer is linked.It is been working great until The users exceeds
> > 800 and some records in the customers database then it doesn't save
> > anymore and it bring all customer in the comboform
> >
> > any idea why
> >
> >
> > <tr>
> > <td class="Label" width="100" ><font size="2"
> > face="Arial">Shipper/Exporter</font></td>
> > <td
> >class="data"><%=oorderdetails.DDValue("shipper.customer#",ddparentcombo)%>
>
> > <%=oOrderdetails.DDValue("shipper.name1")%></td>
> >
> >
> > </tr>
>
>
> The ddParentCombo is a function that returns a string containing all
> the options. I don't know the maximum lenght, or if it depends on any
> setting. But user convenience I will not recommend a combo for more
> that about hundred records or so.
>
> The solution is to make a lookup list by using a web report. This
> *may* create a select control as before, or better, uses a standard
> page design. There are many possibilites:
>
> a) Call a new page over the existing. Simple, but you have to update
> all the previously entered user data into the ddo before calling.
>
> b) Call a new window using link target. Simple, but may be
> confusing. To help add some script to close it when tha parent is
> selected.
>
> c) Call a popup window (without browser tools, adress bar and so on).
> This may be smaller and overlay the current input page. Close upon
> selection by script. Disadavntage is the the window is not modal and
> the user may just leave it open, creating som confusion later.
>
> d) Make the selection list (a web report) as a hidden DIV, using CSS
> and javascript to reveal the lookup when the user clicks a button.
> This may overlay the current page by absolute positioning and z-index
> in CSS, until parent is selected and the page is reloaded wiyh this
> set. (advanced, but quite easy to do, given a good script)
>
>
> Try this URL for a test page using last option above:
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp
>
>
> Source files:
>
> http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)
>

Knut Sparhell
16-Nov-2005, 01:04 AM
Ian Telfer wrote:
> Of course, if you need to select from a list when the page has a lot of
> unposted information on it, then a popup is probably still the easiest
> way, non-modal aspect aside.

I prefer no popups. I never use popups and no (i)frames, and I never
will. You don't really need them. You can to anything from a single
page. It's just a matter of doing the right thing taking every
consideration.

My examples wasn't good enough to show that entered values may be
preserved. I can't show you my real app, so I made my ad-hoc example
using the Order example app in a hurry.

Try now. Enter a date, terms, customer abd sales person. Now, there are
a simple field, a validation list field and two parent tables. You can
save and navigate. Do whatever you like.

http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp

This example uses RequestDDUpdate to save values before finding a
parent. This is the recommended method for multi page entry or
situations where you have to make a request while doing inputs.

The only problem with RequestDDUpdate is that it produces validation
errors for columns not posted. I consider this a possible bug or design
problem. It's intended use is multi page input (wizard style). I
have augmented it not to produce any (internal) error in this case.

--------------------------------------------------------------
Source files:

http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js

http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)


--
Knut Sparhell, Norway

Knut Sparhell
16-Nov-2005, 01:27 AM
Ian Telfer wrote:

> The simplicity of that is beautiful!

Yes, it's beautiful. CSS2 is the thing and the way to go.

I use the same javascript and such styled div's for a kind of tooltips,
for tab pages and for lookups, in my latest app.

If my constrained child table usually has less than ten rows, I use a
tooltip. This is not timed, like the usual Windows tooltips. It closes
only when the pointer is clicked outside the overlayed div or the
"hotspot" clicked again.

Otherwise I use a tab-page like design. The difference is that the div
stays until another tab is activated. The first tabpage is default
displayed, as usual.

With parent tables I use a select control for less than approx 50 rows
and an overlayed div (lookup) when more.

I also use navigational buttons in the child and parent reports. This
example displays all rows.

My querystrings look like:

?rowid=12000;firstparenttablename=1300;start-firsttablename=161000;secondtablename=

and so on. The start- variable is the starting rowid of the list, after
navigating down.

Additionally I also implement a simple and not-very-elegant solution for
those not allowing active scripting.

--
Knut Sparhell, Norway

Ian Telfer
16-Nov-2005, 01:58 AM
Knut,

That look great, and so much simpler than using popups with returns etc.

I'd skipped over the DoRequestDDUpdate function altogether. In a
process pooled environment though, wouldn't that mean you are relying on
attaching to the same process when you switch tabs? As each tab page is
really a different page, the data from the previous pages has to be in
the DDO buffer, and if you have timed out, that will be lost, or the
process may have data from a different record?

Ian



Knut Sparhell wrote:

> Ian Telfer wrote:
>
>> Of course, if you need to select from a list when the page has a lot
>> of unposted information on it, then a popup is probably still the
>> easiest way, non-modal aspect aside.
>
>
> I prefer no popups. I never use popups and no (i)frames, and I never
> will. You don't really need them. You can to anything from a single
> page. It's just a matter of doing the right thing taking every
> consideration.
>
> My examples wasn't good enough to show that entered values may be
> preserved. I can't show you my real app, so I made my ad-hoc example
> using the Order example app in a hurry.
>
> Try now. Enter a date, terms, customer abd sales person. Now, there
> are a simple field, a validation list field and two parent tables.
> You can save and navigate. Do whatever you like.
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp
>
> This example uses RequestDDUpdate to save values before finding a
> parent. This is the recommended method for multi page entry or
> situations where you have to make a request while doing inputs.
>
> The only problem with RequestDDUpdate is that it produces validation
> errors for columns not posted. I consider this a possible bug or
> design problem. It's intended use is multi page input (wizard
> style). I have augmented it not to produce any (internal) error in
> this case.
>
> --------------------------------------------------------------
> Source files:
>
> http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)
>
>

Chris Spencer
16-Nov-2005, 02:21 AM
Can you offer some insight into the methodology when users dont allow
scripting?

Chris Spencer
TUFware Systems

"Knut Sparhell" <knut@sparhell.no> wrote in message
news:O8iRVbn6FHA.4000@dacmail.dataaccess.com...
> Ian Telfer wrote:
>
>> The simplicity of that is beautiful!
>
> Yes, it's beautiful. CSS2 is the thing and the way to go.
>
> I use the same javascript and such styled div's for a kind of tooltips,
> for tab pages and for lookups, in my latest app.
>
> If my constrained child table usually has less than ten rows, I use a
> tooltip. This is not timed, like the usual Windows tooltips. It closes
> only when the pointer is clicked outside the overlayed div or the
> "hotspot" clicked again.
>
> Otherwise I use a tab-page like design. The difference is that the div
> stays until another tab is activated. The first tabpage is default
> displayed, as usual.
>
> With parent tables I use a select control for less than approx 50 rows and
> an overlayed div (lookup) when more.
>
> I also use navigational buttons in the child and parent reports. This
> example displays all rows.
>
> My querystrings look like:
>
> ?rowid=12000;firstparenttablename=1300;start-firsttablename=161000;secondtablename=
>
> and so on. The start- variable is the starting rowid of the list, after
> navigating down.
>
> Additionally I also implement a simple and not-very-elegant solution for
> those not allowing active scripting.
>
> --
> Knut Sparhell, Norway

Hans van de Laar
16-Nov-2005, 05:02 AM
Hi Knut,

>>Disadavntage is the the window is not modal and the user may just
>>leave it open, creating som confusion later.
For IE I know it is possible to display a modal dialog like
NewWindow = window.showModalDialog(<Action>,<callback_function>,
"DialogHeight:17em; DialogWidth:28em; help:no; status:no");
}

Also good to see some other approaches. Thanks for the sample.

Regards,
Hans



Knut Sparhell wrote:

> (sorry for accidentially mailing this reply)
>
> Hanna Philippi wrote:
>
> > I've been using ddparentcombo in an orderdetails database where the
> > customer is linked.It is been working great until The users exceeds
> > 800 and some records in the customers database then it doesn't save
> > anymore and it bring all customer in the comboform
> >
> > any idea why
> >
> >
> > <tr>
> > <td class="Label" width="100" ><font size="2"
> > face="Arial">Shipper/Exporter</font></td>
> > <td
> > class="data"><%=oorderdetails.DDValue("shipper.customer#",ddparentco
> > mbo)%> <%=oOrderdetails.DDValue("shipper.name1")%></td>
> >
> >
> > </tr>
>
>
> The ddParentCombo is a function that returns a string containing all
> the options. I don't know the maximum lenght, or if it depends on
> any setting. But user convenience I will not recommend a combo for
> more that about hundred records or so.
>
> The solution is to make a lookup list by using a web report. This
> may create a select control as before, or better, uses a standard
> page design. There are many possibilites:
>
> a) Call a new page over the existing. Simple, but you have to
> update all the previously entered user data into the ddo before
> calling.
>
> b) Call a new window using link target. Simple, but may be
> confusing. To help add some script to close it when tha parent is
> selected.
>
> c) Call a popup window (without browser tools, adress bar and so
> on). This may be smaller and overlay the current input page. Close
> upon selection by script. Disadavntage is the the window is not
> modal and the user may just leave it open, creating som confusion
> later.
>
> d) Make the selection list (a web report) as a hidden DIV, using CSS
> and javascript to reveal the lookup when the user clicks a button.
> This may overlay the current page by absolute positioning and z-index
> in CSS, until parent is selected and the page is reloaded wiyh this
> set. (advanced, but quite easy to do, given a good script)
>
>
> Try this URL for a test page using last option above:
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp
>
>
> Source files:
>
> http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)



--
Regards,

Hans van de Laar
Micros b.v.
www.micros.nl

Knut Sparhell
16-Nov-2005, 08:46 AM
Ian Telfer wrote:

> That look great, and so much simpler than using popups with returns etc.
>
> I'd skipped over the DoRequestDDUpdate function altogether. In a
> process pooled environment though, wouldn't that mean you are relying on
> attaching to the same process when you switch tabs? As each tab page is
> really a different page, the data from the previous pages has to be in
> the DDO buffer, and if you have timed out, that will be lost, or the
> process may have data from a different record?

I don't rely on having the same process. I only update the DDO to get
the same values back in a single post request including a querystring in
the form action. I don't accumulate data in this way. All data is in
the web page. For each parent i accumulate parent rowid's for the
querystring.

The example is not fully functional yet. I tried to simplify it, but
ended up making it a bit more complicated. I'll get back with better
examples, fully functional with and without scripting, with process
pooling enabled on the server.

--
Knut Sparhell, Norway

Knut Sparhell
16-Nov-2005, 08:48 AM
Chris Spencer wrote:
> Can you offer some insight into the methodology when users dont allow
> scripting?

I use <noscript> and adds a link in there to open a new page. I'll get
back with an example with this included.

--
Knut Sparhell, Norway

JimNC9
16-Nov-2005, 10:47 AM
Looks good. I may need this technique for an upcoming project.

FWIW, I changed the terms and saved and got errors.


Jim /*

WebApp Hosting
http://www.advanceddesignsinc.com/Web%20Hosting.htm




"Knut Sparhell" <knut@sparhell.no> wrote in message
news:tOZqnOn6FHA.2168@dacmail.dataaccess.com...
> Ian Telfer wrote:
>> Of course, if you need to select from a list when the page has a lot of
>> unposted information on it, then a popup is probably still the easiest
>> way, non-modal aspect aside.
>
> I prefer no popups. I never use popups and no (i)frames, and I never
> will. You don't really need them. You can to anything from a single
> page. It's just a matter of doing the right thing taking every
> consideration.
>
> My examples wasn't good enough to show that entered values may be
> preserved. I can't show you my real app, so I made my ad-hoc example
> using the Order example app in a hurry.
>
> Try now. Enter a date, terms, customer abd sales person. Now, there are a
> simple field, a validation list field and two parent tables. You can save
> and navigate. Do whatever you like.
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.asp
>
> This example uses RequestDDUpdate to save values before finding a parent.
> This is the recommended method for multi page entry or situations where
> you have to make a request while doing inputs.
>
> The only problem with RequestDDUpdate is that it produces validation
> errors for columns not posted. I consider this a possible bug or design
> problem. It's intended use is multi page input (wizard style). I have
> augmented it not to produce any (internal) error in this case.
>
> --------------------------------------------------------------
> Source files:
>
> http://dell.sparhell.no/daw.examples.order11_1/inc/tooltip.js
>
> http://dell.sparhell.no/daw.examples.order11_1/lookuptest.zip (ASP+WO)
>
>
> --
> Knut Sparhell, Norway