Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
cecco974
cecco974's Profile
17
Posts
13
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Problem to select on autocomplete
[4Replies]
11-Jun-2013 10:34 AM
Forum:
Using jQuery UI
Hi everybody ... I've a question for you ...
I've a function for autocomplete some text and on select i want return 2 value from the function ... this is my code:
function autoComp(field, srt, file, act) {
$( field ).autocomplete({
minLength: srt,
source: function( request, response ) {
$.ajax({
url: file,
type: 'post',
dataType: "json",
data: {'azione':act, 'txt':request.term},
success: function(data) {
response( $.map( data.result, function( item ) {
return {
label: item.text,
value: item.text,
id: item.id
}
}));
}
});
},
select: function( event, ui ) {
var obj = {};
obj[0] = ui.item.id;
obj[1] = ui.item.label;
return obj;
}
});
}
$(document).on('focus', '.farmCompl', function(){
obj = autoComp(this, 3, 'search.php', 'music');
if(obj){
alert(obj[0]);
alert(obj[1]);
}
});
I'me sure that ajax work fine ...
Any suggestions ???
Thanks
Problem to select on autocomplete
[0Replies]
11-Jun-2013 10:34 AM
Forum:
Using jQuery
Hi everybody ... I've a question for you ...
I've a function for autocomplete some text and on select i want return 2 value from the function ... this is my code:
function autoComp(field, srt, file, act) {
$( field ).autocomplete({
minLength: srt,
source: function( request, response ) {
$.ajax({
url: file,
type: 'post',
dataType: "json",
data: {'azione':act, 'txt':request.term},
success: function(data) {
response( $.map( data.result, function( item ) {
return {
label: item.text,
value: item.text,
id: item.id
}
}));
}
});
},
select: function( event, ui ) {
var obj = {};
obj[0] = ui.item.id;
obj[1] = ui.item.label;
return obj;
}
});
}
$(document).on('focus', '.farmCompl', function(){
obj = autoComp(this, 3, 'search.php', 'music');
if(obj){
alert(obj[0]);
alert(obj[1]);
}
});
I'me sure that ajax work fine ...
Any suggestions ???
Thanks
Check Box don't work
[2Replies]
27-May-2013 10:59 AM
Forum:
Using jQuery
Hi guys I have a question for you, I have in my code:
A checkBox that disabled an input field;
A select that if set to empty:
reset and disabled the input field;
set the checkBox to checked;
Why if I uncheck the checkBox and I set the select as empty the checkBox seems unchecked ???
See more
http://jsfiddle.net/yRety/1/
This is my code:
<select class="select">
<option value=''>Select</option>
<option value="1">Option1</option>
</select>
<label>code:</label>
<input disabled class="code"></input>
<input disabled checked type="checkBox" class="check" title="Uncheck to Enable"></input>
$(document).on('click', '.select', function(){
if($(this).val() == ''){
$('.check').attr('disabled', true);
$('.check').attr('checked', true);
$('.code').attr('disabled', true);
$('.code').val('');
}
else{
$('.check').attr('disabled', false);}
});
$(document).on('change', '.check', function(){
if($(this).is(':checked'))
$('.code').attr('disabled', true);
else
$('.code').attr('disabled', false);
});
Find an element by class and attribute value
[3Replies]
27-May-2013 04:28 AM
Forum:
Using jQuery
Hello guys,
I need to find in the document an element by class and attribute value like this:
<span class="ui-button-text
artEdit
" rif="
artViewDiv52
">Save</span>
If I want take the element by class I write:
$(document).find('.artEdit');
If I want take the element by attribute value I write:
$(document).find('[rif=artViewDiv52]');
but if I want to find "
artEdit
" with rif="
artViewDiv52
" how can i write??
Thanks
submit an image by ajax
[1Reply]
14-May-2013 11:52 AM
Forum:
Using jQuery UI
Another question for you ...
Here there is the code complete:
http://jsfiddle.net/LQN43/1/
I need to submit some data by ajax to a file php ... all so ok for the text bu not for the image ... i have this code
HTML
<label>Name:<label><input class="name" /><br>
<label>Surname:<label><input class="surname" /><br>
<input type="file" class="selectImage" id="selectedImageFile" /><br>
<div style="border:1px solid; width:100px; height:100px">
<img id="uploadPreview" style="width:100%"/>
</div>
JQUERY
$(document).on('change', '.selectImage', function(){
var oFile = document.getElementById('selectedImageFile').files[0];
var oImage = document.getElementById('uploadPreview');
var oReader = new FileReader();
oReader.onload = function(e){
oImage.src = e.target.result;
};
oReader.readAsDataURL(oFile);
});
$(document).on('click', '.save', function(){
var name=$('.name').val();
var surname=$('.surname').val();
var img=document.getElementById('selectedImageFile').files[0];
$.ajax({
url: 'php/reqest.php',
type: 'post',
data: {'name': name, 'surname': surname, 'img': img}
});
});
Error Console
Uncaught TypeError: Illegal invocation
jquery-1.9.1.js:7340
Thanks for the support
Submit an image by ajax
[1Reply]
14-May-2013 11:51 AM
Forum:
Using jQuery
Another question for you ...
Here there is the code complete:
http://jsfiddle.net/LQN43/1/
I need to submit some data by ajax to a file php ... all so ok for the text bu not for the image ... i have this code
HTML
<label>Name:<label><input class="name" /><br>
<label>Surname:<label><input class="surname" /><br>
<input type="file" class="selectImage" id="selectedImageFile" /><br>
<div style="border:1px solid; width:100px; height:100px">
<img id="uploadPreview" style="width:100%"/>
</div>
JQUERY
$(document).on('change', '.selectImage', function(){
var oFile = document.getElementById('selectedImageFile').files[0];
var oImage = document.getElementById('uploadPreview');
var oReader = new FileReader();
oReader.onload = function(e){
oImage.src = e.target.result;
};
oReader.readAsDataURL(oFile);
});
$(document).on('click', '.save', function(){
var name=$('.name').val();
var surname=$('.surname').val();
var img=document.getElementById('selectedImageFile').files[0];
$.ajax({
url: 'php/reqest.php',
type: 'post',
data: {'name': name, 'surname': surname, 'img': img}
});
});
Error Console
Uncaught TypeError: Illegal invocation
jquery-1.9.1.js:7340
Thanks for the support
Edit text and addClass at Dialog Button
[2Replies]
17-Apr-2013 09:25 AM
Forum:
Using jQuery
Hi guys, I've another question for you ...
I've create a function for open a dialog like this
function dialogOpen(div, width, height, text){
$(div).dialog({
autoOpen: false,
width: width,
height: height,
modal: false,
buttons: {text:function(){ }},
close: function() {$(div).remove();}
});
$(div).dialog( "open" );
}
$(document).on('click', '.openDialog', function()dialogOpen('divClient', 'auto', 'auto', 'New');});
I would like to Know :
Why the text of dialog-button is 'text' and no 'New'? How can I do it?
How can I addClass('
newClient
') at the same button?
Thanks so much
Bye
Edit text and addClass at Dialog Button
[3Replies]
17-Apr-2013 09:24 AM
Forum:
Using jQuery UI
Hi guys, I've another question for you ...
I've create a function for open a dialog like this
function dialogOpen(div, width, height, text){
$(div).dialog({
autoOpen: false,
width: width,
height: height,
modal: false,
buttons: {text:function(){ }},
close: function() {$(div).remove();}
});
$(div).dialog( "open" );
}
$(document).on('click', '.openDialog', function()dialogOpen('divClient', 'auto', 'auto', 'New');});
I would like to Know :
Why the text of dialog-button is 'text' and no 'New'? How can I do it?
How can I addClass('
newClient
') at the same button?
Thanks so much
Bye
syntax of a function ...
[1Reply]
12-Apr-2013 08:57 AM
Forum:
Using jQuery
I state that are in the course of learning do jQuery ...
There are thousands of tutorials to write functions in a thousand different ways in file .js external...
Someone can give me a hand?
// Do something when the document it's ready (at the end) ...Correct?
jQuery(document).ready(function(){
alert(' I am ready ');
});
// The document learn the function and when it is called do something ... Correct?
function hello() {
alert(' hello ');
}
But I don't understand what it means:
jQuery(function($) {
...
}
or
(function($) {
...
}(jQuery));
Examples are more accepted
Thanks a lot
Can I open a div injected from a ajax request in a dialog?
[3Replies]
11-Apr-2013 12:32 PM
Forum:
Using jQuery
Hi guys,
Can I open a div injected from a ajax request in a dialog?
Example
Html
<button class="clickme">Click Me</button>
<div id="result"><div>
Php
if ($_REQUEST["action"] == 'greetings'){
echo' <div id="hello">Hello<div>';
}
Jquery
$(document).on('click', '.clickme', function(){
$.ajax({
url: 'php/function.php',
type: 'post',
data: {'action':'greetings' },
success: function(result) {
$("#result").append(result);
$( "#hello" ).dialog({
autoOpen: false,
width: 1200,
height: 500,
modal: true
});
$("#hello").dialog( "open" );
}
});
});
Thanks
Prolem to "slide" animation
[0Replies]
03-Apr-2013 10:33 AM
Forum:
Using jQuery
I would like to submit to this problem ... The complete example can be found on
http://jsfiddle.net/LyxFP/1/
I don't know why te button "fade" work and the button "slide" don't work ???
Any suggestion is welcome.
I put here the code also
HTML
<table>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
</tr>
<tr id="divHidden" style="display: none; background-color:red;">
<td colspan="4">
<table>
<tr>
<td>e</td>
<td>f</td>
<td>g</td>
<td>h</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br><br>
<button id="fade" >Click me (fade) !</button>
<button id="slide" >Click me (slide)!</button>
jQuery
$(document).on('click', '#fade', function(){
$('#divHidden').toggle("fade", 500);
});
$(document).on('click', '#slide', function(){
$('#divHidden').toggle("slide", 500);
});
CSS
table, tr, td{
border:1px solid black;
}
Thanks for the support
Bye
How can I set the time of delay of moseover in a on()?
[3Replies]
05-Mar-2013 01:16 PM
Forum:
Using jQuery
Hi Guys, I have a problem ... I want execute a function after 5 seconds that the user is on mouse over of a anchor ...
I have an element that is dynamical loaded ... I have to work with .on() ... How can I set the time of delay?
Code HTML:
<a href="#" id="test">Test</a>
Code jQuery:
$(document).on('mouseover', '#test', function(){
alert ("hello");
});
thanks
Call a function and pass the name of another function
[4Replies]
26-Feb-2013 04:52 AM
Forum:
Using jQuery
Hello guys,
I've a problem, i want call a function and pass the name of another function ... i've a code like this:
<body>
<div id="div">
<button id="button">Click Me!</button>
</div>
</body>
function hello(){
alert ('hello');
}
function welcome(a,b){
$('#div').css("background-color", 'red');
setTimeout(function() { b; }, 1000 );
}
$('#button').click(function(){
welcome('red','hello()');
});
How can I call the function hello()?
Thanks
Problem to start a script after an ajax response
[2Replies]
18-Feb-2013 06:17 AM
Forum:
Using jQuery
I have a HTML code like this:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<meta charset="utf-8">
<script src="js/jquery-1.9.0.js"></script>
<script>
$(function buttA() {
$("#buttA").click(function(){
alert ("Hello from buttonA");
});
});
$(function buttB() {
$("#buttB").click(function(){
alert ("Hello from buttonB");
});
});
$(function bReq() {
$("#bReq").click(function(){
$.ajax({
url:"test.php",
type:"post",
success:function(result){ $("#b").html(result);}
});
});
});
</script>
</head>
<body>
<div id="content">
<div id="a">
<button id="buttA">Button A</button>
</div>
<button id="bReq">Call Button B</button>
<div id="b">
</div>
</div>
</body>
</html>
and a PHP code like this:
<?php
echo '
<button id="buttB">Button B</button>
';
?>
Why Button B don't work ??
select a div in a div hidden
[6Replies]
14-Feb-2013 08:05 AM
Forum:
Using jQuery
I have a code like this:
<div id="body">
<div id="home" class="page" style="display:block">
<div class="content">...</div>
</div>
<div id="home" class="page" style="display:none">
<div class="content">...</div>
</div>
<div id="home" class="page" style="display:none">
<div class="content">...</div>
</div>
....
</div>
I want remove all "content" of "page" hidden and I think that this is the code:
$(".content.page:hidden").remove();
but don't work ... where I wrong ??
Thanks
Add icon in dialod titlebar and events???
[4Replies]
14-Feb-2013 07:45 AM
Forum:
Using jQuery UI
Can I add icon in the titlebar ? And if it's possible, how can I associate an event?
Thank you so much
Francesco
Open link in a dialog Window
[3Replies]
07-Feb-2013 10:35 AM
Forum:
Using jQuery UI
Hello guys,
I wold like to know if it's possible open a link (website) in a dialog Window.
Thanks a lot
Francesco
«Prev
Next »
Moderate user : cecco974
Forum