0
0
mirror of https://github.com/Doodle3D/doodle3d-connect.git synced 2024-12-24 17:43:48 +01:00

Form available check

This commit is contained in:
peteruithoven 2014-05-14 12:12:59 +02:00
parent ad2c2fcb4e
commit be252ff87e

View File

@ -38,15 +38,14 @@
$.mobile.document.on( "pagebeforeshow", PAGE_ID, function( event, data ) {
console.log("Connecting to network page pagebeforeshow");
_pageData = d3d.util.getPageParams(PAGE_ID);
if(_pageData === undefined) {
var form = data.prevPage.find("form");
// check if there are url params and a form from a prev page
if(_pageData === undefined || form.length === 0) {
$.mobile.changePage("#boxes");
return;
}
var boxURL = "http://"+_pageData.localip;
var form = data.prevPage.find("form");
_formData = d3d.util.getFormData(form);
_infoAPI.init(boxURL);
_networkAPI.init(boxURL);
retrieveWiFiBoxID(function() {