vendredi 2 janvier 2015

How to create a pop up window asking for input using jquery

strong textmy index.html code is



<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/one.css">
</head>
<body>

<!--Script1-->

<script type="text/x-handlebars">
<div id="W">
<h1> Welcome </h1>
</div>

<div id="section1">
<h2> {{#link-to 'DINESH'}} DINESH {{/link-to}} </h2>
</div>

<div id="section">
<h2> {{#link-to 'HOME'}} HOME {{/link-to}} </h2>
</div>

<div id="section2">
<h2> {{#link-to 'CLICK'}} CLICK {{/link-to}} </h2>
</div>

{{outlet}}

</script>

<!--Script2-->

<script type="text/x-handlebars" id='HOME'>
<div class-'HOME'>
<p>
This is a sample site for practicing Ember.js
</p>
</script>

<!--Script3-->

<script type="text/x-handlebars" id='DINESH'>
<div class-'DINESH'>
<p>
I welcome you to my page.. keep in touch......!!!!!
</p>
VIDIYAL
<br>

Being the "Director of Community Service" in Rotaract Club of Future League, I organised a project called "VIDIYAL" where i taught basic computer knowledge to Orphanage Students.
</script>

<!--Script4-->

<script type="text/x-handlebars" id='CLICK'>

<div class-'CLICK'>
<p> Click the button to display the information which you want: </p>

<button onclick="myFunction()">Click me</button>

<p id="CLICK"></p>

<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}



</script>


<script src="js/libs/jquery-1.10.2.js"></script>
<script src="js/libs/handlebars-v2.0.0.js"></script>
<script src="js/libs/ember-1.9.1.js"></script>
<script src="js/app.js"></script>
<!-- to activate the test runner, add the "?test" query string parameter -->
<script src="tests/runner.js"></script>
</body>
</html>


and app.js code is



App = Ember.Application.create();

App.Router.map(function()
{
this.resource('HOME');
this.resource('DINESH');
this.resource('CLICK');
});


now if i click on click it should display a pop up window asking for : Enter your Name


Am a Student who is very new to programming. So kindly explain me as simple as you can.





Aucun commentaire:

Enregistrer un commentaire