AJAX/xmlHTTPrequest question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

AJAX/xmlHTTPrequest question

Tim Taplin
So I'm bravely dipping a toe into the AJAX waters and of course my  
first idea seems to be difficult to accomplish.

I'm working from the code sample in TOTW from last summer.

I'm processing a series of image files and I'd like to reload a div  
after each image process is complete not only to provide status but  
also to get around the timeout in lasso ( I know I can manually  
change that timeout.)

so I have a code that checks to see if there are any files left to be  
processed.

Files in Directory: [$dirlength]
        [if: $dirlength !=0]
                [noprocess]
                <script language="JavaScript">
                                loadURL('directory.lasso')
                </script>
                [/noprocess]
        [/if]
This loads reloads the div once as expected.  I'm trying to figure  
out how to put a trigger of some sort into my javascript to perform  
the same action each time the div is reloaded.  I've tried several  
methods of integrating this into the loadURL function or into the  
directory.lasso code with no success.

Thanks for any help.

Tim Taplin


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: AJAX/xmlHTTPrequest question

decorior
Two approaches though a combination is probably the desired end result.

1. You can use use the Ajax.Periodical updater to fire off a server  
process to check the status of the upload.
2. Your server file fires itself when it is done, and then update the  
page with the status until it is finished.

I am sure I will need to expand on this but it is a start!

Deco


On May 11, 2006, at 9:59 AM, Tim Taplin wrote:

> So I'm bravely dipping a toe into the AJAX waters and of course my  
> first idea seems to be difficult to accomplish.
>
> I'm working from the code sample in TOTW from last summer.
>
> I'm processing a series of image files and I'd like to reload a div  
> after each image process is complete not only to provide status but  
> also to get around the timeout in lasso ( I know I can manually  
> change that timeout.)
>
> so I have a code that checks to see if there are any files left to  
> be processed.
>
> Files in Directory: [$dirlength]
> [if: $dirlength !=0]
> [noprocess]
> <script language="JavaScript">
> loadURL('directory.lasso')
> </script>
> [/noprocess]
> [/if]
> This loads reloads the div once as expected.  I'm trying to figure  
> out how to put a trigger of some sort into my javascript to perform  
> the same action each time the div is reloaded.  I've tried several  
> methods of integrating this into the loadURL function or into the  
> directory.lasso code with no success.
>
> Thanks for any help.
>
> Tim Taplin
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: AJAX/xmlHTTPrequest question

Tim Taplin
In reply to this post by Tim Taplin
I've been trying to accomplish #2 with no success.

my javascript function call  is loadURL('directory.lasso')

do you mean that directory.lasso should have a loadURL
('directory.lasso') javascript block ?  Will that allow for the load  
to complete the status update each time?

That would be my preferred path but it seems that it will continue  
processing without sending content back to the javascript function.

tim

On May 11, 2006, at 10:52 AM, Deco Rior wrote:

> Two approaches though a combination is probably the desired end  
> result.
>
> 1. You can use use the Ajax.Periodical updater to fire off a server  
> process to check the status of the upload.
> 2. Your server file fires itself when it is done, and then update  
> the page with the status until it is finished.
>
> I am sure I will need to expand on this but it is a start!
>
> Deco
>
>
> On May 11, 2006, at 9:59 AM, Tim Taplin wrote:
>
>> So I'm bravely dipping a toe into the AJAX waters and of course my  
>> first idea seems to be difficult to accomplish.
>>
>> I'm working from the code sample in TOTW from last summer.
>>
>> I'm processing a series of image files and I'd like to reload a  
>> div after each image process is complete not only to provide  
>> status but also to get around the timeout in lasso ( I know I can  
>> manually change that timeout.)
>>
>> so I have a code that checks to see if there are any files left to  
>> be processed.
>>
>> Files in Directory: [$dirlength]
>> [if: $dirlength !=0]
>> [noprocess]
>> <script language="JavaScript">
>> loadURL('directory.lasso')
>> </script>
>> [/noprocess]
>> [/if]
>> This loads reloads the div once as expected.  I'm trying to figure  
>> out how to put a trigger of some sort into my javascript to  
>> perform the same action each time the div is reloaded.  I've tried  
>> several methods of integrating this into the loadURL function or  
>> into the directory.lasso code with no success.
>>
>> Thanks for any help.
>>
>> Tim Taplin
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription: http://www.listsearch.com/ 
>> lassotalk.lasso?manage
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage
>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: AJAX/xmlHTTPrequest question

decorior
In reply to this post by Tim Taplin
So on my main page I setup an AJAX server call (e.g. loadImages.lasso)

When this is finished the last step of this file will call itself  
again and write a status message to a DIV  on the main calling page.

So the load images file does not get called from the main page only  
the ajax called server page....

Deco


On May 11, 2006, at 12:24 PM, Tim Taplin wrote:

> I've been trying to accomplish #2 with no success.
>
> my javascript function call  is loadURL('directory.lasso')
>
> do you mean that directory.lasso should have a loadURL
> ('directory.lasso') javascript block ?  Will that allow for the  
> load to complete the status update each time?
>
> That would be my preferred path but it seems that it will continue  
> processing without sending content back to the javascript function.
>
> tim
>
> On May 11, 2006, at 10:52 AM, Deco Rior wrote:
>
>> Two approaches though a combination is probably the desired end  
>> result.
>>
>> 1. You can use use the Ajax.Periodical updater to fire off a  
>> server process to check the status of the upload.
>> 2. Your server file fires itself when it is done, and then update  
>> the page with the status until it is finished.
>>
>> I am sure I will need to expand on this but it is a start!
>>
>> Deco
>>
>>
>> On May 11, 2006, at 9:59 AM, Tim Taplin wrote:
>>
>>> So I'm bravely dipping a toe into the AJAX waters and of course  
>>> my first idea seems to be difficult to accomplish.
>>>
>>> I'm working from the code sample in TOTW from last summer.
>>>
>>> I'm processing a series of image files and I'd like to reload a  
>>> div after each image process is complete not only to provide  
>>> status but also to get around the timeout in lasso ( I know I can  
>>> manually change that timeout.)
>>>
>>> so I have a code that checks to see if there are any files left  
>>> to be processed.
>>>
>>> Files in Directory: [$dirlength]
>>> [if: $dirlength !=0]
>>> [noprocess]
>>> <script language="JavaScript">
>>> loadURL('directory.lasso')
>>> </script>
>>> [/noprocess]
>>> [/if]
>>> This loads reloads the div once as expected.  I'm trying to  
>>> figure out how to put a trigger of some sort into my javascript  
>>> to perform the same action each time the div is reloaded.  I've  
>>> tried several methods of integrating this into the loadURL  
>>> function or into the directory.lasso code with no success.
>>>
>>> Thanks for any help.
>>>
>>> Tim Taplin
>>>
>>>
>>> ------------------------------
>>> Lasso Support: http://support.omnipilot.com/
>>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>>> Manage your list subscription: http://www.listsearch.com/ 
>>> lassotalk.lasso?manage
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription: http://www.listsearch.com/ 
>> lassotalk.lasso?manage
>>
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage