RE: One call for two pages?

2002-03-18 Thread Dave Watts

> I've written pages where I spew all of the HTML out and 
> then at the very end (after the ) I add my JavaScript.  
> Something like:
> 
> 
> 
> 
>   document.form[0].field.value = 'something'
> 
> 
> This way the script won't run until after the whole page is 
> created.

For what it's worth, you can get the same result and have valid HTML
documents as well, by writing the code you want to run last as a function,
and calling that function in the onload event handler of the BODY tag.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-18 Thread Dave Carabetta

> Can you tell anything about the users of the app? More specifically, is
> it an intranet and is cross-browser compatibility an issue?
>

This is not an intranet application, and must support Netscape 4.x+ and IE
5+. I can't *assume* a particular level of web savvy on the user's end, so
I'm developing the app as if they are relatively new. The Netscape 4 part is
what's killing me right now. IFrames and the like are out because they are
IE only.

Down with Netscape,
Dave.
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: One call for two pages?

2002-03-18 Thread Bill Grover

Though I would wade in with my $.02 worth.

I've written pages where I spew all of the HTML out and then at the very end
(after the ) I add my JavaScript.  Something like:




document.form[0].field.value = 'something'


This way the script won't run until after the whole page is created.  You
might be able to use this to create your page and then write the JavaScript
to go to the parent frame, grab the values you want and then push them into
the page where you want them displayed.

The other option I can think of is to write your server page to generate the
2 output pages and save them disk using cfhttp.  Then when you load your 2
frames have those pages cfinclude the generated pages.  I know you are in a
clustered environment so this may not be feasible, but just a thought.

Good Luck!

__ 

Bill Grover 
Supervisor MIS  Phone:  301.424.3300 x3324  
EU Services, Inc.   FAX:301.424.3696
649 North Horners Lane  E-Mail: [EMAIL PROTECTED]
Rockville, MD 20850-1299WWW:http://www.euservices.com
__ 



> -Original Message-
> From: Dave Carabetta [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 2002 3:20 PM
> To: CF-Talk
> Subject: Re: One call for two pages?
> 
> 
> >haha, i totally screwed up that post.
> >
> >instant replay
> >
> >this is kindof a wacky situation.  as far as I know there 
> are few ways to
> >make a "recordset", or data in general, available across frames.
> >
> >in this case I would use a wddx recordset.
> >-i'd run the query in the upper frame
> >-return it to the page as a wddx recordset to the page
> >-onload of the upper i'd refresh the lower
> >-onload of the lower have it look at the wddx recordset in 
> the upper and
> >build your page from there
> >
> >kinda messy.  interesting problem that i've never really seen a good
> >solution to.
> >
> >you CAN refer to variables in other frames from the same domain.
> >
> >am i making sense here or am i speaking FridayAfternoonGettingTired
> >language here?
> 
> No, you're making sense. That's an interesting approach. The 
> one pitfall I 
> see is that in order to refer to the top frame's field, I'd 
> have to use 
> JavaScript to get the value (parent.topFrame.fieldname.value) 
> and then write 
> the bottom frame out entirely in JavaScript. Outside of that, 
> I don't see 
> how I could get at the value via JavaScript, set it to a CF 
> variable, and 
> then use the resulting CF variable to write the page using 
> standard markup.
> 
> Does that make sense?
> 
> Thanks for your reply,
> Dave.
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-18 Thread Jochem van Dieten

Sharon DiOrio wrote:
> Ack.  I don't have much more to offer, except maybe the possibility of using
> javascript to pass an array of values between the pages.  Not something I
> have a lot of experience with, but it's an idea.

Can you tell anything about the users of the app? More specifically, is 
it an intranet and is cross-browser compatibility an issue?

Jochem

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-17 Thread Sharon DiOrio

Ack.  I don't have much more to offer, except maybe the possibility of using
javascript to pass an array of values between the pages.  Not something I
have a lot of experience with, but it's an idea.

Sharon
- Original Message -
From: "Dave Carabetta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, March 17, 2002 3:44 PM
Subject: Re: One call for two pages?


> > OK, then you'll have to copy the results to SESSION scope and call them
> from
> > there.
> >
> > Something along the lines of:
> > In the first page:
> > 
> > 
> > 
> >
> > Then reference it on the second page by copying to local scope.
> > 
> > 
> > 
>
> Sharon, thanks for your feedback so far. But as I mentioned in a previous
> post, I'm in a clustered environment, so SESSION variables are out of the
> question -- even sticky sessions. And I don't want to resort to client
> variables because the WDDX packet approaches 15K and the overhead involved
> in returning it with *every* page call would be highly inefficient.
>
> Thanks again,
> Dave.
> 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-17 Thread cf refactoring

Try this



  

  ...


  



  

  ... do your processing

  
  

  





--- Dave Carabetta <[EMAIL PROTECTED]> wrote:
> I'm trying to do something here that I don't think
> is possible, but thought 
> I'd throw it out there to confirm.
> 
> Quick Overview:
> I'm building an app that has a frames-based module.
> The frames are split 
> 50-50 horizontally -- nothing complex. In the top
> frame, the user makes any 
> appropriate modifications to data. On submission,
> the lower frame (which 
> contains an ongoing report) auto-refreshes to
> reflect the new data.
> 
> The problem:
> On submission, both the top frame and the bottom
> frame make the same exact 
> call to the server to get the new data. I know that
> may sound strange, but 
> believe me, it does make sense for me. I'm wondering
> if it's possible to 
> make this call to the server and have the resulting
> record set available to 
> both pages in the frame set so that I only have to
> make the call once 
> instead of twice per refresh?
> 
> Any ideas? I've been thinking along the lines of a
> hidden frame that makes 
> the call, but I can't quite put my finger on how
> that helps my situation 
> any.
> 
> Thanks in advance,
> Dave.
> 
>
_
> Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> 
>

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-17 Thread Dave Carabetta

> OK, then you'll have to copy the results to SESSION scope and call them
from
> there.
>
> Something along the lines of:
> In the first page:
> 
> 
> 
>
> Then reference it on the second page by copying to local scope.
> 
> 
> 

Sharon, thanks for your feedback so far. But as I mentioned in a previous
post, I'm in a clustered environment, so SESSION variables are out of the
question -- even sticky sessions. And I don't want to resort to client
variables because the WDDX packet approaches 15K and the overhead involved
in returning it with *every* page call would be highly inefficient.

Thanks again,
Dave.
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-17 Thread Sharon DiOrio

OK, then you'll have to copy the results to SESSION scope and call them from
there.

Something along the lines of:
In the first page:




Then reference it on the second page by copying to local scope.




HTH,
Sharon
- Original Message -
From: "Dave Carabetta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 12:47 PM
Subject: Re: One call for two pages?


> > How about having the top frame submit to itself and use javascript to
> submit
> > to the bottom frame?  Something like:
> >
> > 
> > 
> > <!--
> > function submitForm() {
> >  myForm.target="otherFrame";
> >  myForm.action="other_action.cfm";
> >  myForm.submit();
> >  }
> >  -->
> > 
> > 
>
> I see what you're saying, but that's not what I'm trying to solve. I know
> how to get one frame to submit another frame -- that's easy. Essentially
> this comes down to trying to force one CF Server call's results to be
> available for a second page. It doesn't have anything to do (as far as I
can
> figure out) with JavaScript. This is a huge WDDX packet, so storing it in
a
> hidden field in one frame is not feasible either.
>
> Thanks though,
> Dave.
> 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-16 Thread Dave Carabetta

> How about having the top frame submit to itself and use javascript to
submit
> to the bottom frame?  Something like:
>
> 
> 
> 
> 
> 

I see what you're saying, but that's not what I'm trying to solve. I know
how to get one frame to submit another frame -- that's easy. Essentially
this comes down to trying to force one CF Server call's results to be
available for a second page. It doesn't have anything to do (as far as I can
figure out) with JavaScript. This is a huge WDDX packet, so storing it in a
hidden field in one frame is not feasible either.

Thanks though,
Dave.
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-16 Thread Sharon DiOrio

How about having the top frame submit to itself and use javascript to submit
to the bottom frame?  Something like:



<!--
function submitForm() {
 myForm.target="otherFrame";
 myForm.action="other_action.cfm";
 myForm.submit();
 }
 -->



Sharon
- Original Message -
From: "Dave Carabetta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, March 15, 2002 6:20 PM
Subject: Re: One call for two pages?


> > How about having the top frame submit to itself. All processing is done
> > normally and in the end query is set to a session variable with a unique
> > name. After that you add 1 javascript function using cfhtmlhead. The
> > function looks something like:
> > function reloadBottom() {
> >  top.frames[1].location = 'blahblah.cfm?fromcache=#uniquename#';
> >  }
> >
> > On the resulting request you just grab the query from the session scope
> > based on the unique name. If it is large don't forget to delete the
> > session variable afterwards.
> >
>
> The problem with that is two-fold. First, I'm in a clustered environment,
so
> I can't use session variables. Second, I am receiving  a 15K WDDX packet
> back from a Python server that I am de-serializing. So setting the packet
to
> a client variable isn't reasonable either. The resulting variable would be
> huge and a burden on the CF server because it would inherently be
retrieved
> on every CF call within the application.
>
> Also, as a rule of thumb, I always have my forms submit to themselves.
This
> allows me to have self-contained forms which are easy to re-use and
> maintain.
>
> Regards,
> Dave.
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread Jochem van Dieten

Dave Carabetta wrote:
> 
> The problem with that is two-fold. First, I'm in a clustered environment, so
> I can't use session variables. Second, I am receiving  a 15K WDDX packet
> back from a Python server that I am de-serializing. So setting the packet to
> a client variable isn't reasonable either. The resulting variable would be
> huge and a burden on the CF server because it would inherently be retrieved
> on every CF call within the application.

In that case: let the submit process create 2 pages. First create the 
bottom frame and put it in a variable. Then the top frame and include 
some code like:


htmlbody = JSStringFormat(bottomframe);
top.frames[1].location='about:blank';
top.frames[1].document.write(htmlbody);


This should write the htmlbody into the other frame.

Jochem

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread Dave Carabetta

> How about having the top frame submit to itself. All processing is done
> normally and in the end query is set to a session variable with a unique
> name. After that you add 1 javascript function using cfhtmlhead. The
> function looks something like:
> function reloadBottom() {
>  top.frames[1].location = 'blahblah.cfm?fromcache=#uniquename#';
>  }
>
> On the resulting request you just grab the query from the session scope
> based on the unique name. If it is large don't forget to delete the
> session variable afterwards.
>

The problem with that is two-fold. First, I'm in a clustered environment, so
I can't use session variables. Second, I am receiving  a 15K WDDX packet
back from a Python server that I am de-serializing. So setting the packet to
a client variable isn't reasonable either. The resulting variable would be
huge and a burden on the CF server because it would inherently be retrieved
on every CF call within the application.

Also, as a rule of thumb, I always have my forms submit to themselves. This
allows me to have self-contained forms which are easy to re-use and
maintain.

Regards,
Dave.
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread Jochem van Dieten

Dave Carabetta wrote:
>>you should just reload the lower frame onload of the upper.
>>
>>parent.html
>> -frame1.html
>> -frame1.html
>>
>>in frame1.html just go:
>>
>>
>>
> 
> Maybe I'm missing what you're getting at, but I'm not sure how that helps my 
> situation. I know how to auto-refresh the bottom frame -- that's not the 
> hard part. What I want is for the query that runs in the top frame to be 
> available for the bottom frame as well.
> 
> So ideally:
> 
> -- parent frame which contains framset markup
>-- run query for both frames
>-- load top frame using above recordset
>-- load bottom frame using same recordset
> 
> Using the onLoad handler doesn't allow the query in the top frame to be 
> available to the bottom frame, does it?

How about having the top frame submit to itself. All processing is done 
normally and in the end query is set to a session variable with a unique 
name. After that you add 1 javascript function using cfhtmlhead. The 
function looks something like:
function reloadBottom() {
 top.frames[1].location = 'blahblah.cfm?fromcache=#uniquename#';
 }

On the resulting request you just grab the query from the session scope 
based on the unique name. If it is large don't forget to delete the 
session variable afterwards.

Jochem

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread Dave Carabetta

>haha, i totally screwed up that post.
>
>instant replay
>
>this is kindof a wacky situation.  as far as I know there are few ways to
>make a "recordset", or data in general, available across frames.
>
>in this case I would use a wddx recordset.
>-i'd run the query in the upper frame
>-return it to the page as a wddx recordset to the page
>-onload of the upper i'd refresh the lower
>-onload of the lower have it look at the wddx recordset in the upper and
>build your page from there
>
>kinda messy.  interesting problem that i've never really seen a good
>solution to.
>
>you CAN refer to variables in other frames from the same domain.
>
>am i making sense here or am i speaking FridayAfternoonGettingTired
>language here?

No, you're making sense. That's an interesting approach. The one pitfall I 
see is that in order to refer to the top frame's field, I'd have to use 
JavaScript to get the value (parent.topFrame.fieldname.value) and then write 
the bottom frame out entirely in JavaScript. Outside of that, I don't see 
how I could get at the value via JavaScript, set it to a CF variable, and 
then use the resulting CF variable to write the page using standard markup.

Does that make sense?

Thanks for your reply,
Dave.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread savan . thongvanh

haha, i totally screwed up that post.

instant replay

this is kindof a wacky situation.  as far as I know there are few ways to
make a "recordset", or data in general, available across frames.

in this case I would use a wddx recordset.
-i'd run the query in the upper frame
-return it to the page as a wddx recordset to the page
-onload of the upper i'd refresh the lower
-onload of the lower have it look at the wddx recordset in the upper and
build your page from there

kinda messy.  interesting problem that i've never really seen a good
solution to.

you CAN refer to variables in other frames from the same domain.

am i making sense here or am i speaking FridayAfternoonGettingTired
language here?





"Dave Carabetta" <[EMAIL PROTECTED]> on 03/15/2002 01:27:11 PM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk <[EMAIL PROTECTED]>
cc:

Subject:  Re: One call for two pages?


>you should just reload the lower frame onload of the upper.
>
>parent.html
>  -frame1.html
>  -frame1.html
>
>in frame1.html just go:
>
>
>

Maybe I'm missing what you're getting at, but I'm not sure how that helps
my
situation. I know how to auto-refresh the bottom frame -- that's not the
hard part. What I want is for the query that runs in the top frame to be
available for the bottom frame as well.

So ideally:

-- parent frame which contains framset markup
   -- run query for both frames
   -- load top frame using above recordset
   -- load bottom frame using same recordset

Using the onLoad handler doesn't allow the query in the top frame to be
available to the bottom frame, does it?

Regards,
Dave.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: One call for two pages?

2002-03-15 Thread savan . thongvanh

you should just reload the lower frame onload of the upper.

parent.html
 -frame1.html
 -frame1.html

in frame1.html just go:






"Dave Carabetta" <[EMAIL PROTECTED]> on 03/15/2002 12:59:20 PM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk <[EMAIL PROTECTED]>
cc:

Subject:  One call for two pages?


I'm trying to do something here that I don't think is possible, but thought
I'd throw it out there to confirm.

Quick Overview:
I'm building an app that has a frames-based module. The frames are split
50-50 horizontally -- nothing complex. In the top frame, the user makes any
appropriate modifications to data. On submission, the lower frame (which
contains an ongoing report) auto-refreshes to reflect the new data.

The problem:
On submission, both the top frame and the bottom frame make the same exact
call to the server to get the new data. I know that may sound strange, but
believe me, it does make sense for me. I'm wondering if it's possible to
make this call to the server and have the resulting record set available to
both pages in the frame set so that I only have to make the call once
instead of twice per refresh?

Any ideas? I've been thinking along the lines of a hidden frame that makes
the call, but I can't quite put my finger on how that helps my situation
any.

Thanks in advance,
Dave.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



One call for two pages?

2002-03-15 Thread Dave Carabetta

I'm trying to do something here that I don't think is possible, but thought 
I'd throw it out there to confirm.

Quick Overview:
I'm building an app that has a frames-based module. The frames are split 
50-50 horizontally -- nothing complex. In the top frame, the user makes any 
appropriate modifications to data. On submission, the lower frame (which 
contains an ongoing report) auto-refreshes to reflect the new data.

The problem:
On submission, both the top frame and the bottom frame make the same exact 
call to the server to get the new data. I know that may sound strange, but 
believe me, it does make sense for me. I'm wondering if it's possible to 
make this call to the server and have the resulting record set available to 
both pages in the frame set so that I only have to make the call once 
instead of twice per refresh?

Any ideas? I've been thinking along the lines of a hidden frame that makes 
the call, but I can't quite put my finger on how that helps my situation 
any.

Thanks in advance,
Dave.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists