but it only happen with geolocation am wondering why. i even try to join the variable together before posting it and then use the explode function to seperate it to put it into the db but dont work on the target device
Posts made by ricardogaynor
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
yea but cordova dont restrict cross domain because i use it to post data to online serve without modifying the origin permisson access something like that
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
i’ve always using this method to filter form for alot of apps and websites but when i try use it with feolocation it dont work on the phone
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
i am using straight mysqli as you see but why would this geolocation post successfully and inserted into a database abd dont do the same when it is compile, i am wondering if the phonegap webview that wrap our app to make it look native implement a feature to restrict user from doing this am jus suggestion but am gonna try that
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
<?php
$con = new mysqli(“localhost”, “root”, “”, “pls”);
if ($con){
echo “connection successful”;
}else {
echo “connection isn’t successful”;
}
if (isset ($_POST[‘longitude’]) && isset($_POST[‘latitude’])){
$longitude = filter_input(INPUT_POST, ‘longitude’);
$latitude = filter_input(INPUT_POST, ‘latitude’);$insert = mysqli_query($con, “INSERT INTO geolocation VALUES (’$latitude’, ‘$longitude’, ‘’)”);
if ($insert){
echo “data inserted successful”;
echo $lat.’<br>’.$long;
}else if (!$insert){
echo “data wasnt inserted successfully”;
}
}
?> -
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
<script>
$(document).ready(function(){
$(’#buttonx’).click(function(){
navigator.geolocation.getCurrentPosition(function(pos){
var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude;
var longitude1 = longitude;
var latitude1 = latitude;
var username = $(’#username’).val();
var password = $(’#password’).val();
var reportdetail = $(’#reportdetail’).val();// alert(latitude);
// alert (latitude);
$.ajax({
type:‘POST’,
url:‘http://192.168.1.6/pls/locationpg.php’,
data:‘latitude=’+latitude+’&clongitude=’+longitude+’&username1=’+username+’&password1=’+password+’&reportdetail1=’+reportdetail,
success:function(msg){
if(msg){
$("#location").html(msg);
alert(longitude);
alert(latitude);
}else{
$("#location").html(‘Not Available’);
}
var username = $(’#username’).val(’’);
var password = $(’#password’).val(’’);
var reportdetail = $(’#reportdetail’).val(’’);
}}).error(function(){ $('#feedback1').text(""); }).complete(function(){ $('#feedback2').text(""); }).success(function(){ $('#feedback3').text(""); });
});
});
});</script>
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
@munsterlander thanks i sent you the mail just a while ago my mail address is ricardogaynorgaynor@gmail.com
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
@munsterlander thank you very helpful so ive started using the ide. am developing an app for a business but i dony=t know how much to charge. how much would you chasrge to develop an app that share pictures, search databases, listen radio, watch videos, send sms and and offer a cms feature for the admin. i want a rough cost. like whats the cost over 1000 to 30000 usd or below that? give me a rough cost please i have to suggest it at a meeting tomorrow
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
Yea thanks so i used php and mysql to run the backend of the app. do you have any suggestion for a faster backend for mobile apps rather than php
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
yes i will soon its a praedial larceny app i want the government to buy into so am not sure about posting it. the reason why i chose a framework is that i found good tutorials in using jquery than the old javascript but i will go to code academy to learn it and all of the framework will be a walk over as u stated before
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
thanks i jus do it with jquery ajax and i works thanks. so vanilla js is the foundation of all the frameworks ? and how does vanilla js different from javascript by itself ?
thanks again your help make me won the national Agri-Tech competition in jamaica using the onsen framwork to build a app with database backend -
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
so is there anyway around this to use jquery on child pages base on the onsen version like 2.0 betta.
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
Thank you very much so i can use this example as well to make a post request wit form data ?
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
so doest it work when u try it ???
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
dont show the error but its not making the request. if the request was made it will display some text that i append on in .error and .complete after the ajax request
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
the solution u gave isn’t working either.
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
no am not usin g the ide. am developing an app that will collect surveys from users, allow them to source job opportnities and post question. the reason why i choose a framework is that i cant get a good javascript course to teach my self. can you suggest a course or something. where you from the USa?
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
thank you very much am jus 18 year old from jamaica and am jus teaching my self web and app development but since ive started using onsen ui i came upon angular so can angualr send http request using ajax to a php file. am new to angular. am a straight php and sql developerr
-
RE: onsen ui wont allow me to make ajax call in child pages but it allows for the ho,e/parent page
<!DOCTYPE html> <!-- CSP support mode (required for Windows Universal apps): https://docs.angularjs.org/api/ng/directive/ngCsp --> <html lang="en" ng-app="app" ng-csp> <head> <meta charset="utf-8" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" /> <!-- JS dependencies (order matters!) --> <script src="scripts/platformOverrides.js"></script> <script src="lib/angular/angular.js"></script> <script src="lib/onsen/js/onsenui.js"></script> <!-- CSS dependencies --> <link rel="stylesheet" href="lib/onsen/css/onsenui.css" /> <link rel="stylesheet" href="lib/onsen/css/onsen-css-components-blue-basic-theme.css" /> <!-- CSP support mode (required for Windows Universal apps) --> <link rel="stylesheet" href="lib/angular/angular-csp.css" /> <!-- --------------- App init --------------- --> <title>Onsen UI Sliding Menu</title> <script> angular.module('app', ['onsen']); </script> <style> .page--menu-page__background { background-color: #333; } .page--menu-page__content { color: white; } .menu-close, .menu-close > .toolbar-button { color: #999; } .menu-list, .menu-item:first-child, .menu-item:last-child, .menu-item { background-color: transparent; background-image: none !important; border-color: transparent; color: #fff; } .menu-item { padding: 0 0 0 20px; line-height: 52px; height: 52px; text-shadow: rgba(0, 0, 0, 0.4) 0px 1px 0px; } .menu-item:active { background-color: rgba(255, 255, 255, 0.1); } .menu-notification { display: inline-block; margin-top: 12px; font-size: 14px; height: 16px; line-height: 16px; min-width: 16px; font-weight: 600; } .bottom-menu-list, .bottom-menu-item:first-child, .bottom-menu-item:last-child, .bottom-menu-item { border-color: #393939; background-color: transparent; background-image: none !important; color: #ccc; } .bottom-menu-item:active { background-color: rgba(255, 255, 255, 0.1); } </style> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> </script> <script> //start of post and get ajax jquery tutorilal // $(document).ready(function (){ $('#buttonx').click(function (){ alert('clicked'); var managod = $('#string').val(); var mygod = $('#string2').val(); //url:'http://ratesgram.com/processprocess.php', $.post ('process.php', { godagod: managod, ohmy: mygod }, function(data) { $('#feedback').html(data); var managod = $('#string').val(''); var mygod = $('#string2').val(''); //append a message within the div if there is an error while fetching data from the php file of if the path was undefine// }).error(function (){ $('#feedback1').append("An unexpected error occurs"); //append another message if the request is complete// }).complete(function (){ $('#feedback2').append("The request completed successfully"); //add a call back function is successful // }).success(function (){ $('#feedback3').append("The request is successful"); }); }); }); //end of ajax post and get tutorial // </script> </head> <body> <!-- Cordova reference --> <script src="cordova.js"></script> <script src="scripts/index.js"></script> <!-- --> <ons-sliding-menu menu-page="menu.html" main-page="page1.html" side="left" var="menu" type="reveal" max-slide-distance="260px" swipeable="true"> </ons-sliding-menu> <ons-template id="menu.html"> <ons-page modifier="menu-page"> <ons-toolbar modifier="transparent"></ons-toolbar> <ons-list class="menu-list"> <ons-list-item class="menu-item" ng-click="menu.setMainPage('page1.html', {closeMenu: true})"> <ons-icon icon="fa-plus"></ons-icon> New Post </ons-list-item> <ons-list-item class="menu-item" ng-click="menu.setMainPage('page2.html', {closeMenu: true})"> <ons-icon icon="fa-bookmark"></ons-icon> Bookmark </ons-list-item> <ons-list-item class="menu-item" ng-click="menu.setMainPage('page1.html', {closeMenu: true})"> <ons-icon icon="fa-twitter"></ons-icon> Official Twitter </ons-list-item> </ons-list> <br> <ons-list class="bottom-menu-list"> <ons-list-item class="bottom-menu-item" ng-click="menu.setMainPage('page2.html', {closeMenu: true})"> Settings <div class="notification menu-notification">3</div> </ons-list-item> <ons-list-item class="bottom-menu-item" ng-click="menu.setMainPage('page1.html', {closeMenu: true})"> Help </ons-list-item> <ons-list-item class="bottom-menu-item" ng-click="menu.setMainPage('page2.html', {closeMenu: true})"> Send feedback </ons-list-item> </ons-list> </ons-page> </ons-template> <ons-template id="page1.html"> <ons-page> <ons-toolbar> <div class="left"> <ons-toolbar-button ng-click="menu.toggle()"> <ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon> </ons-toolbar-button> </div> <div class="center">Page 1</div> </ons-toolbar> </ons-page> </ons-template> <ons-template id="page2.html" id="page2"> <ons-page> <ons-toolbar> <div class="left"> <ons-toolbar-button ng-click="menu.toggle()"> <ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon> </ons-toolbar-button> </div> <div class="center">Page 2</div> </ons-toolbar> <ons-row style="margin-top: 100px; text-align: center;"> <ons-col> <ons-button modifier="light" ng-click="menu.toggleMenu()"> Toggle Menu </ons-button> <input type="text" id="string" /><br><br> <input type="text" id="string2" /><br><br> <input type="button" id="buttonx" value="click me" /> <div id="feedback"></div><br> <div id="feedback1"></div><br> <div id="feedback2"></div><br> <div id="feedback3"></div><br> <a href="http://www.google.com">google</a> </ons-col> </ons-row> </ons-page> </ons-template> </body> </html>