Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2013-09-03 02:47:29
- piyashrija
- Member
- Registered: 2012-05-17
- Posts: 30
javascript and textpattern tag
Hi
I am currently using jquery mobile
how can i do something like
$(document).on("pagebeforeshow", "#singlepage", function(e, data){
testval = $.mobile.pageData.eid;
$("#pagecontent").html('<txp:article_custom id="'+testval+'"');
})
I also used
$("#pagecontent").html("<txp:php>echo str_replace(array("'", '"', '&', "\r", "\t", "\b", "\f", "\n"), array("\'", '\"', '\&', "\\\r", "\\\t", "\\\b", "\\\f", "\\\n"),article_custom(array('wraptag'=>'ol','break'=>'li','limit'=>'20','id'=>'433')));</txp:php>")
instead of
$("#pagecontent").html('<txp:article_custom id="'+testval+'"');
That works fine but id is static. how to insert testval
Currently there is javascript error : unterminated string literal
Any help appreciated
Thanks
Last edited by piyashrija (2013-09-03 03:28:21)
Offline
#2 2013-09-03 06:30:44
- piyashrija
- Member
- Registered: 2012-05-17
- Posts: 30
Re: javascript and textpattern tag
i got this solve by sending to external page thanks
Offline
Pages: 1