Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
Find out page edit lock status with Ajax
Thomas W #1
Member for a month · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Find out page edit lock status with Ajax
Is there any GET request I can make from JavaScript to find out if a specific page is locked by someone – without having to add something on the server side?
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4544 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
You can get the lock status from the checklock function:
https://xref.dokuwiki.org/reference/dokuwiki/inc/common.ph…

You can't check lock status from the browser without an ajax call, which requires server side access.  For this you will need a plugin (preferably) or a server side script called from your ajax function.  For the plugin, see the ajax_call_unknown event and the example linked to at the bottom of that page.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Thomas W #3
Member for a month · 2 posts
Group memberships: Members
Show profile · Link to this post
Great, that looks simple to do.

BTW, thanks so much for maintaining the ckgedit plugin – WYSIWYG was a sine qua non for my colleagues.  (And I'm happy about the nice CKEditor API.)
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-03-20, 02:18:28 (UTC +01:00)