PDA

View Full Version : Enable to use a snipper



asmagh
31 Mar 2011, 10:43 AM
Hi, I want to put a snipper in a text field of my webpage. But my code doesnt work.
Please can you tell me what's the problem.



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Custom Spinner Widget Example</title>

<!-- ** CSS ** -->
<!-- base library -->
<link rel="stylesheet" type="text/css" href="ext-all.css" />

<!-- overrides to base library -->
<link rel="stylesheet" type="text/css" href="ux/css/Spinner.css" />

<!-- page specific -->
<style type="text/css">

/* global css */
body {
padding:0 2em 3em;
font: normal 12px arial, helvetica, sans-serif;
color: #282828;
}

</style>


<!-- ** Javascript ** -->
<!-- ExtJS library: base/adapter -->
<script type="text/javascript" src="ext-base.js"></script>

<!-- ExtJS library: all widgets -->
<script type="text/javascript" src="ext-all.js"></script>


<script type="text/javascript" src="ux/Spinner.js"></script>
<script type="text/javascript" src="ux/SpinnerField.js"></script>


</head>
<body>

<textarea id="aaa"> asma </textarea>


<script type="text/javascript" >

Ext.onReady(function(){
var simple = new Ext.FormPanel({
labelWidth: 40, // label settings here cascade unless overridden
frame: true,
title: '',
bodyStyle: 'padding:5px 5px 0',
width: 210,
defaults: {width: 135},
defaultType: 'textfield',

items: [
new Ext.ux.form.SpinnerField({
fieldLabel: '',
name: 'age'
})


]});

simple.render('form-ct');

applyTo:'aaa'

});

</script>


<div id="form-ct" style="margin-top:1em"></div>

</body>
</html>

mankz
3 Apr 2011, 11:03 AM
What is this:



applyTo:'aaa'