I have created one Cordova app for iOS devices but I have a simple question. I load for example in ul list, objects from my API (php) in this way (using Ajax):
$('#abc').html(data.abc2);
In server side I have while loops. The result of these loops in json response is something like this ( X number of results):
<li style="margin-left: 31px;">
<div class="commmtodeletef>
<a href="#" class="item item-content">
<div class="item-media" style="width: 51px;"><img style="border-radius: 50%;height: 40px;width: 40px;" src="img" alt=""></div>
<div class="item-inner" style="margin-top: 20px;margin-left: 4px;">
<div class="item-title-row" style="margin-bottom:0px;">
<div class="item-title" style="margin-bottom: 0px;font-size: 16px;">fname lname</div>
</div>
<div class="item-text" style="font-size: 15px;color:#000;font-weight: 300;">abc</div>
<div class="item-subtitle bottom-subtitle row" style="font-size: 12px;"><div class="timdvcl" style="color: #8e8e93;"><i class="icon ion-md-time"></I>tm</div> <div id="imgdelcomm" data-id="" style="display:none;"><img src="img/loader.gif" width="20px" /></div>
</div>
</div>
</a>
</div>
</li>
In other words, the loop is executed on server-side, i get the json response and then I populate the ul, not in the app.js as Ajax loop on success response. Is that a right way or should I use Ajax loops inside my app.js? Will I have a problem when submitting my app on App Store using loops outside of my app?
I don't really see a JSON response here, but I'm just going to answer the main question: There shouldn't be any problem submitting an app. Lots of apps have Ajax calls.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.