Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

OT: How can I manage a "Please Wait" message with this scenario?

LEGEND ,
Oct 23, 2006 Oct 23, 2006
I have a page which allows you to paste in a potentially large list of zip
codes.

When you submit this page, the list is de-duped, and then checked against a
table of ~22,000 zips for matches.

Where and how in this process could I bring up a "Please Wait" message while
the transaction is being completed?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================



TOPICS
Server side applications
775
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
do while
show "Please Wait graphic
until $ListVar !empty?



"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ehilbo$srm$1@forums.macromedia.com...
>I have a page which allows you to paste in a potentially large list of zip
>codes.
>
> When you submit this page, the list is de-duped, and then checked against
> a table of ~22,000 zips for matches.
>
> Where and how in this process could I bring up a "Please Wait" message
> while the transaction is being completed?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
I just don't see how that could work, honestly - the delay is in a) the
processing of the input data, and b) the SQL processing (I believe) of this
data against the master list.

mysql_select_db($database_selectData, $selectData);
$query_rsMaster = "SELECT * FROM tblmasterzip";
$rsMaster = mysql_query($query_rsMaster, $selectData) or die(mysql_error());
$row_rsMaster = mysql_fetch_assoc($rsMaster);
$totalRows_rsMaster = mysql_num_rows($rsMaster);

if (isset($_POST['Submit'])) {
$inputstring=$_POST['upload'];
if($inputstring=='') { $error=2;
header("Location:
s_upload-zips-failure.php?type=$error&record=$contactRecord");
exit; }
if(strpos($inputstring,',')) { $error=3;
header("Location:
s_upload-zips-failure.php?type=$error&record=$contactRecord");
exit; }
$zipArray=explode("\n",$inputstring);
$i=0;
foreach($zipArray as $key => $value) {
$zipArray[$i]=substr($value,0,5);
$i++;
}
$totalUpload=($i);


if($inputstring!='') {
// create master list
$masterList=array();
do {
$masterList[] = $row_rsMaster['masterZip'];

} while ($row_rsMaster = mysql_fetch_assoc($rsMaster));

// create array of unique zips from $zipArray
$clientUnique=array_unique($zipArray);
$numUnique = count($clientUnique);
$numDupes = $totalUpload - $numUnique;

//create array of overlaps between master list and deduped upload
$overlaps = array_intersect($masterList,$clientUnique);
$numOverlaps = count($overlaps);

//calculate percentage overlapping Master
$percentOverlapMaster = count($overlaps)/count($masterList)*100;

// round percentage to 1 decimal place and add percent sign
$percentOverlapMaster = number_format($percentOverlapMaster,1)."%";

//calculate percentage of upload that overlap
$percentOverlapUpload = count($overlaps)/$numUnique*100;

// round percentage to 1 decimal place and add percent sign
$percentOverlapUpload = number_format($percentOverlapUpload,1)."%";

So - I'm not so sure I see an opportunity to do something while that is
going on....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"crash" <crash@bcdcdigital.com> wrote in message
news:ehims2$1gq$1@forums.macromedia.com...
> do while
> show "Please Wait graphic
> until $ListVar !empty?
>
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:ehilbo$srm$1@forums.macromedia.com...
>>I have a page which allows you to paste in a potentially large list of zip
>>codes.
>>
>> When you submit this page, the list is de-duped, and then checked against
>> a table of ~22,000 zips for matches.
>>
>> Where and how in this process could I bring up a "Please Wait" message
>> while the transaction is being completed?
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
hmmm....looking....thinking.

interesting.



During the processing of the data it looks to me that you have the ability
to put something in. This will obviously mean, however, that your SQL
statement will have already been executed, so it won't address (B).

For testing, you could put a quick "waiting" function to first check and see
if you can catch any delays....

but how to get it if the variable has the *correct* info, not just 1/2 the
info? You would have to match numbers


do{
echo " please wait";
}while(number of overlaps+number of unique <= Total number of records ($i, I
think?))


let me think a bit further on this


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ehineh$28a$1@forums.macromedia.com...
>I just don't see how that could work, honestly - the delay is in a) the
>processing of the input data, and b) the SQL processing (I believe) of this
>data against the master list.
>
> mysql_select_db($database_selectData, $selectData);
> $query_rsMaster = "SELECT * FROM tblmasterzip";
> $rsMaster = mysql_query($query_rsMaster, $selectData) or
> die(mysql_error());
> $row_rsMaster = mysql_fetch_assoc($rsMaster);
> $totalRows_rsMaster = mysql_num_rows($rsMaster);
>
> if (isset($_POST['Submit'])) {
> $inputstring=$_POST['upload'];
> if($inputstring=='') { $error=2;
> header("Location:
> s_upload-zips-failure.php?type=$error&record=$contactRecord");
> exit; }
> if(strpos($inputstring,',')) { $error=3;
> header("Location:
> s_upload-zips-failure.php?type=$error&record=$contactRecord");
> exit; }
> $zipArray=explode("\n",$inputstring);
> $i=0;
> foreach($zipArray as $key => $value) {
> $zipArray[$i]=substr($value,0,5);
> $i++;
> }
> $totalUpload=($i);
>
>
> if($inputstring!='') {
> // create master list
> $masterList=array();
> do {
> $masterList[] = $row_rsMaster['masterZip'];
>
> } while ($row_rsMaster = mysql_fetch_assoc($rsMaster));


>
> // create array of unique zips from $zipArray
> $clientUnique=array_unique($zipArray);
> $numUnique = count($clientUnique);
> $numDupes = $totalUpload - $numUnique;
>
> //create array of overlaps between master list and deduped upload
> $overlaps = array_intersect($masterList,$clientUnique);
> $numOverlaps = count($overlaps);
>
> //calculate percentage overlapping Master
> $percentOverlapMaster = count($overlaps)/count($masterList)*100;
>
> // round percentage to 1 decimal place and add percent sign
> $percentOverlapMaster = number_format($percentOverlapMaster,1)."%";
>
> //calculate percentage of upload that overlap
> $percentOverlapUpload = count($overlaps)/$numUnique*100;
>
> // round percentage to 1 decimal place and add percent sign
> $percentOverlapUpload = number_format($percentOverlapUpload,1)."%";
>
> So - I'm not so sure I see an opportunity to do something while that is
> going on....


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:

> So - I'm not so sure I see an opportunity to do something while that
> is going on....

Input page -> processing page -> finished page

On processing page, before you hit the code which does the actual processing:

<h1 class="Pablo">Hold tight, you hopeless git!</h1>

You could even put in a pointless counter.

At the end of the code which does the processing, throw anything so
that it completes the page. I'm thinking along these lines:

<?php
$output = "<noscript>\n";
$output .= "<a href='finishedPage.php'>Processing done; see results</a>\n";
$output .= "</noscript>\n";
echo $output;
?>

And do a redirect onload:

<body onload="window.location='finishedPage.php'">

Untested; use at your own risk.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
LOL - OK, see, I was hoping to avoid breaking it into separate pages like
that, but that way looks like it'll work....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns9865820E1614AmakowiecatnycapdotrE@216.104.212.96...
> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>
>> So - I'm not so sure I see an opportunity to do something while that
>> is going on....
>
> Input page -> processing page -> finished page
>
> On processing page, before you hit the code which does the actual
> processing:
>
> <h1 class="Pablo">Hold tight, you hopeless git!</h1>
>
> You could even put in a pointless counter.
>
> At the end of the code which does the processing, throw anything so
> that it completes the page. I'm thinking along these lines:
>
> <?php
> $output = "<noscript>\n";
> $output .= "<a href='finishedPage.php'>Processing done; see
> results</a>\n";
> $output .= "</noscript>\n";
> echo $output;
> ?>
>
> And do a redirect onload:
>
> <body onload="window.location='finishedPage.php'">
>
> Untested; use at your own risk.
>
> --
> Joe Makowiec
> http://makowiec.net/
> Email: http://makowiec.net/email.php


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:

> LOL - OK, see, I was hoping to avoid breaking it into separate pages
> like that, but that way looks like it'll work....

You can just re-call the page which processes the form data, and check
whether or not the processing has been done:

<?php
if ($dataWasProcessed) {
echo '<h1>Thank you for using Murray's Data Processing</h1>';
} else {
// Code to process form goes here
// Code to re-call page with $dataWasProcessed set goes here
// How to set that var left as an exercise for the reader
}

Personally, I find that it troubles my mind less to do such things in
separate files.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
Thanks, Joe. This troubles my mind, either way!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>
>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>> like that, but that way looks like it'll work....
>
> You can just re-call the page which processes the form data, and check
> whether or not the processing has been done:
>
> <?php
> if ($dataWasProcessed) {
> echo '<h1>Thank you for using Murray's Data Processing</h1>';
> } else {
> // Code to process form goes here
> // Code to re-call page with $dataWasProcessed set goes here
> // How to set that var left as an exercise for the reader
> }
>
> Personally, I find that it troubles my mind less to do such things in
> separate files.
>
> --
> Joe Makowiec
> http://makowiec.net/
> Email: http://makowiec.net/email.php


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
couldn't you just have it reload the same page (isn't it anyway?).


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ehjbfm$qqe$1@forums.macromedia.com...
> Thanks, Joe. This troubles my mind, either way!
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>
>>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>>> like that, but that way looks like it'll work....
>>
>> You can just re-call the page which processes the form data, and check
>> whether or not the processing has been done:
>>
>> <?php
>> if ($dataWasProcessed) {
>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>> } else {
>> // Code to process form goes here
>> // Code to re-call page with $dataWasProcessed set goes here
>> // How to set that var left as an exercise for the reader
>> }
>>
>> Personally, I find that it troubles my mind less to do such things in
>> separate files.
>>
>> --
>> Joe Makowiec
>> http://makowiec.net/
>> Email: http://makowiec.net/email.php
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2006 Oct 23, 2006
But then there's no opportunity to slam the waiting message up there....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"crash" <crash@bcdcdigital.com> wrote in message
news:ehjbhr$qse$1@forums.macromedia.com...
> couldn't you just have it reload the same page (isn't it anyway?).
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:ehjbfm$qqe$1@forums.macromedia.com...
>> Thanks, Joe. This troubles my mind, either way!
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>
>>>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>>>> like that, but that way looks like it'll work....
>>>
>>> You can just re-call the page which processes the form data, and check
>>> whether or not the processing has been done:
>>>
>>> <?php
>>> if ($dataWasProcessed) {
>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>> } else {
>>> // Code to process form goes here
>>> // Code to re-call page with $dataWasProcessed set goes here
>>> // How to set that var left as an exercise for the reader
>>> }
>>>
>>> Personally, I find that it troubles my mind less to do such things in
>>> separate files.
>>>
>>> --
>>> Joe Makowiec
>>> http://makowiec.net/
>>> Email: http://makowiec.net/email.php
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
THis is how I see the process, I guess I might not be following you:

1. User goes to form page, to submit zips.
2. User completes form, hits upload
3. Page refreshes itself, publishes please wait message (ie, could you not
put an if [form submit] is true, echo this image, then begin the sql
calculations)
4. As the calculations are finished, toggle visibility of image off, toggle
div with results on.

If that doesn't work, sorry, I completely misunderstand and will leave you
be.

"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ehjgeo$2uh$1@forums.macromedia.com...
> But then there's no opportunity to slam the waiting message up there....
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:ehjbhr$qse$1@forums.macromedia.com...
>> couldn't you just have it reload the same page (isn't it anyway?).
>>
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:ehjbfm$qqe$1@forums.macromedia.com...
>>> Thanks, Joe. This troubles my mind, either way!
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>>
>>>>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>>>>> like that, but that way looks like it'll work....
>>>>
>>>> You can just re-call the page which processes the form data, and check
>>>> whether or not the processing has been done:
>>>>
>>>> <?php
>>>> if ($dataWasProcessed) {
>>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>>> } else {
>>>> // Code to process form goes here
>>>> // Code to re-call page with $dataWasProcessed set goes here
>>>> // How to set that var left as an exercise for the reader
>>>> }
>>>>
>>>> Personally, I find that it troubles my mind less to do such things in
>>>> separate files.
>>>>
>>>> --
>>>> Joe Makowiec
>>>> http://makowiec.net/
>>>> Email: http://makowiec.net/email.php
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
I can do that. I'm worried about passing the zips array (which has been
exploded from the input) to the process page. How would I best do that?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"crash" <crash@bcdcdigital.com> wrote in message
news:ehl614$58d$1@forums.macromedia.com...
> THis is how I see the process, I guess I might not be following you:
>
> 1. User goes to form page, to submit zips.
> 2. User completes form, hits upload
> 3. Page refreshes itself, publishes please wait message (ie, could you not
> put an if [form submit] is true, echo this image, then begin the sql
> calculations)
> 4. As the calculations are finished, toggle visibility of image off,
> toggle div with results on.
>
> If that doesn't work, sorry, I completely misunderstand and will leave you
> be.
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:ehjgeo$2uh$1@forums.macromedia.com...
>> But then there's no opportunity to slam the waiting message up there....
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "crash" <crash@bcdcdigital.com> wrote in message
>> news:ehjbhr$qse$1@forums.macromedia.com...
>>> couldn't you just have it reload the same page (isn't it anyway?).
>>>
>>>
>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>> news:ehjbfm$qqe$1@forums.macromedia.com...
>>>> Thanks, Joe. This troubles my mind, either way!
>>>>
>>>> --
>>>> Murray --- ICQ 71997575
>>>> Adobe Community Expert
>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>> ==================
>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>> ==================
>>>>
>>>>
>>>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>>>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>>>
>>>>>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>>>>>> like that, but that way looks like it'll work....
>>>>>
>>>>> You can just re-call the page which processes the form data, and check
>>>>> whether or not the processing has been done:
>>>>>
>>>>> <?php
>>>>> if ($dataWasProcessed) {
>>>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>>>> } else {
>>>>> // Code to process form goes here
>>>>> // Code to re-call page with $dataWasProcessed set goes here
>>>>> // How to set that var left as an exercise for the reader
>>>>> }
>>>>>
>>>>> Personally, I find that it troubles my mind less to do such things in
>>>>> separate files.
>>>>>
>>>>> --
>>>>> Joe Makowiec
>>>>> http://makowiec.net/
>>>>> Email: http://makowiec.net/email.php
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
summation:
In your SQL, at the bottom of the statement, you should be able to put a
javascript call that will re-structure the visibility of the elements
according to the variabels returned by the SQL. One page, reloaded once.

My switch statement got a little convoluted. You should be able to just set
one variable, or set one number and go from there (ie, if $v=3, hide other
two), but i've not had any coffee or caffinne yet.

===========================================================
Is the code in the third message on this post from the originating page? I
took that it was, that it had a form, that form reloaded the same page?

If so, you should be able to put a switch in there:

switch($stage){
case "upload":
#this should be once the form has been completed
$status=1; //status equal one, two or threee is one method you could
use.
break;
case "complete"://you could aalso set a variable for each section, i
think the one above is better, but this one made more sense right now, lol.
#show the results,
$resultsState="show";
$formState="hide";
$waitState="hide";
break;
case default:
#empty, or first state, show the form to upload the data
$live="form";
break;
}

then, below:

<div id="form" class="<?php echo $formState ?>">
<form>
whatever
</form>
</div>

<div id="wait" class="<?php echo $waitState ?>">
<img src="img/wait.gif" />
</div>

<div id="results" class="<?php echo $resultsState ?>">
<h1>Results</h1>
<p>stuff here</p>
</div>






"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ehl6ec$5mf$1@forums.macromedia.com...
>I can do that. I'm worried about passing the zips array (which has been
>exploded from the input) to the process page. How would I best do that?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:ehl614$58d$1@forums.macromedia.com...
>> THis is how I see the process, I guess I might not be following you:
>>
>> 1. User goes to form page, to submit zips.
>> 2. User completes form, hits upload
>> 3. Page refreshes itself, publishes please wait message (ie, could you
>> not put an if [form submit] is true, echo this image, then begin the sql
>> calculations)
>> 4. As the calculations are finished, toggle visibility of image off,
>> toggle div with results on.
>>
>> If that doesn't work, sorry, I completely misunderstand and will leave
>> you be.
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:ehjgeo$2uh$1@forums.macromedia.com...
>>> But then there's no opportunity to slam the waiting message up there....
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "crash" <crash@bcdcdigital.com> wrote in message
>>> news:ehjbhr$qse$1@forums.macromedia.com...
>>>> couldn't you just have it reload the same page (isn't it anyway?).
>>>>
>>>>
>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>> news:ehjbfm$qqe$1@forums.macromedia.com...
>>>>> Thanks, Joe. This troubles my mind, either way!
>>>>>
>>>>> --
>>>>> Murray --- ICQ 71997575
>>>>> Adobe Community Expert
>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>> ==================
>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>> ==================
>>>>>
>>>>>
>>>>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>>>>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>>>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>>>>
>>>>>>> LOL - OK, see, I was hoping to avoid breaking it into separate pages
>>>>>>> like that, but that way looks like it'll work....
>>>>>>
>>>>>> You can just re-call the page which processes the form data, and
>>>>>> check
>>>>>> whether or not the processing has been done:
>>>>>>
>>>>>> <?php
>>>>>> if ($dataWasProcessed) {
>>>>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>>>>> } else {
>>>>>> // Code to process form goes here
>>>>>> // Code to re-call page with $dataWasProcessed set goes here
>>>>>> // How to set that var left as an exercise for the reader
>>>>>> }
>>>>>>
>>>>>> Personally, I find that it troubles my mind less to do such things in
>>>>>> separate files.
>>>>>>
>>>>>> --
>>>>>> Joe Makowiec
>>>>>> http://makowiec.net/
>>>>>> Email: http://makowiec.net/email.php
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
you could also just use the PVII script on body load to show the appropriate
div - you could change the name in the" with the appropriate switch
statement.

It's my belief that some of your html elements will be able to show while
others are still being built. I guess I could be wrong on this, but I think
practically I'm right (ie, you can see elements on my page building before
the page is completely done).

HTH,

Jon

"crash" <crash@bcdcdigital.com> wrote in message
news:ehl7po$7g4$1@forums.macromedia.com...
> summation:
> In your SQL, at the bottom of the statement, you should be able to put a
> javascript call that will re-structure the visibility of the elements
> according to the variabels returned by the SQL. One page, reloaded once.
>
> My switch statement got a little convoluted. You should be able to just
> set one variable, or set one number and go from there (ie, if $v=3, hide
> other two), but i've not had any coffee or caffinne yet.
>
> ===========================================================
> Is the code in the third message on this post from the originating page? I
> took that it was, that it had a form, that form reloaded the same page?
>
> If so, you should be able to put a switch in there:
>
> switch($stage){
> case "upload":
> #this should be once the form has been completed
> $status=1; //status equal one, two or threee is one method you could
> use.
> break;
> case "complete"://you could aalso set a variable for each section, i
> think the one above is better, but this one made more sense right now,
> lol.
> #show the results,
> $resultsState="show";
> $formState="hide";
> $waitState="hide";
> break;
> case default:
> #empty, or first state, show the form to upload the data
> $live="form";
> break;
> }
>
> then, below:
>
> <div id="form" class="<?php echo $formState ?>">
> <form>
> whatever
> </form>
> </div>
>
> <div id="wait" class="<?php echo $waitState ?>">
> <img src="img/wait.gif" />
> </div>
>
> <div id="results" class="<?php echo $resultsState ?>">
> <h1>Results</h1>
> <p>stuff here</p>
> </div>
>
>
>
>
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:ehl6ec$5mf$1@forums.macromedia.com...
>>I can do that. I'm worried about passing the zips array (which has been
>>exploded from the input) to the process page. How would I best do that?
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "crash" <crash@bcdcdigital.com> wrote in message
>> news:ehl614$58d$1@forums.macromedia.com...
>>> THis is how I see the process, I guess I might not be following you:
>>>
>>> 1. User goes to form page, to submit zips.
>>> 2. User completes form, hits upload
>>> 3. Page refreshes itself, publishes please wait message (ie, could you
>>> not put an if [form submit] is true, echo this image, then begin the sql
>>> calculations)
>>> 4. As the calculations are finished, toggle visibility of image off,
>>> toggle div with results on.
>>>
>>> If that doesn't work, sorry, I completely misunderstand and will leave
>>> you be.
>>>
>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>> news:ehjgeo$2uh$1@forums.macromedia.com...
>>>> But then there's no opportunity to slam the waiting message up
>>>> there....
>>>>
>>>> --
>>>> Murray --- ICQ 71997575
>>>> Adobe Community Expert
>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>> ==================
>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>> ==================
>>>>
>>>>
>>>> "crash" <crash@bcdcdigital.com> wrote in message
>>>> news:ehjbhr$qse$1@forums.macromedia.com...
>>>>> couldn't you just have it reload the same page (isn't it anyway?).
>>>>>
>>>>>
>>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>>> news:ehjbfm$qqe$1@forums.macromedia.com...
>>>>>> Thanks, Joe. This troubles my mind, either way!
>>>>>>
>>>>>> --
>>>>>> Murray --- ICQ 71997575
>>>>>> Adobe Community Expert
>>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>>> ==================
>>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>>> ==================
>>>>>>
>>>>>>
>>>>>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>>>>>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>>>>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>>>>>
>>>>>>>> LOL - OK, see, I was hoping to avoid breaking it into separate
>>>>>>>> pages
>>>>>>>> like that, but that way looks like it'll work....
>>>>>>>
>>>>>>> You can just re-call the page which processes the form data, and
>>>>>>> check
>>>>>>> whether or not the processing has been done:
>>>>>>>
>>>>>>> <?php
>>>>>>> if ($dataWasProcessed) {
>>>>>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>>>>>> } else {
>>>>>>> // Code to process form goes here
>>>>>>> // Code to re-call page with $dataWasProcessed set goes here
>>>>>>> // How to set that var left as an exercise for the reader
>>>>>>> }
>>>>>>>
>>>>>>> Personally, I find that it troubles my mind less to do such things
>>>>>>> in
>>>>>>> separate files.
>>>>>>>
>>>>>>> --
>>>>>>> Joe Makowiec
>>>>>>> http://makowiec.net/
>>>>>>> Email: http://makowiec.net/email.php
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
> you could also just use the PVII script on body load to show the
> appropriate div - you could change the name in the" with the appropriate
> switch statement.

Ew. Double ew.

I'm going to let it ride as is, until someone complains. Thanks for the
neurons, though. Do you need them back? Or I should say, "you DO need them
back"!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"crash" <crash@bcdcdigital.com> wrote in message
news:ehl8ic$8dk$1@forums.macromedia.com...
> you could also just use the PVII script on body load to show the
> appropriate div - you could change the name in the" with the appropriate
> switch statement.
>
> It's my belief that some of your html elements will be able to show while
> others are still being built. I guess I could be wrong on this, but I
> think practically I'm right (ie, you can see elements on my page building
> before the page is completely done).
>
> HTH,
>
> Jon
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:ehl7po$7g4$1@forums.macromedia.com...
>> summation:
>> In your SQL, at the bottom of the statement, you should be able to put a
>> javascript call that will re-structure the visibility of the elements
>> according to the variabels returned by the SQL. One page, reloaded once.
>>
>> My switch statement got a little convoluted. You should be able to just
>> set one variable, or set one number and go from there (ie, if $v=3, hide
>> other two), but i've not had any coffee or caffinne yet.
>>
>> ===========================================================
>> Is the code in the third message on this post from the originating page?
>> I took that it was, that it had a form, that form reloaded the same page?
>>
>> If so, you should be able to put a switch in there:
>>
>> switch($stage){
>> case "upload":
>> #this should be once the form has been completed
>> $status=1; //status equal one, two or threee is one method you could
>> use.
>> break;
>> case "complete"://you could aalso set a variable for each section, i
>> think the one above is better, but this one made more sense right now,
>> lol.
>> #show the results,
>> $resultsState="show";
>> $formState="hide";
>> $waitState="hide";
>> break;
>> case default:
>> #empty, or first state, show the form to upload the data
>> $live="form";
>> break;
>> }
>>
>> then, below:
>>
>> <div id="form" class="<?php echo $formState ?>">
>> <form>
>> whatever
>> </form>
>> </div>
>>
>> <div id="wait" class="<?php echo $waitState ?>">
>> <img src="img/wait.gif" />
>> </div>
>>
>> <div id="results" class="<?php echo $resultsState ?>">
>> <h1>Results</h1>
>> <p>stuff here</p>
>> </div>
>>
>>
>>
>>
>>
>>
>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>> news:ehl6ec$5mf$1@forums.macromedia.com...
>>>I can do that. I'm worried about passing the zips array (which has been
>>>exploded from the input) to the process page. How would I best do that?
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>> ==================
>>> http://www.dreamweavermx-templates.com - Template Triage!
>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "crash" <crash@bcdcdigital.com> wrote in message
>>> news:ehl614$58d$1@forums.macromedia.com...
>>>> THis is how I see the process, I guess I might not be following you:
>>>>
>>>> 1. User goes to form page, to submit zips.
>>>> 2. User completes form, hits upload
>>>> 3. Page refreshes itself, publishes please wait message (ie, could you
>>>> not put an if [form submit] is true, echo this image, then begin the
>>>> sql calculations)
>>>> 4. As the calculations are finished, toggle visibility of image off,
>>>> toggle div with results on.
>>>>
>>>> If that doesn't work, sorry, I completely misunderstand and will leave
>>>> you be.
>>>>
>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>> news:ehjgeo$2uh$1@forums.macromedia.com...
>>>>> But then there's no opportunity to slam the waiting message up
>>>>> there....
>>>>>
>>>>> --
>>>>> Murray --- ICQ 71997575
>>>>> Adobe Community Expert
>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>> ==================
>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>>>>> ==================
>>>>>
>>>>>
>>>>> "crash" <crash@bcdcdigital.com> wrote in message
>>>>> news:ehjbhr$qse$1@forums.macromedia.com...
>>>>>> couldn't you just have it reload the same page (isn't it anyway?).
>>>>>>
>>>>>>
>>>>>> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
>>>>>> news:ehjbfm$qqe$1@forums.macromedia.com...
>>>>>>> Thanks, Joe. This troubles my mind, either way!
>>>>>>>
>>>>>>> --
>>>>>>> Murray --- ICQ 71997575
>>>>>>> Adobe Community Expert
>>>>>>> (If you *MUST* email me, don't LAUGH when you do so!)
>>>>>>> ==================
>>>>>>> http://www.dreamweavermx-templates.com - Template Triage!
>>>>>>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>>>>>>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>>>>>>> http://www.macromedia.com/support/search/ - Macromedia (MM)
>>>>>>> Technotes
>>>>>>> ==================
>>>>>>>
>>>>>>>
>>>>>>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>>>>>>> news:Xns9865842B0545AmakowiecatnycapdotrE@216.104.212.96...
>>>>>>>> On 23 Oct 2006 in macromedia.dreamweaver.appdev, Murray *ACE*
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> LOL - OK, see, I was hoping to avoid breaking it into separate
>>>>>>>>> pages
>>>>>>>>> like that, but that way looks like it'll work....
>>>>>>>>
>>>>>>>> You can just re-call the page which processes the form data, and
>>>>>>>> check
>>>>>>>> whether or not the processing has been done:
>>>>>>>>
>>>>>>>> <?php
>>>>>>>> if ($dataWasProcessed) {
>>>>>>>> echo '<h1>Thank you for using Murray's Data Processing</h1>';
>>>>>>>> } else {
>>>>>>>> // Code to process form goes here
>>>>>>>> // Code to re-call page with $dataWasProcessed set goes here
>>>>>>>> // How to set that var left as an exercise for the reader
>>>>>>>> }
>>>>>>>>
>>>>>>>> Personally, I find that it troubles my mind less to do such things
>>>>>>>> in
>>>>>>>> separate files.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Joe Makowiec
>>>>>>>> http://makowiec.net/
>>>>>>>> Email: http://makowiec.net/email.php
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
hahaha - no. I do have diverticulosis. (or itis, it really just depends on
how close to deer season it is, hehehe).

http://groups.google.com/group/macromedia.dreamweaver/browse_thread/thread/eee933fd78800f3/6b265c37a...


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2006 Oct 24, 2006
I've done this several ways in the past.

The most reliable way is to use javascript to throw up an animated gif with a running man or something (in a previously invisible layer/div), and don't flush your output for the SQL page until the query is done.

Option two takes the opposite approach, and is dependent on page structure. What you do is flush all of your content, start processing, and flush again when you are done. You can actually make a working progress bar of sorts by periodically echoing something like:

<style>div.progress {width:55%;}</style>

as your process runs, however browsers can be kind of finnicky about this kind of thing. I used it for a PHP script that was recursively performing token replacements and stripping whitespace from something like 2500 files in a directory (don't ask).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
LATEST
Thanks for the suggestion. I think that's the way to go....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"VVebbie" <webforumsuser@macromedia.com> wrote in message
news:ehler7$g88$1@forums.macromedia.com...
> I've done this several ways in the past.
>
> The most reliable way is to use javascript to throw up an animated gif
> with a
> running man or something (in a previously invisible layer/div), and don't
> flush
> your output for the SQL page until the query is done.
>
> Option two takes the opposite approach, and is dependent on page
> structure.
> What you do is flush all of your content, start processing, and flush
> again
> when you are done. You can actually make a working progress bar of sorts
> by
> periodically echoing something like:
>
> <style>div.progress {width:55%;}</style>
>
> as your process runs, however browsers can be kind of finnicky about this
> kind
> of thing. I used it for a PHP script that was recursively performing token
> replacements and stripping whitespace from something like 2500 files in a
> directory (don't ask).
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines