Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-03-27 09:22:21
- sereal
- Member
- From: Indonesia
- Registered: 2010-02-18
- Posts: 55
[ask] comment form submission on a single div
hi,
Is it possible to make the comment form submission refreshed in a single Div instead of the whole page after users click the preview / submit button ?
I plan to use this idea because I’ve made the comment section on a tabbed structure, everytime I click the preview / submit – the whole page always refreshed and going back to the article tab. I need to make the comment submission displaying dynamicaly by refreshing in a single Div method after clicking.
I think jQuery and Ajax will be able to handle this, but is this attempt require to tweaking the TXP core ?
which core files should I have to pay attention to, or maybe there’s already a solution present here which I can’t find to read on
please advise.
thanks
Last edited by sereal (2010-03-27 09:53:09)
$(mydocument).notyetready(function() {});
dowebsitesneedtolookexactlythesameineverybrowser ?
Offline
#2 2010-03-27 18:11:20
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: [ask] comment form submission on a single div
I’d use smd_if in order to invoke the required jQuery code snippet.
<txp:smd_if field="urlvar:commented" operator="eq" value="1">
Here goes the code you want to display after a comment was sent.
<txp:else />
Put the jQuery snippet for the default tab here.
</txp:smd_if>
Even if I mixed up things or oversimplified this snippet will help one or the other way.
Last edited by uli (2010-03-27 18:12:39)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2010-03-27 18:47:11
- sereal
- Member
- From: Indonesia
- Registered: 2010-02-18
- Posts: 55
Re: [ask] comment form submission on a single div
I’ll give it a try Uli
thank you
$(mydocument).notyetready(function() {});
dowebsitesneedtolookexactlythesameineverybrowser ?
Offline