How to delete periodically_call_remote from the DOM

I have set up a periodically call remote on a page. To get it to stop
calling I have made it reliant on a hidden element being populated
with some value, this is all working.

But I want to actually delete the script from the DOM based on a
decision from the server.

What would be the best way to go about doing this?

Thanks

Regards

Mikel

that should be possible with rjs, shouldnt it?
like that in the controller:
page[‘updater’].replace ‘’

<%= rails updater helper %>

Hi Mikel,

Mikel wrote:

I have set up a periodically call remote on a page. To get it to stop
calling I have made it reliant on a hidden element being populated
with some value, this is all working.

But I want to actually delete the script from the DOM based on a
decision from the server.

What would be the best way to go about doing this?

One way to handle it would be to wrap the periodically_call_remote with
a

<div id="unique_id> and use RJS. Either page.replace or page.replace_html depending on whether you wanted to get rid of the div entirely or just some of what's inside. <p>hth,<br> Bill</p>

One way to handle it would be to wrap the periodically_call_remote with a

http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

Mikel wrote:

I have set up a periodically call remote on a page. To get it to stop
calling I have made it reliant on a hidden element being populated
with some value, this is all working.

But I want to actually delete the script from the DOM based on a
decision from the server.

What would be the best way to go about doing this?

I answered this a couple days ago. Use Google G. and look for
periodically_call_remote and my street name.


Phlip
http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

Thanks,

Regards

Mikel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs