Skip to main content

Use innerHTML instead of document.write how to replace [closed]

Please i need to use innerHTML instead of document.write i try to do it but i fail

<b:includable id='latestPosts'>
<div id='latestPosts'>
<div class='box-title-related'><h4 class='title'><svg aria-hidden='true' height='1em' preserveAspectRatio='xMidYMid meet' role='img' style='vertical-align: -0.125em;' viewBox='0 0 128 128' width='1em' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><radialGradient cx='68.884' cy='124.296' gradientTransform='matrix(-1 -.00434 -.00713 1.6408 131.986 -79.345)' gradientUnits='userSpaceOnUse' id='ssvg-id-firea' r='70.587'><stop offset='.314' stop-color='#ff9800'/><stop offset='.662' stop-color='#ff6d00'/><stop offset='.972' stop-color='#f44336'/></radialGradient><path d='M35.56 40.73c-.57 6.08-.97 16.84 2.62 21.42c0 0-1.69-11.82 13.46-26.65c6.1-5.97 7.51-14.09 5.38-20.18c-1.21-3.45-3.42-6.3-5.34-8.29c-1.12-1.17-.26-3.1 1.37-3.03c9.86.44 25.84 3.18 32.63 20.22c2.98 7.48 3.2 15.21 1.78 23.07c-.9 5.02-4.1 16.18 3.2 17.55c5.21.98 7.73-3.16 8.86-6.14c.47-1.24 2.1-1.55 2.98-.56c8.8 10.01 9.55 21.8 7.73 31.95c-3.52 19.62-23.39 33.9-43.13 33.9c-24.66 0-44.29-14.11-49.38-39.65c-2.05-10.31-1.01-30.71 14.89-45.11c1.18-1.08 3.11-.12 2.95 1.5z' fill='url(#ssvg-id-firea)'/><radialGradient cx='64.921' cy='54.062' gradientTransform='matrix(-.0101 .9999 .7525 .0076 26.154 -11.267)' gradientUnits='userSpaceOnUse' id='ssvg-id-fireb' r='73.86'><stop offset='.214' stop-color='#fff176'/><stop offset='.328' stop-color='#fff27d'/><stop offset='.487' stop-color='#fff48f'/><stop offset='.672' stop-color='#fff7ad'/><stop offset='.793' stop-color='#fff9c4'/><stop offset='.822' stop-color='#fff8bd' stop-opacity='.804'/><stop offset='.863' stop-color='#fff6ab' stop-opacity='.529'/><stop offset='.91' stop-color='#fff38d' stop-opacity='.209'/><stop offset='.941' stop-color='#fff176' stop-opacity='0'/></radialGradient><path d='M76.11 77.42c-9.09-11.7-5.02-25.05-2.79-30.37c.3-.7-.5-1.36-1.13-.93c-3.91 2.66-11.92 8.92-15.65 17.73c-5.05 11.91-4.69 17.74-1.7 24.86c1.8 4.29-.29 5.2-1.34 5.36c-1.02.16-1.96-.52-2.71-1.23a16.09 16.09 0 0 1-4.44-7.6c-.16-.62-.97-.79-1.34-.28c-2.8 3.87-4.25 10.08-4.32 14.47C40.47 113 51.68 124 65.24 124c17.09 0 29.54-18.9 19.72-34.7c-2.85-4.6-5.53-7.61-8.85-11.88z' fill='url(#ssvg-id-fireb)'/></svg><data:messages.latestPosts/> من قسم : <b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='not data:label.isLast'>,</b:if></b:loop></h4></div><div style='clear:both;'/>
<div id='related-posts'>
<b:loop index='item' values='data:posts' var='post'>
<b:if cond='data:item lt 1'>
<script expr:src='data:blog.canonicalHomepageUrl + &quot;feeds/posts/default/-/&quot; + data:post.labels.last.name + &quot;?alt=json-in-script&amp;redirect=false&amp;start-index=1&amp;max-results=6&amp;callback=plist&quot;'/>
</b:if>
</b:loop>
</div>
</div>
</b:includable>
<script>
//<![CDATA[
function plist(e){document.write("<ul>");for(var r=0;r<6;r++){var t=e.feed.entry[r],a="";if(r==e.feed.entry.length)break;for(var n=0;n<t.link.length;n++)if("alternate"==t.link[n].rel){a=t.link[n].href;break}if(""!=a){var i=t.title.$t,l=t.media$thumbnail.url.replace("s72-c/","s400/");document.write("<li><div class='thumb'><a class='rnav-img' href='"+a+"' style='background:url("+l+") no-repeat center center;background-size:cover'></a></div><div class='rnav-conent'><h4 class='rnav-title'><a href='"+a+"'>"+i+"</a></h4></div></li>")}}document.write("</ul>")}
//]]>
</script>
Via Active questions tagged javascript - Stack Overflow https://ift.tt/uydiP6B

Comments

Popular posts from this blog

Where and how is this Laravel kernel constructor called? [closed]

Where and how is this Laravel kernel constructor called? public fucntion __construct(Application $app, $Router $roouter) { } I have read the documentation and some online tutorial but I can find any clear explanation. I am learning Laravel and I am wondering where does this kernel constructor receives its arguments from. "POSTMOTERM" CLARIFICATION: Here is more clarity.I have checked the boostrap/app.php and it is only used for boostrapping the interfaces into the container class. What is not clear to me is where and how the Kernel class is instatiated and the arguments passed to the object calling the constructor.Something similar to; obj = new kernel(arg1,arg2) or, is the framework using some magic functions somewhere? Special gratitude to those who burn their eyeballs and brain cells on this trivia before it goes into a full blown menopause alias "MARKED AS DUPLICATE". To some of the itchy-finger keyboard warriors, a.k.a The mods,because I believe in th...

Why is my reports service not connecting?

I am trying to pull some data from a Postgres database using Node.js and node-postures but I can't figure out why my service isn't connecting. my routes/index.js file: const express = require('express'); const router = express.Router(); const ordersCountController = require('../controllers/ordersCountController'); const ordersController = require('../controllers/ordersController'); const weeklyReportsController = require('../controllers/weeklyReportsController'); router.get('/orders_count', ordersCountController); router.get('/orders', ordersController); router.get('/weekly_reports', weeklyReportsController); module.exports = router; My controllers/weeklyReportsController.js file: const weeklyReportsService = require('../services/weeklyReportsService'); const weeklyReportsController = async (req, res) => { try { const data = await weeklyReportsService; res.json({data}) console...

How to show number of registered users in Laravel based on usertype?

i'm trying to display data from the database in the admin dashboard i used this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count(); echo $users; ?> and i have successfully get the correct data from the database but what if i want to display a specific data for example in this user table there is "usertype" that specify if the user is normal user or admin i want to user the same code above but to display a specific usertype i tried this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count()->WHERE usertype =admin; echo $users; ?> but it didn't work, what am i doing wrong? source https://stackoverflow.com/questions/68199726/how-to-show-number-of-registered-users-in-laravel-based-on-usertype