Re: [jQuery] New forum completely inaccessible
I would vote for using both the email list and forums. I would definitely not use the forum often since it requires opening a browser and going to site, getting to the forum, logging in, etc., etc too much trouble. I agree with you, but right now I'm a little bit confused: - this list in google will be removed or not? - both the email list and forums are working together or not? In this case messages are the same for sure? Thanks -- Massimiliano Marini - http://www.massimilianomarini.com It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] [jqGrid] getRowData() without rowid not work
Hi all, I'm using the the getRowData() method without the rowid and I do not receive all data in the grid into an array, I do not receive nothing, but the grid has data. The wiki said: If the rowid is not set the method return all the data from the grid in array. But If I give the rowid everything works fine. Where is the error? My code is simply: jQuery(#grid_id).getRowData(); -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Show/Open jqGrid with hiddengrid: true on a click event
Hi all, I'm using jqgrid with: hiddengrid: true, when the page is loaded the grid is collapsed. I ask if there's a way to open/show the grid when I made a click event on a link. In example: $(a.show-grid).click(function(e){ //code to open/show the grid which is now collpased. e.preventDefault(); }); -- Massimiliano Marini - http://www.massimilianomarini.com It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Shift+End doesn't works in input field - .filterToolbar()
Hi Tony, The problem is fixed in 3.5.3 release, which is published yesterday. Please upgrade to this release. Done, now works like a charm, great work! :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] [jqGrid] Shift+End doesn't works in input field - .filterToolbar()
Hi all, I can't select the text pressing the Shift+End keys and with the mouse double-click or mouse selection in the input field after using filterToolbar(). The problem appear only with IE8, any of you had the same problem and solved? .navButtonAdd(#pager-1,{caption:Search,title:Search toolbar, buttonicon :'ui-icon-search', onClickButton:function(){ gP[0].toggleToolbar(); } }); gP.filterToolbar(); PS: The online examples on trirand site works well. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] [jgGrid] How to populate editoptions:{value: ... } with query result.
Hi all, jgGrid version: 3.5.2 { name:'carname', index:'carname', width:150, align:right, editable:true, edittype:select, editoptions:{value: } // How to populate value with query result. }, I want to populate the value of edtioptions of my edittype:select with a query result because the data is changing every time. I've tried with a function (simple ajax call, PHP return the string in the right format) that returns a string of text, but doesn't work, if I place it inside editoptions in any right way. Someone of you know how to get this working? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: [jgGrid] How to populate editoptions:{value: ... } with query result.
Never mind, I've solved with dataUrl that works perfectly. Regards -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] [Form plugin] clearForm:true strange behavior in IE8
Hi all, this behavior happen only in IE8 (now in my case), instead FF3+ and Chrome both works well. I've a form with two selectoption/option/select tag e two input text, I do a validation and submission with ajaxSubmit(). In IE8 clearForm:true works well but when I do another Submit and I've not changed the select value, only the input text value are passed to the ajaxSubmit(). Someone got the same problem? There is a solution? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] jqueryui and nested tabs doesn't work
Hi all, why when I call this $('#tabs-1').tabs('select', 1); tabs stop working? What I'm doing wrong? This is the right way to obtain nested tabs or are there other ways? $('#tabs').tabs(); $('#tabs-1').tabs('select', 1); !-- Tabs -- div id=tabs ul lia href=#tabs-1First/a/li lia href=#tabs-2Second/a/li lia href=#tabs-3Third/a/li /ul div id=tabs-1 ul lia href=#tabs-1aFirst/a/li lia href=#tabs-1bSecond/a/li lia href=#tabs-1cThird/a/li /ul div id=tabs-1aLorem ipsum dolor sit amet .../div div id=tabs-1bLorem ipsum dolor sit amet .../div div id=tabs-1cLorem ipsum dolor sit amet .../div /div div id=tabs-2Phasellus mattis tincidunt nibh. .../div div id=tabs-3Nam dui erat, auctor a, dignissim quis, .../div /div -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jqueryui and nested tabs doesn't work
Any hint? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Call Jquery from Flash?
Hi Mirko, try with something like this: function showNeck () { $('.neck').highlightFade({color:'#… speed: 5000}); } And inside the flash script: import flash.external.*; ExternalInterface.call(showNeck, ); P.S: se funziona, il calendario autografato mandalo in PDF :) Regards -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Call Jquery from Flash?
ole funziaaa :) Allora... per il calendario... non ce l'hooo uno mio, ma ho quello che ho fatto a ciuski, mando quello. (scrivo sopra con simpatia a Massimiliano Marini... mirkojax?) Ok Mirko, vada per il calendario di ciuski (e per la dedica) che poi lo ricordo anche, hai fatto un bel lavoro :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.jgrid is undefined with jqgrid plugin
Hi Tony, A good explain why is this is here: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:how_to_install very helpfull, now all works fine thanks a lot. :) Regards -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] $.jgrid is undefined with jqgrid plugin
Error: $.jgrid is undefined Source file: http://localhost/test/js/jquery.jqGrid.min.js I don't understand why I get this error. http://trirand.com/jqgrid/jqgrid.html Cheers
[jQuery] Re: How to print json data, key and value
Hi Shawn, Native JS is capable of this sort of thing. [snip] HTH And I hope this is what you were after. Thanks so much for your explanation. Now it works. :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to print json data, key and value
Hi Charlie, I'm not good at explaining the exact terms javascript definitions for value and key but they are javascript identifiers? change it to what their values are in the array, works great what I want to do is to print the name and the value of a json object without knowing what the object has inside. The only thing I know is that inside the json object there are only [{name:value,name:value,name:value}], the object is not fixed lenght and the name:value are not always the same. Is it possible? -- Massimiliano Marini m...@linuxtime.it
[jQuery] How to print json data, key and value
Hi all, from my PHP script with json_encode() I print this json output: [{name:pippo,surname:pluto,age:20}] Is possible to print the key and the value of json object without using code like this: $.each(data, function(key, value){ console.log(value.name); console.log(value.surname); console.log(value.age); }); but something like: $.each(data, function(key, value){ console.log(key . '-' . value); }); and achieve output like this: name - pippo surname - pluto age - 20 -- Massimiliano Marini m...@linuxtime.it
[jQuery] Re: slideUp() does not make animation before remove() occurs
Maybe it's because opacity is already 0? Try using animate({ height:'toggle' }) instead I've tried your code, but the behavior is not what I'm trying to achieve. The slideUp() still not working. -- Massimiliano Marini m...@linuxtime.it
[jQuery] Re: slideUp() does not make animation before remove() occurs
I have made a slight change in your code. also note you did set the opacity to 0 before the slideUp that could effect your code [snip] i just added a 0.5 sec delay the same with your changes, the slideUp() still not working. -- Massimiliano Marini m...@linuxtime.it
[jQuery] Re: How to remove a row knowing the value of a checkbox.
Hi Paul, Try this var xxx = 5; $('input:attr[value='+xxx+']').parents('tr').remove(); works like a charm. Thanks 1K
[jQuery] slideUp() does not make animation before remove() occurs
Hi all, I'm using jQuery 1.3.2 that's the code: function removeChekbox(data){ $.each(data, function(i, val){ $('input[value='+val+']').parents(.item-container).animate({opacity: 0.0}, slow, function(){ $(this).slideUp(slow, function(){ $(this).remove(); }); }); }); } the code is correct, the remove() works well, but the slideUp() does not make the animation. Why?
[jQuery] Re: How to remove a row knowing the value of a checkbox.
Sorry, the right question is: How can I remove the entirely row containing the checkbox with the value for example 5? The value is returned to me by a PHP script, and of course is always different. table tr class=mouseOver tdinput type=checkbox value=1 name=chk[]//td tdfoo/td /tr tr class=mouseOver tdinput type=checkbox value=5 name=chk[]//td tdfoo2/td /tr tr class=mouseOver tdinput type=checkbox value=10 name=chk[]//td tdfoo2/td /tr /table
[jQuery] Re: Add a class only to the first parent
$(#foo .menu li:not(.expanded)).addClass(bar); Great Olaf, that's was exactly what I've tried to write. Thanks :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Add a class only to the first parent
Hi all, I need some help, I want to apply a class with 'addClass' at all li of the first ul class=menu and not to the second Example: div id=foo ul class=menu!-- first -- li1/li li2/li li class=expanded ul class=menu!-- second -- li3/li li4/li /li /ul /div How can I achieve this? Is possible without using the each() function? Any help, suggestions, examples are welcome. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Add a class only to the first parent
$('.menu:first').addClass(bar); Thanks to you and Olaf, the right way was: $(.menu:first li).addClass(bar); I know it was so easy, but thanks 1k :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jCarousel drupal example....
i have been to the jCarousel website...but it does not have any drupal examples on how to use jCarousel. Can someone offer up an example to use this with drupal ??? please? Something like that? http://drupal.org/project/viewscarousel I've no tested/used this module, it's jQuery plugin based. If you use this module tell us how it works and if you want a link where is in action. :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jCarousel drupal example....
Ops ... so sorry but: There are no published releases for this project. try to study this link : http://drupal.org/project/jcarousel Bye -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jQuery tabs and onClick
onClick: function(clicked) { var $tabs = $(clicked).parents('ul:eq(0)').find('a'); if ($tabs.index(clicked) == 1) { alert(Clicked 2nd tab!); } } Thanks Klaus, it works perfectly! :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] jQuery tabs and onClick
Hi all, I'm using the amazing jQuery tabs plugin, but I'm having problem with this code: $('#container-1').tabs(2,{ fxFade: true, fxSpeed: 'fast', onClick: function() { alert(Clicked!); } }); I know this code is wrong, but I want enable the event onClick only on a specific tab. How I can do it ... if is possible? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: [Solved]Re: How to use Form Plugin and ValidationAide Plugin
Hi Jorn, this code works perfectly but I can manage the ajax response, a simple json d,ata like in your example, firebug show me the response but I can't manage why? My code is like your code ... but mine don't work. Any suggest will be appreciated. I've found the problem, I use the latest form plugin by Mike Alsup that has romved after: option and now use success for the server response. Tnx for the form validation plugin! :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to use Form Plugin and ValidationAide Plugin
The interesting code is this: var v = jQuery(#form).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ dataType: json, after: function(result) { if(result.status) { v.showErrors (result.data); v.focusInvalid(); Hi Jorn, this code works perfectly but I can manage the ajax response, a simple json d,ata like in your example, firebug show me the response but I can't manage why? My code is like your code ... but mine don't work. Any suggest will be appreciated. My code : var v = $(#frmCreaStudio).validate({ debug: true, focusInvalidElement: true, errorLabelContainer: $(#frmCreate div.error), submitHandler: function(frmCreate) { $(#frmCreate).ajaxSubmit({ url: jresponse.php, dataType: json, after: function(result) { if(result.status) { v.showErrors(result.data); v.focusInvalid(); } } }); } }); I've a div with id=result but nothing appear inside, I've tried to put some alert in every position but nothing ... my brain is stalled. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] How to use Form Plugin and ValidationAide Plugin
Hi all, I'm using Form Plugin without problem, now I need to validate the fields, in the jQuery's plugin page I've found this plug-in: http://dnaide.blogspot.com/2007/05/validationaide-easy-as-client-side-form.html My question is : There's a way to validate the field with this plugin and when all is ok ajaxForm do his works? I manage my form with this Form Plugin code: $(document).ready(function() { $('#f1').ajaxForm(function() { target: '#response', success: function() { $('#response').fadeIn('slow'); } }); -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to use Form Plugin and ValidationAide Plugin
I manage my form with this Form Plugin code: $(document).ready(function() { $('#f1').ajaxForm(function() { target: '#response', success: function() { $('#response').fadeIn('slow'); } }); Maybe it help, the call to the plugin for the form validation is simply : $(#f1).validationAideEnable(); But I don't know if both plugin can work together. Any idea? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] How to bind a submit form action
Hi all, I'm not sure if subject is right, but I'm going crazy with this problem: after an ajaxCall I return this code: $(.public).after(input type=submit name=action value=Update class=update).remove(); this code works well, in the form the button (Public) is replaced with (Update), but when I press the button not action value is passed, only the content of the fields are passed. This code for the Public event works well, but not works for Update event when the button is replaced. $('#formPub').ajaxForm({ target: '#response', beforeSubmit: function() { //Some check }, success: function(){ $('#response').fadeIn('slow'); } }); More detail on update event :in Firebug, in the post tab, I can see all the fields value but not this value: action: Update. Where I'm in error? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to bind a submit form action
$(.public).after(input type=submit name=action value=Update class=update).remove(); $('#formPub').unbind('submit').find(':submit,input:image').unbind ('click'); $('#formPub').ajaxForm({ target: '#response', beforeSubmit: function() { /* whatever */ }, success: function(){ $('#response').fadeIn('slow'); } }); Thanks Mike, it's simply perfect! -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Problems with jQuery's site?
Someone has noticed it? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Problems with jQuery's site?
Looks good to me. What did you see? Sorry guys, the problem was: our internal proxy! Now is all ok, thanks. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Fill form fields with value returned from a query
Hi all, like in the subject, I do a query with $.ajax on a php file, the query retrieve a name and a surname, in which format I must send out the data from my php file? And how I can manage this data to fill in the appropiate field in my form? My actually jQuery code : $.ajax({ type: POST, url: test.php, data: query:editid=+idval, success: function(data){ //what code I must put inside here, first for reading the data //and next using it to fill the fields in my form? } }); The query in which format must send out the data? Question: something like this is correct : ? echo {name:'pippo',surname:'pluto'}; ? Thanks for any help, advise and suggest. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to show/add content under a row in a table
Then I do $(tr:even).hide(); this works fine, but also the thead/thead become hidden. There's a method to exclude the thead tag? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: How to show/add content under a row in a table
this works fine, but also the thead/thead become hidden. There's a method to exclude the thead tag? I've solved this problem using tow different classes, one for the tr that must be visible and one for the tr must me hidden. Tnx at all. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Select only the next row in a table
Hi all, I've this table : table id=t1 tr class=visible tda href=# class=showNextRowView Next Row/td tdCell with content/td /tr tr class=hidden td colspan=2Hello to the jQuery community/td /tr ... ... ... /table I'm using this code to diplay the tr with hidden class : $('a').filter('.visible').click(function(){ $('.hidden').toggle(); } what I want to do, is to toggle or show only the tr(only one only the next) that is under the tr where is the link that I've clicked. I think the example and the code may help more than my description of the problem :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Select only the next row in a table
Great! It works! :) I've learned something new, thanks to Glen, Corey and Karl. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] jQuery and tinyMCE problem
Hi all, I've a form with 1 field and 1 textarea, for the textarea I'm using tinyMCE. I've included the scripts : script type=text/javascript src=jquery-latest.pack.js/script script type=text/javascript src=jquery.form.js/script script language=javascript type=text/javascript src=tinymce/jscripts/tiny_mce/tiny_mce.js/script This code is correct? Or tinyMCE must be initialized in another way with jQuery? script type=text/javascript $(document).ready(function(){ $('#formPub').ajaxForm({ target: '#response', success: function(){ $('response').fadeIn('slow'); } }); }); /script script language=javascript type=text/javascript tinyMCE.init({ mode : exact, elements : txt1, theme : simple }); /script It appears to works but not like I expect, I've a problem that make me crazy: When I submit the form with the POST method only the field become updated in my div id=response/div, I must re-submit the form and the content of the textarea appears. I've omitted the code of the form, is a simple form with a field and textarea, but if is necessary I post it. Someone know why and can help me? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jQuery and tinyMCE problem
Surely you mean $('#response').fadeIn('slow'); not $('response').fadeIn('slow'); Thanks I've corrected it, but the problem still remain. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jQuery and tinyMCE problem
just curious... does your textarea has an id attribute... i don't know if it is required, but if it doesn't have an id, then adding one might help. just my .02. Yes my textarea have an id, but the problem still remain :( My form : form method=post action=send.php id=formSend strongTitlestrong /br / input type=text name=title size=50 br / strongMessagestrong /br / textarea id=txt1 name=message rows=10 cols=50/textarea br / input type=submit name=action value=Send input type=reset value=Reset /form -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jQuery and tinyMCE problem
Actually, I think this is what you want: $('#formPub').ajaxForm({ target: '#response', beforeSubmit: function(a) { for (var i=0; ia.length; i++) if (a[i].name == 'txt1') a[i].value = tinyMCE.getContent(); }, success: function(){ $('#response').fadeIn('slow'); } }); Mike you are incredible, it's just what I wanted. Thanks :)) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] How to show/add content under a row in a table
Hi all, I've lost the post and/or the link, but if I don't remember wrong, there's a solution to my question (I hope). I've a table that show a list of title like this: table trtdTitle1/td/tr trtdTitle2/td/tr ... /table I want to display (by an ajax request, but this is not the problem) the messagge under the row that I've clicked on title, well I don't know how to implement this behavior someone can tell me how I can do it? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Why I can't access to a tag in a div
$(document).ready(function(){ $.ajax({ type: GET, url: news.php, success: function(msg){ $(#response).fadeIn(slow).html(msg); } }); $(a#response).click(function(){ alert(Hello); return false; }); }); body div id=response/div /body /html in response appear the data from $.ajax, a simple list of record : a href=pippo?id=1 a href=pippo?id=2 a href=pippo?id=3 Why I can't access to the click event of the a tag in response div? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Why I can't access to a tag in a div
Your code is saying an A tag that has an id of response. To get a jQuery object containing all a tags inside that div, it should look like this: #response a I have corrected as you have said, but still not work, this is the correction I have applied: $(#response a).click(function(){ alert(Hello); return false; )}; It could depend on the content that is generated in dynamic way? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Why I can't access to a tag in a div
Well, it depends. When you say that the content is generated dynamically, are you saying that it's generated by a server side language like ColdFusion or PHP? I think this case, this is my code: $.ajax({ type: GET, url: news.php, success: function(msg){ $(#response).fadeIn(slow).html(msg); } }); -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Why I can't access to a tag in a div
You have to rebind the clicks after the ajax loads: Thank you 1K Sean for and Andy, I've learned something new -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post not load why?
Hi Mika, You could run a proxy script in server where Javascript is downloaded from. Simple proxy.php can be written with one line of PHP. ?php readfile($_GET['url']); ? Then instead of $(#remote).load(http://www.google.com/;) you would do $(#remote).load(http://www.example.com/proxy.php?url=http:// www.google.com/); Thanks a lot for your help! :) -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: jQuery loaded dinamically
Any hint about it? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] $.post not load why?
I want to load news in my html page from a php script from another site. I have included this script in my html page, but not work, maybe I'm wrong using $.post? $(document).ready(function(){ $.post(http://www.othersite.it/news.php;, function(data){ $(#response).append(data).show('fast'); }); }); div id=response/div -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post not load why?
ajax can't work cross domain by design for security reasons. There's no other method, workaround or something else? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post not load why?
Depends on what you are trying to do, if you can run php on your server, you can pull in the external site and the use ajax to reference that php page. Not always php is present, I want to include a script and a div in html page, the script must populate the div querying a .php file in another server. Only this. I'm curious about your solution, how can I implement it? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] jQuery loaded dinamically
Hi all, I'm in this case, I want to create a simple script for the visualization of a simple list of news, that I will be included in a web page in another site. script src=http://site/news.js; type=text/javascript/script in news.js I load jQuery dinamically and all the ajax request to a php file. For the dynamic load I will use this code : if (!jQuery) { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://jquery.com/src/jquery-latest.pack.js'; document.getElementsByTagName('head')[0].appendChild(script); } There's a better method or this is well? Then, how I must proceed with the writing the rest of the code? The structure where I will use the ajax request and all the rest?. The right impostation? I've no idea. Someone have implemented this method? Suggest, link and/or example are very appreciated. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: .load external page by url
Massimiliano? From Fabico? O.o Not. From Italy. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Help on Form plugin and Form validation field
Hi folks, I use the great Form Plugin of Mike Alsup with success, but in my form I need a validation of the fields (more fields are of different type). In my first step I need to validate the fields and then call AjaxForm (Form Plugin). How and wich plugin for the validation fields can I do that? Help would be much appreciated. Thanks. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] .load external page by url
Hi all, is possible to load an external page with the .load()? something like this: example : $('#mydiv').load('http://www.jquery.com/'); naturally this script not work, thanks for the helps -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: .load external page by url
something like this: example : $('#mydiv').load('http://www.jquery.com/'); From the manual : load( String url, Object params, Function callback ) returns jQuery Load HTML from a remote file and inject it into the DOM. for remote file it's meant a file in the same server where is the application and not a remote file in a remote url. If I'm in error please correct me. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: .load external page by url
Hi Matt, Thats correct, ajax calls cannot retrieve external pages for security reasons. The only way to get external pages onto your page is to use an iframe, or a simple server side proxy that you can call with your ajax. Thanks for your help. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: $.post send data problem
I'm sending something like this $.post(/scripts/login.php,{u:USER,p:PASS,r:STAY},function(txt) {$(div#+div).html(txt);}); $.post(/scripts/login.php, {u:USER,p:PASS,r:STAY},function(data){ $(#response).append(data).show('fast'); }); create a div id=response/div try this code and let me know if work. P.S.: My advice is to use firebug for a better debug detail. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Suggestion on authentication form
Hi all, someone knows or has realized an authentication form calling a external PHP file for the authentication, in order to remain to the inside of the main page (index.php) All I want realize is this, when I click on submit, I call the login.php file that control user and password. What I must give back in both of case? I've posted my solution, it works, but I'm not sure of it, may be there's a better way, more secure. Any idea, suggestions, code, corrections are welcome. My code in index.php $(document).ready(function(){ $('#formLogIn').ajaxForm({ success: showResponse }); function showRequest(formData, jqForm, options) { var queryString = $.param(formData); alert(queryString); return true; } function showResponse(responseText, statusText) { if(responseText == Yes) { // Show/Hide DIV, I'no not problem to implement that :) } if(responseText == No) { alert(It does not exist); } } form id=formLogIn method=post action=login.php Username : input id=u type=text name=username / Password : input id=p type=password name=password / input id=submit type=submit name=submit value=Entra / /form login.php contains a simple query to a DB and returns : echo Yes // if exists echo No // if not exists -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Reload page
Hi all, It is possible to recharge the entire page like a refresh? If yes how? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] How to manage a response ...
Hi all, sorry for my bad subject, I try to explain in a better way my question, I'm using jQuery with Smarty and PHP, I've a form with username and password fields for a simple authentication div id=frmLogIn form id=formLogIn method=post action=login.php Username : input type=text name=username / Password : input type=password name=password / input id=submit type=submit name=submit value=Enter / /form div id=responseLogIn/div /div $('#formLogIn').ajaxForm({ target: '#responseLogIn', success: function() { $('#responseLogIn').fadeIn('fast'); } }); My structure with Smarty is this index.php - where smarty display index.tpl (the page site) index.tpl - include header.tpl footer.tpl and the content like a DIV of TopNavBar, DIV Form LogIn and other content. In login.php I check in DB if the account exist, If the account exist, what I want to do is return something (I don't know what and how) can change my page content with another DIV (a private area of the account), this is my idea, but the problem is: I've not idea how to do this. Any suggest are welcome. Thanks. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: About form upload
Hi Mike, Just start with something simple, like this: I was getting lost in a water glass many thanks for your help and great script, now is more clear. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: Show and Hide DIV
Hi Sean, You're on the right track. To only show one at a time, simply store the last one open in a variable and close it before opening the new one, here's an example: Thank you for your help, your suggest have inspired me and I've writed this code, I don't know if have sense or not, but work, any comment suggest correction are welcome The code I'm actually using $(#scTopNavList li a).click(function(){ var currOpen = ($(this).attr(href)); if($(currOpen).hide(fast)){ $(currOpen).show(fast); return false; }else{ $(currOpen).hide(fast); return false; } }); -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] About form upload
Hi all, I'm having problem with the upload form and I don't understan where I'm in error, I'm trying to reproduce the example of Mike Alsup. I explain what I've done file index.html html head titleTitle/title script type=text/javascript src=js/jquery-latest.pack.js/script script type=text/javascript src=js/jquery.form.js/script script type=text/javascript $(document).ready(function(){ // I don't undestand what exactly I must put here $('#uploadForm').ajaxForm({ beforeSubmit: function(a,f,o) { // o is not necessary for me right? // a and f ? o.dataType = $('#uploadResponseType')[0].value; // I've removed tihs div is here the error? I don't need this $('#uploadOutput').html('Submitting...'); }, success: function(data) { var $out = $('#uploadOutput'); $out.html('Form success handler received: strong' + typeof data + '/strong'); if (typeof data == 'object' data.nodeType) data = elementToString(data.documentElement, true); else if (typeof data == 'object') data = objToString(data); $out.append('divpre'+ data +'/pre/div'); } }); }); // I think this is necessary function objToString(o) { } // Also this function elementToString(n, useRefs) { } // I'm missing something else? /script /head body form id=uploadForm action=upload.php method=POST enctype=multipart/form-data File: input name=file type=file input type=submit value=Invia /form div id=uploadOutput/div /body /html -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Show and Hide DIV
Hi all, I'm in this situation : ul id=scTopNavList lia href=#divPippoPippo/a/li lia href=#divPlutoPluto/a/li /ul when I click on Pippo I show the div #divPippo e vice-versa with Pluto with this code (I don't know if is good but it work :) ) : $(a).click(function(){ var div = ($(this).attr(href)); $(div).show(fast); return false; }); I want this behavior: when I click on Pippo the divPippo must appear but if another div (example Pluto) is opened it must be closed. In my example I've reported 2 href (pippo and pluto), but if I want to do this with a lot of link hows can I do this? Some suggestion? Thanks. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ It's easier to invent the future than to predict it. -- Alan Kay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---