EasyUI Forum
May 13, 2024, 05:55:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 10 11 [12] 13
166  General Category / EasyUI for jQuery / Creating Tooltip "on the fly" on: June 05, 2014, 05:24:26 AM
Hi all,

I am trying to create a Tooltip "on the fly".

As you can see in the following link (http//:195.144.40.170/AAA/file.html)
"Tooltip 1" works correctly but "Tooltip 2" not.
Note that "Tooltip 2" is created "on the fly".

Here is the code.
Any help is appreciated.
Regards. Miche

Code:
<link id="dlink" rel="stylesheet" type="text/css" href="easyui.css">
<link rel="stylesheet" type="text/css" href="icon.css">
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>

<script type="text/javascript">
   $(function(){
      $('#tt2').html('<a title="NOT correct" class="easyui-tooltip" href="#">Tooltip 2</a>');
   });
</script>

<div id="tt1">
<a title="correct" class="easyui-tooltip" href="#">Tooltip 1</a>
</div>

<br><br>

<div id="tt2">
</div>
167  General Category / Bug Report / Re: edatagrid and updateURL on: May 15, 2014, 12:59:32 AM
Hi stworthy,

you are right ... I didn't return the added row.
Now all works correctly.

I just have a queston about the returned data.
In the program save_user.php it seems me that it is sufficient the return the "id" (mysql_insert_id) and not all the fields.

Do you see a problem if I return only the "id" and not all the fields ?

Thanks a lot for your help.
Miche
168  General Category / EasyUI for jQuery / Re: Disable editing for a specifi column in edatagrid when modifying a row on: May 15, 2014, 12:52:46 AM
Hi stworthy,

it works perfecly !

Thanks a lot.
Miche
169  General Category / Bug Report / edatagrid and updateURL on: May 14, 2014, 07:57:13 AM
Hi Sworthy,

may I ask you to verify if this is a bug or my error ?

I have modified the example with edatagrid found here:
http://www.jeasyui.com/extension/edatagrid.php

The only modification is in order to work with a database and not a json-file.
To this purpose I have added saveUrl and updateUrl (see code below).

The problem:
If I add a new row, "saveUrl" is fired. This is ok.
But if the next action is to modify the last added record, "saveUrl" is fired again (instead of "updateUrl").
If I modify another record (not the last) all is ok.

Thanks a lot if you can confirm this.

Regards
Miche

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery EasyUI</title>
<link rel="stylesheet" type="text/css" href="easyui.css">
<link rel="stylesheet" type="text/css" href="icon.css">
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>
<script type="text/javascript" src="jquery.edatagrid.js"></script>
<script type="text/javascript">
$(function(){
$('#tt').edatagrid({
                           idField: 'itemid',
                           url: 'db.cgi?action=List',
                           saveUrl: 'db.cgi?action=Save',
                           updateUrl: 'db.cgi?action=Update'
});
});
</script>
</head>
<body>
<h1>Editable DataGrid</h1>
<div style="margin-bottom:10px">
<a href="#" onclick="javascript:$('#tt').edatagrid('addRow')">AddRow</a>
<a href="#" onclick="javascript:$('#tt').edatagrid('saveRow')">SaveRow</a>
<a href="#" onclick="javascript:$('#tt').edatagrid('cancelRow')">CancelRow</a>
<a href="#" onclick="javascript:$('#tt').edatagrid('destroyRow')">destroyRow</a>
</div>
<table id="tt" style="width:600px;height:200px"
title="Editable DataGrid",
singleSelect="true">
<thead>
<tr>
<th field="itemid" width="100" editor="{type:'validatebox',options:{required:true}}">Item ID</th>
<th field="productid" width="100" editor="text">Product ID</th>
<th field="listprice" width="100" align="right" editor="{type:'numberbox',options:{precision:1}}">List Price</th>
<th field="unitcost" width="100" align="right" editor="numberbox">Unit Cost</th>
<th field="attr1" width="150" editor="text">Attribute</th>
</tr>
</thead>
</table>
</body>
</html>
170  General Category / EasyUI for jQuery / Disable editing for a specifi column in edatagrid when modifying a row on: May 14, 2014, 12:13:56 AM
Hi all,

I am using edatagrid.

When I add a new row all columns must be editable.
But when I modify a row, the first column (col1) must not be editable.

I have tryed to find a solution using the 'onClickRow' parameter but without success !
Can someone help me ?

Thank a lot
Miche
171  General Category / EasyUI for jQuery / Re: Charset Display german umlaut on: March 20, 2014, 01:43:11 AM
Hi Jaimi,

I work with german umlaut too.
This is what I do:

1) When I create the database the first line is:
   CREATE DATABASE /*!32312 IF NOT EXISTS*/ `DbName` /*!40100 DEFAULT CHARACTER SET utf8 */;

2) The first line of my html files is:
   Content-type: text/html; charset=utf-8

3) When I output the json string from my cgi-script I use the following command:
   $json = JSON::XS->new->latin1->encode (\%array);

   ... yes ... latin1

Regards
Miche
  
172  General Category / EasyUI for jQuery / Re: easyui-combotree on: March 20, 2014, 01:28:26 AM
Hi all,

I think I have found the correct solution.
I call the combotree (and pass the variable Asset) after loading the form:

Code:
$('#fm').form('load',row);
$('#Asset').combotree('reload', 'tree.cgi?Asset='+row.Asset);

In the program "tree.cgi" I use a recursive function in order to output only the involved nodes.
All works as expected.
173  General Category / EasyUI for jQuery / easyui-combotree on: March 14, 2014, 07:13:08 AM
Hi all,

I have a form. One of the field is a easyui-combotree.

Code:
<label>Asset:</label>
<select class="easyui-combotree" name="Asset" data-options="url:'tree.cgi?Asset=......'">
</select>

I want to initialize the combotree value.
Since the combotree is very large I do not want to output all the nodes but only a subset.
To this purpose I think that a possible solution is to pass the variable "Asset" to the program "tree.cgi" and output only the involved nodes.

How can I pass the variable "Asset" to the program tree.cgi ?
Is this the correct solution ?

Thanks.
Michelangelo
174  General Category / EasyUI for jQuery / Re: Form validation on: February 27, 2014, 08:13:33 AM
Thanks stworthy !
175  General Category / EasyUI for jQuery / Form validation on: February 25, 2014, 04:09:25 AM
Hi all,

I have a form similar to the following tutorial:
http://www.jeasyui.com/tutorial/form/form3.php

In my form I have two "easyui-datebox" fields: Start, End.
I want to add a validation that check that "Start" is less than "End".
I am able to do this at server site.
Is it possible to do this check during form validation ?

Regards.
Miche
176  General Category / EasyUI for jQuery / Re: Calculate two column values in editing DataGrid on: February 21, 2014, 06:08:18 AM
It works !
Thanks a lot for your help !

Miche
177  General Category / EasyUI for jQuery / Calculate two column values in editing DataGrid on: February 20, 2014, 09:44:37 AM
Hi all,

I am trying to modify the example "Calculate two column values in editing DataGrid" found here:
http://www.jeasyui.com/tutorial/datagrid/datagrid15.php
In this example the involved fields (listprice, amount and unitcost) are numberbox.

The only difference in my situation is that the field "amount" is a combobox (and not a numberbox).
It seems me that for a combobox it's not possible to use the function:
 "amountEditor.target.bind('change')"

The only solution that I have found is to add an "onChange" event to the field "amount".
This event calls a new function (for example setEditing2).

What I do not like in this (working) solution is that "setEditing" and "setEditing2" are two different functions but are very similar.

Is this the only solution or is it possible to use "amountEditor.target.bind('change')" also with combobox ?

Regards.
Miche
178  General Category / EasyUI for jQuery / Re: Ceck if datagrid exist on: February 17, 2014, 11:51:52 PM
Hi stworthy

thanks a lot !

Miche
179  General Category / EasyUI for jQuery / Ceck if datagrid exist on: February 17, 2014, 06:27:08 AM
Hi all,

I have 2 tabs (tab1 and tab2)
In each tab I have a datagrid (datagrid1 and datagrid2)
The "save" button" is in the first tab and it saves the two datagrid.
If I click on tab2, then on tab1 and then on the "save" button, all is ok.
But if after I start the program I click on the save button the javascript stops at the following command

var rows = $('#datagrid2').datagrid('getChanges','inserted');

The reason is that datagrid2 do not exist.
How can I check if datagrid2 exists ?

Thanks in advance
Miche
180  General Category / EasyUI for jQuery / Re: combobox and onBeforeLoad on: February 14, 2014, 08:59:09 AM
It works perfectly.
Thanks a lot !

Miche
Pages: 1 ... 10 11 [12] 13
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!