Πρόβλημα Ubuntu phone Html5-Js App  Το θέμα επιλύθηκε

...του ubuntu και έργων ΕΛ/ΛΑΚ (Έργα-Οδηγοί-Προτάσεις)

Συντονιστής: konnn

Πρόβλημα Ubuntu phone Html5-Js App  Το θέμα επιλύθηκε

Δημοσίευσηαπό pc_magas » 11 Οκτ 2013, 20:05

Καλησπέρα έχω κάνει μια μικρή απλή εφαρμογή:
Παίρνει από ένα input box το περιεχόμενο και το εμφανίζει.

Επιλύθηκε απλά δεν θέλει να είναι το input μέσα σε form στο html


Το index.html βάση του template που μου δίνει το ubuntu SDK
Κώδικας: Επιλογή όλων

<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />

<!-- Use Ubuntu Cordova -->
<script language="javascript" type="text/javascript" src="file:///usr/share/cordova-ubuntu-2.8/www/cordova-2.8.js"></script>

<!-- Ubuntu UI Style imports - Ambiance theme -->
<link href="/usr/share/ubuntu-html5-theme/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" />

<!-- Ubuntu UI javascript imports - Ambiance theme -->
<script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/fast-buttons.js"></script>
<script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/core.js"></script>
<script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/buttons.js"></script>
<script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/dialogs.js"></script>
<script src="/usr/share/ubuntu-html5-theme/0.1/ambiance/js/pagestacks.js"></script>

<!-- Application script -->
<script src="./app.js"></script>

<title>Show Button</title>
</head>

<body>

<div data-role="page">

<header data-role="header">
<nav data-role="navbar" class="tabs" >
<div class="tabs-inner">
<ul>
<li class="active" role="tab">
<h1>Show Something</h1>
<form>
<input type="text" id="wikisearch">
<input type="submit" id="submit" onclick="search()" value="Show">
</form>
</li>
</ul>
</div>
</nav>
</header>

<div data-role="content">
<div data-role="pagestack">
<div data-role="page" id="main">

</div>
</div>
</div>

<div data-role="dialog" id="loading">
<section>
<h1>Apache Cordova Loading</h1>
<progress></progress>
</section>
</div>

<div data-role="dialog" id="deviceready">
<section>
<h1>Deviceready event received</h1>
<button data-role="button" id="devicereadyOK" class="success">OK</button>
</section>
</div>
</div>
</body>
</html>


Και το αρχείο app.js:
Κώδικας: Επιλογή όλων
var content="Default";

/**
*Function that performs the search to wikipedia
*/
function search()
{
content=document.getElementById("wikisearch").value;
document.getElementById("main").innerHTML=content;
}

/**
*Http Function to get stuff via Web
*@param theUrl: The url that we make the http connection
*/
function httpGet(theUrl)
{
var xmlHttp = null;

xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}


Έχετε ιδέα γιατί συμβαίνει αυτό? Και σε Browser που το τρέχω μου συμβαίνει
My blog|Κυπριακή Κοινότητα Ελευθέρου Λογισμικού Λογισμικού ανοικτού Κώδικα
Γνώσεις Linux:Ποτέ αρκετές|Προγραμματισμός: Php, javascript, nodejs, python, bash |Aγγλικά:Καλά
Οι υπολογιστές μου:
Spoiler: show
Ubuntu 16.04 64 bit σεIntel(R) Pentium(R) CPU G4400 @ 3.30GHz, 16Gib Ram, 500Gib Hard Disk, και κάρτα γραφικών Nvidia Geforce GT610
Lubuntu 14.04 σε Dell Inspiron mini 10(1010) intel Atom Z500 1Gb ram και gma500 (εδώθη σε άλλον)
Kubuntu 16.04 Lenovo G70 Intel i5 Nvidia Grapgics Card, Intel Graphics card (έχει 2) με Nouveau, 16Gb RAM, 126GB SSD Σκληρό Δίσκο
Άβαταρ μέλους
pc_magas
powerTUX
powerTUX
 
Δημοσιεύσεις: 2599
Εγγραφή: 12 Απρ 2009, 18:55
Τοποθεσία: Αχαρναί Αττικής
Launchpad: pc_magas
IRC: pc_magas
Εκτύπωση

  • ΣΧΕΤΙΚΑ ΘΕΜΑΤΑ
    ΑΠΑΝΤΗΣΕΙΣ
    ΠΡΟΒΟΛΕΣ
    ΣΥΓΓΡΑΦΕΑΣ

Επιστροφή στο Ανάπτυξη Λογισμικού / Αλγόριθμοι