- Screen name: tegatti
tegatti's Profile
20 Posts
83 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- Hallo everybody.
I have a problem with a jquery spinner function.
It works good just the first time when I click to increment or decrement the value of the school year. I mean the school year changes so changes the previous student school year, where there are some data like previous couse, class and so on.
I post the function. If someone would like to help me I'll appreciate very much:
<script type="text/javascript">
function provenienza(arg1, arg2) {
var request;
request = new XMLHttpRequest();
request.open("GET", "provenienzaDati.php?&a="+codAlunno+"&b="+3+"&c="+arg1, true);
request.onreadystatechange = function() {
if(request.readyState == 4) {
var response = request.responseText;
document.getElementById('provenienza').innerHTML = response;
$(function () {
var splitter = '/';
$('#annoScol').spinner({
spin: function (e, ui) {
e.preventDefault();
var values = $(this).val().split(splitter),
annoScol = (parseInt(values[0],10)+ui.value)+splitter+(parseInt(values[1],10)+ui.value);
$('#annoScol').val(annoScol);
$("div#provenienza").load(
"provenienzaDati.php",
{ a: codAlunno, b: 3, c: annoScol },
function(){
var splitter = '/';
$('#annoScol').spinner({
spin: function (e, ui) {
e.preventDefault();
var values = $(this).val().split(splitter),
annoScol = (parseInt(values[0],10)+ui.value)+splitter+(parseInt(values[1],10)+ui.value);
$('#annoScol').val(annoScol);
}
});
});
}
});
});
}
}
request.send(null);
}
</script>
Thanks in advance.
Tegatti.- Hallo everybody,
I need help to execute php file when I click on the button to increment or to decrement the value in spinner widget.
Thanks in advance.
- Hallo everybody,
can please someone helps me to realize something like that:
I would like to costomize a spinner widget that increment or decrement the school year.
on input it should have a value like this:
2012/2013 (or 2012-2013).
When increment it should be 2011/2012, decrement 2013/2014.
Is it possible to do that?
Thanks in advance.
Tegatti- Hi everybody,
I have a problem with autocomplete.
The source data are stored in database.
Ajax calls citta.php, that should give the name of the town when I start writing.
<script>
$( "#campo" ).autocomplete({
minLength: 2,
source: "citta.php"
});
</script>
Instead if I use an array where I write some towns it works good.
citta.php:
$return_arr = array();
include("../Registrazione/config.php"); //connect to database
if (isset($_GET) && isset($_GET['term']) && !empty($_GET['term'])) {
$term = $_GET['term'];
$query = "SELECT * FROM comuni WHERE comune LIKE '%{$term}%' ORDER BY comune ASC";
$fetch = mysql_query($query);
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
$row_array['label'] = $row['comune'];
$row_array['value'] = $row['id_com'];
array_push($return_arr, $row_array);
}
}
echo json_encode($return_arr);
Please, can someone helps me?
Thanks in advance.
Tegatti- Hi all,
I need help to realize that:
I have an input text, when I write a town, I would like that during writing it would be auto completed by the name of the town found in the database.
If it doesn't exist I complete writing.
Thanks in advance.
Tegatti- Good evening to all,
I'm still here to ask you helf to realize a vertical table scrolling.
I have a html table that contains students lists (id, surname, name and date of birth). The lists are divided by class( 1AG, 1AI, 1AB, 1AC, 1AD, etc). The class could be many (for example 10, 15 20). My procedure works so good but the problem is that the table is displayed in horizontal, so I have to use the scroll bar to read all the classes.
I ask if is possible to to change the scrolling in vertical instead then horizontal.
For example to display just 3 class and the others down.
Thanks in advance.
Tegatti
- Hi all the community,
I'm write you to explain a problem that occurs when I want to cancel a student.
I have a window from where a select a student and then I get all his data. If I had to cancel it I press a cancel button and then a transfer his name and his surname to a js function from where I ask for the confirm. It works fine if the surname or the name of student do not contains any apostrophe. If it does the js function does not executes.
This is my button:
<button type="button" id="cance" onclick="cancella('<?php echo $id;?>','<?php echo $name;?>')">Cancella</button>
Where $name contains the name and the surname of the student.
js function:
<script type="text/javascript">
function cancella(arg1, arg2) {
var request;
request = new XMLHttpRequest();
conferma=confirm('Cancel student ' + arg2 +'?');
if (conferma)
{
request.open("GET", "cancellaStudente.php?&a="+arg1, true);
}
request.onreadystatechange = function() {
if(request.readyState == 4) {
var response = request.responseText;
document.getElementById('info4').innerHTML = response;
}
}
request.send(null);
}
</script>
Please, can some one helps me?
Thanks in advance.
Tegatti.- 30-Nov-2012 11:26 AM
- Forum: Using jQuery
Hi all,
I need help to realize something like this:
I have a form, it contains some student data, like surname, name, city, adress, ecc.
I use it to display the student data selected by a select option and I would like to use it on input to insert new data student.
At the bottom of the form there are 3 button: insert new student, save and cancel.
When I click on new student button, I would like to disable the select option (so I can not select a student but only input new data), and the cancel button and reset the form so I can input new student data. When the input ends a function should able the controls disabled.
Please can some one helps me?
Thanks in advance.
Tegatti- Hi everybody,
I need help how to use progress bar during upload an image.
Thanks in advance.
Tegatti- 11-Oct-2012 04:34 AM
- Forum: Using jQuery
Hi,
I'm still here ...
I would like to know, if is possible, how to disable or to enable a drop-down-list from another page.
I mean: I have a drop-down-list in select.php and I would like to disable or to enable a single item, more than a item or all the items from panel control (control.php) page.
Thanks in advance.
Tegatti- Dear all the jquery comunity,
I would like to know how to enable or disable all or just one element of a select option.
Thanks.
Tegatti- Hello everybody,
I need help to implement a jquery function in my site to enable or disable a menu item from the control panel.
The page that will be enable or disable it depends of the director of the school at the end of the school year. Till that period it will be disabled, when they start the polls at the end of year, the administrator of the site will enable that page from the control panel.
Please, can someone helps me?
Thanks in advance.
Tegatti- Hello to everybody,
I need help to transfer a value from an input text to javascript function.
This is my hidden input text:
<input name='VarJs' type='hidden' size='10' id=VarJs' value='<?php $Id ?>' />
I'd like to transfer this value from php to js and then I'd would like to use it in another js function.
Thanks in advance.
Tegatti- Hello to everybody,
from php I transfer a string (surname) to javascript onchange event. I have a problem when the surname contains an apostrophe because the js function failes (italian surnames like D'Amico, D'Andrea, Dell'Acqua, etc).
Please can someone helps me with a jquery function?
Thanks in advance
Tegatti.- Good morning to everybody,
I have this menu:
<li><a>Area login</a>
<ul>
<li><a href="#">Registrati</a></li>
<li><a href="#">Login</a></li>
</ul>
I would like that it changes when user has been login:
<ul>
<li><a href="#">Chat</a></li>
<li><a href="#">Logout</a></li>
I control if user is login with php instruction:
if(isset($_SESSION['mail'])) ........
Please can some one help me to realize that?
Thanks in advance
Tegatti- Hello,
I am searching a plugin which will allow me to preview the image before upload so I can check it realtime. Is there any plugin available in jquery which will do this job for me?
Please help me.
Thanks in advance.
Tegatti- Hi,
I need help to align the elements inside select option.
I mean, I have 3 columns in a select option and I would like to assign column width to have it like a table or something like that:
field1 field2 filed3
filed1 filed2 field3
filed1 filed2 filed3
Thank in advance.
Tegatti- 23-Jul-2012 03:34 AM
- Forum: Using jQuery UI
Hi,
I need help how to select all the input text in the page (when loading the page and changing the value ) that start with the word "voti" and change the color when the value is < 6.
I would like to work
Thanks.
Tegatti- 23-Jul-2012 02:13 AM
- Forum: Using jQuery
Hi,
I need help how to select all the input text in the page that start with the word "voti" and change the color when the value is < 6.
Thanks.
TegattiSalve,
ho un problema presente in una pagina php d dove viene visualizzato il tabellone finale dei voti di una determinata classe scolastica.
I voti delle materie vengono caricati dal database e trasferiti all'interno di una tabella html che è costituita da diversi input text. Uno per ogni disciplina. Alla fine di ogni riga, cioè quando vengono visualizzati i voti di tutte le materie di quel determinato studente della classe, viene calcolata la media dei voti che viene visualizzata in un apposito input text cha ha come attibuti ID e NAME "media".
Questa operazione si ripete per il numero degli studenti della classe.
Fin qui tutto ok.
Il problema sorge quando, a seguito della modifica a video di un voto di una materia, bisogna ricalcolare la media dei voti e rivisualizzarla.
Ho usato la seguente istruzione:
$("#media").val(med)
(dove la variabile med contiene la nuova media)
Però la modifica avviene sempre e solo sul primo input text "media" e non su quello posizionato sulla stessa riga del voto modificato, cioè allo studente al quale è stato modificato il voto.
Allora ho assegnato un indice all'attibuto id e name dell'input text e ho così modificato l'istruzione:
$("#media[ind]").val(med)
Ma non succede nulla. Non viene visualizzata la nuova media.
Credo sia possibile manipolare quel determinato input text posizionato in una determinata riga della tabella html, ma fino ad ora, dopo tanti tentativi, non sono riuscito a risolvere il problema.
Grazie in anticipo.
Claudio
- «Prev
- Next »
Moderate user : tegatti
© 2012 jQuery Foundation
Sponsored by
and others.



