Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Live editable text on a website?

Status
Not open for further replies.
Joined
Apr 30, 2007
Posts
3,627
Reaction score
28
I'm looking to show text on a site and have it updateable live from my PC without the need of the viewer having to refresh tha page. (in a box or panel doesn't matter how)

I've hjad a quick scan on G but nothing stands out.

Any help would be FAB! :cool:
 
I want to edit text and then to be reflected live (within seconds anyways) to viewers.

I'm guessing that demo is a logged in admin view.?
 
I use Contribute CS4 for doing this. Possibly not exactly what you're after because it requires you to update, but it does the job, sort of!
 
It's prob going to be an ajax script or similar to achieve this.

I want a line of text to say "1234567890" and then for me to change something and then say "abcdefghijk" as if by magic!

I will be using WordPress so it might even be a plugin that does it. Maybe :rolleyes:

Cheers Guys!!! :cool:

Any more?
 
Would have to be some sort of applet like the old days and like widgets and chat help things use. I'm sure there is something you can manipulate.

Does it have to be indexable?
 
No you were right, ajax is best :confused:

Here is the code you will need.

Update Part Of A Page Without Refreshing?

It would involve a lot of calls though, to show live changes, say you want to only change it a few minutes a day, the page would be calling up ever few milliseconds. I suppose you could just change this prior to you needing tomake live changes though and then suspend it once you have finished.
 
Last edited:
Thanks for that link!

That did seem a good way to start with but is a bit over kill for what I want.

Might have to get a programmer to write a WP plugin for me ;)
 
More work than I thought you wanted, but that is excellent.

North West people are just so smart, wouldn't mind buying a few shares in that guy, he's a clever man.
 
Although he's pushing to use it for live events, tweaked a little it can just show one line of text which when edited like he did, will update live.

Spot on plugin that and I'm sure a few people on here will find uses for it.

Yes a very clever man from York!

Im a happy bunny, it might even deserve a Blog post and donation from me tomorrow. :D
 
Looking into this a bit more and ity's not just a case of adding the plugin and a config file. You need to set this on the server it's running on too. :rolleyes: Meteor
 
Quick any easy way is to have a script you use to add your text to a database (or overwrite a row in the db if you want less server resources but can get rid of any ability to go back). Then use Ajax to query the db and bring the latest text.

Shouldnt be that hard, though i havent ever integrated something like that into WP.
 
Well not 100% with doing that and if it's not too hard anyone here care to have a bash for a donation? Jimm ;)

Pref as a wordpress CMS plugin!!
 
Last edited:
1) Get a copy of prototype.js from Prototype JavaScript framework: Easy Ajax and DOM manipulation for dynamic web applications and include on your page in the <head> tag.

<script language="javascript" src="./prototype.js"></script>

2) Create a div on your page
Code:
<div id="mymessage"></div>

3) Before the </body> tag put something like this:

Code:
<script language="javascript">
function update_message(){
var url = 'mymessage.php';
var pars = '';
var target = 'mymessage';
var myAjax = new Ajax.Updater(target, url, {	method: 'get', parameters: pars});

setTimeout("update_message();",1000);
}

update_message();
</script>

4) Now every second (the 1000 part) the div will update with whatever mymessage.php is. Now you just need to add some code in mymessage.php to read a file or pull the message from the database. (Or you could edit that directly file directly)

5) If not editing the file directly, write another control panel to edit the message in the file or update the database.

Hope this helps. There are more complicated ways but this is simple ;)
 
Thanks for that info dtm and also the offer jimm (very welcome!). Tried the above but no luck :( (prob down to me)

I may need my hand holding a lttle or a demo in place and hand holding LOL
 
I'll put together a demo. Will post details soon.

Thanks for that info dtm and also the offer jimm (very welcome!). Tried the above but no luck :( (prob down to me)

I may need my hand holding a lttle or a demo in place and hand holding LOL
 
FAB! This would make a good WordPress plugin like the Live Blogging one. ;)

Maybe using ID's to have multiple ones.
 
FAB! This would make a good WordPress plugin like the Live Blogging one. ;)

Maybe using ID's to have multiple ones.

I've put this together very very quickly. Ideally you want to lock away the edit features so that only you can get at them.

Demo here: AJAX Message Demo for golddiggerguy

Try opening two web browsers so you can change from one and view the update on the other.

Download files here: http://cloudpowered.co.uk/message-demo/message-demo.zip

You will need to alter the permissions on message.txt in /data/ to allow writing to make it work on your hosting. (chmod 666)
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom