[jQuery] datepicker
I am using the jQuery datepicker. When the user selects an item in a drop down list box the selectable dates in the calender in the datepicker get updated with all selectable dates associated with the selected drop down list item. The dates seem to update fine except for the very last one. If I click the back arrow for the last month then the forward arrow to go to the current month the calendar then has all of the new selectable dates. Any idea why the current months selectable dates aren't updated with the calender as rendered? Thanks.
[jQuery] toggle() won't hide
http://www.erikaashauerphoto.com/blog/ At the end of each post there is the link to the comments, clicking uses the jQuery toggle() function. This works perfectly to show the comments below, but clicking on the link again does not hide the comments as expected. This is using jQuery in noconflict mode since that is how WordPress decides to embed it.
[jQuery] Re: Input fields bug
Thanks a lot gil, tried it and it worked immediately! Thanks again! On Jul 21, 4:02 pm, gil gilalbe...@gmail.com wrote: Hi Koos, It might be this: When you open the pop up it adds some divs, but there is one that doesn't disappear when you click exit. Disable the div with id=overlayButtonPlaceholder with display:none, when you close the popup. Regards On Jul 21, 2:09 am, Kozie flamefing...@gmail.com wrote: Hi, I recently stumbled upon an oddbugi haven't seen earlier while developing my website (http://demo.7u.nl/liveandtravel/index.htm). Thebugis only relevant for IE browsers (even IE8 though). When clicking on a block with text, like 'Stranden' or 'Rondreizen', you see a popup with the relevant page This popup is actually the jQuery plugin 'BlockUI'. After you've openend a popup once, theinputfieldsbelow (in the 'Bel mij' block) will act very odd. You can only focus the field by navigating to it with the tab-key or by clicking the few available corners and edges. I've been busy for some hours trying to figure out what is causing this problem. Even with some nasty tricks i wasn't able to have this section work more user friendly. I hope someone is able to help me get a step further in this development process. Thank in advance. Koos
[jQuery] Re: shifting a box sideways and making it gradually dissapear
Hi, Try this. Add overflow:hidden to #box and then animate the left of #innerbox: #box{ width:800px; height:400px; border:1px solid #444; overflow:hidden; } $(#toggle).toggle(function(){ $(#innerbox).animate({ left: '180px' }, 'slow'); },function(){ $(#innerbox).animate({ left: '0px' }, 'slow'); }); Paul On Jul 21, 10:38 pm, Simon svansint...@gmail.com wrote: Hey, so there might be a simple solution to my problem, but here is my question: I have a box: html div id=box div id=innerbox a href= id=toggle/a There is some text inside this box. It spans the entire width blah blah blah. /div /div styles=== #box{ width:800px; height:400px; border:1px solid #444; } #innerbox{ position:relative; width:200px; float:right; } #toggle{ width:20px; background-color:grey; height:400px; float:left; } Now this innerbox needs to move to the side to reveal whatever is below it when the toggle is clicked. As the the innerbox moves out of the main box the parts of it that leave main box should become invisible. Now there is a simple solution in which I make the background of the innerbox an image and decrease the width using jQuery's .animate(). This isn't ideal however, since I kinda need there to be text users can interact with in the innerbox. javascript $(document).ready(function(){ $(#toggle).toggle(function(){ $(#innerbox).animate({ width: '75px' }, 'slow'); },function(){ $(#innerbox).animate({ width: '200px' }, 'slow'); }); }); == On the other hand, shifting the innerbox to the right (instead of decreasing the width of the image) means that it extends the reach of the encompassing box. javascript $(document).ready(function(){ $(#toggle).toggle(function(){ $(#innerbox).animate({ right: -=125 }, 'slow'); },function(){ $(#innerbox).animate({ right: '-=125' }, 'slow'); }); }); Does anyone have any ideas how I can solve this? I've thought of placing divs with a higher z-index next the main box but this isn't really an option, since it would make the website too large. Any help would be much appreciated. Thanks, Simon
[jQuery] Re: UI Tabs and xStandard Object
Bug fix for more than two tabs $('#tabs').tabs({ select: function(event, ui) { // GET AND SET OBJECT PARAM VALUE AND STORE IN STANDARD HIDDEN INPUT WHEN SELECTING TABS content = $(#content).val(); if(ui.index==0) { // SET $(#editor1 param[name='Value']).val(content); } else if(!content) { // GET ONLY IF CONTENT EMPTY editor1 = $(#editor1).val(); $(#content).val(editor1); } } }); On 21 July, 16:54, blackmetaluk blackmeta...@googlemail.com wrote: Created a fix $('#tabs').tabs({ select: function(event, ui) { // GET AND SET OBJECT PARAM VALUE AND STORE IN STANDARD HIDDEN INPUT WHEN SELECTING TABS if(ui.index==0) { // SET content = $(#content).val(); $(#editor1 param[name='Value']).val(content); } else { // GET editor1 = $(#editor1).val(); $(#content).val(editor1); } } }); On 20 July, 09:47, blackmetaluk blackmeta...@googlemail.com wrote: Hi, This did not seem to work. The tab in question is the first tab so is not hidden when the page loads. Thanks On Jul 20, 7:26 am, Klaus Hartl klaus.ha...@googlemail.com wrote: Could you try this?http://docs.jquery.com/UI/Tabs#...my_slider.2C_Google_Map.2C_sIFR_etc... --Klaus On 19 Jul., 15:25, blackmeta...@googlemail.com blackmeta...@googlemail.com wrote: Hi I seem to have found the following bug. (I am using the the latest versions of all products mentioned) When using jQuery UI Tabs with the following code in one tab, I then select another tab then selected the first tab again the content of the xStandard object is lost or reverts to the initial value. All other form values on the tab are sill preserved as expected. object type=application/x-xstandard id=editor1 width=100% height=550 codebase=http://xxx/XStandard/ XStandard.cab#Version=2,0,0,0 name=content param name=Value value=enter text / /object The object also flickers a bit when scrolling the page. I have encountered these problems in Firefox and Chrome so far but is fine in IE8. Not sure if this is a UI or Browser bug. Can anyone shed some light on this problem as I don't really what to have to recommend IE8. Cheers
[jQuery] validate : check if email @ domain (website)
I've 2 inputs (email website) and using Validate Plugin. I want to check if the email is on same domain .
[jQuery] Re: validate : check if email @ domain (website)
There is no built-in support for that, so you need to write a custom method: http://docs.jquery.com/Plugins/Validation/Validator/addMethod Jörn On Wed, Jul 22, 2009 at 11:20 AM, Mahmoud M. Abdel-Fattahengm...@gmail.com wrote: I've 2 inputs (email website) and using Validate Plugin. I want to check if the email is on same domain .
[jQuery] Ajax call Scope - Module Pattern and non singleton pattern
Hi, my problem is due to the scope. Using the module pattern following the Eric´s design explained on the Amazon Books widget example(http:// net.tutsplus.com/tutorials/javascript-ajax/create-an-amazoncom-books- widget-with-jquery-and-xml/) we have something similar to this: var BOOKS = function(){ var _P = { init : function( params ) {}, params : null, data : null, loadXml : function() { $.ajax({ type : GET, url : _P.params.xmlPath, dataType : xml, success : function( data ) { _P.data = data; _P.max = _P.params.perView; _P.count = $( book, data ).length; _P.preloadBooks(); _P.browseBooks(); } }); }, first : 0, max : 0, count : 0, preloadBooks : function() {}, browseBooks : function( browse ) {}, tooltip : { show : function( e, $o ) {}, hide : function( e, $o ) {}, getMouseCoord : function( v, e ) {}, getViewport : function() {} } }; return { init : function( params ) { _P.init( params ); } }; }(); And it works, perfectly, after we can access to any _P attribute with the use of _P. in any part of the code, and the call works perfectly saving the value of the ajax call. The problem is that this pattern creates a singleton instance, so it is not possible to use more than one widget on a same web. Which patter could we use to give it multiple instances and be able to use several widget? I tried several ways but i can never save the async call into variables, always undefined result. Thanks indeed.
[jQuery] Re: jquery, php question (Probably the wrong place to ask)
I'm not quite sure about your question, but I will say that I see some problems with your code... In the document.write(); function, I see 2 main problems... one is that it doesn't look like you are closing your trtd tags...after the input tag you should add /td/tr The other is in the name= attribute of the input tag...it looks like you are escaping some but not all of your quotes, and not including a closing paren for the .write function. It should be like this: document.write(trtdinput type=\text\ name=\c\ + i + \\); or if that looks too confusing, use single quotes inside, like this: document.write(trtdinput type='text' name='c' + i + ''); On Jul 21, 5:16 pm, Greg Evans greg.djr...@gmail.com wrote: The code now is like this: div id=dialog title=Create Manifest form id=myForm action=pl/ newload.pl method=post table tdChest:/td tdSELECT NAME=Aircraft option ?php $user=user; $password=pass; $database=completChest; mysql_connect('127.0.0.1',$user,$password); @mysql_select_db($database) or die( Unable to select database); $query=SELECT * from Chests where chest_active=1; $result = mysql_query($query); while ($myinfo= mysql_fetch_row($result)) { print option onselect( populate($myinfo[5]) ) value=\$myinfo[0]\. $myinfo[2]. .$myinfo[3]. .$myinfo[1]; } ? /select/tdtr trtd colspan=2Items in Chest/td script type=text/ javascript function populate(max_chest){ for(var i=0;i=max_chest;i++){ document.write(trtdinput type=\text\ name=\c+i+\; } } /script /table /form /div On Jul 21, 2009, at 1:41 PM, Glazz wrote: Hi, What is the code that you now? If you have none we can help you create the code you need But you are going to use $.ajax() to get the numbers that you are talking about from the MySQL table. And then you can update the form as your needs. Btw, im a neewbie too but i can help in what i can :) Regards, Bruno. On 21 Jul, 21:24, raisputin greg.djr...@gmail.com wrote: Hello, newb here ;) This is probably the wrong place to ask, but maybe someone could point me in the right direction if that is the case :) I am pulling data from a mysql database to partially populate a form. This is all done in a 'dialog' which is really slick, so when I open that dialog, i get (please excuse the crude drawings) Dropdown menu [ Chest 1 ] [ Chest 2 ] [ etc... ] That part I have working fine, what I need to do now is make it so that when someone selects Chest_N it will populate the form with say the number of drawers in that chest as each chest may have any number of drawers (within reason of course). The information for each chest, such as mfr, etc. and including the number of drawers is stored in the 'chests' table in mysql like Table: Chests chest_id chest_name chest_color chest_serial chest_num_drawers so when I select a chest in the dropdown, I need to create fields like Drawer 1 - Drawer N as text boxes in the form. The mySQL queries I can do as that is super simple, I am just not sure how to make it do the query once a chest is selected. Any help appreciated, and if I am asking in the wrong place, a direction to the proper place to ask would also be appreciated. :) Thanks in advance
[jQuery] Re: jquery, php question (Probably the wrong place to ask)
lol forgot to close the tags myself... document.write(trtdinput type=\text\ name=\c\ + i + \\/ td/tr); or document.write(trtdinput type='text' name='c' + i + ''/td/ tr); On Jul 22, 7:22 am, p_W paulwoolcoc...@gmail.com wrote: I'm not quite sure about your question, but I will say that I see some problems with your code... In the document.write(); function, I see 2 main problems... one is that it doesn't look like you are closing your trtd tags...after the input tag you should add /td/tr The other is in the name= attribute of the input tag...it looks like you are escaping some but not all of your quotes, and not including a closing paren for the .write function. It should be like this: document.write(trtdinput type=\text\ name=\c\ + i + \\); or if that looks too confusing, use single quotes inside, like this: document.write(trtdinput type='text' name='c' + i + ''); On Jul 21, 5:16 pm, Greg Evans greg.djr...@gmail.com wrote: The code now is like this: div id=dialog title=Create Manifest form id=myForm action=pl/ newload.pl method=post table tdChest:/td tdSELECT NAME=Aircraft option ?php $user=user; $password=pass; $database=completChest; mysql_connect('127.0.0.1',$user,$password); @mysql_select_db($database) or die( Unable to select database); $query=SELECT * from Chests where chest_active=1; $result = mysql_query($query); while ($myinfo= mysql_fetch_row($result)) { print option onselect( populate($myinfo[5]) ) value=\$myinfo[0]\. $myinfo[2]. .$myinfo[3]. .$myinfo[1]; } ? /select/tdtr trtd colspan=2Items in Chest/td script type=text/ javascript function populate(max_chest){ for(var i=0;i=max_chest;i++){ document.write(trtdinput type=\text\ name=\c+i+\; } } /script /table /form /div On Jul 21, 2009, at 1:41 PM, Glazz wrote: Hi, What is the code that you now? If you have none we can help you create the code you need But you are going to use $.ajax() to get the numbers that you are talking about from the MySQL table. And then you can update the form as your needs. Btw, im a neewbie too but i can help in what i can :) Regards, Bruno. On 21 Jul, 21:24, raisputin greg.djr...@gmail.com wrote: Hello, newb here ;) This is probably the wrong place to ask, but maybe someone could point me in the right direction if that is the case :) I am pulling data from a mysql database to partially populate a form. This is all done in a 'dialog' which is really slick, so when I open that dialog, i get (please excuse the crude drawings) Dropdown menu [ Chest 1 ] [ Chest 2 ] [ etc... ] That part I have working fine, what I need to do now is make it so that when someone selects Chest_N it will populate the form with say the number of drawers in that chest as each chest may have any number of drawers (within reason of course). The information for each chest, such as mfr, etc. and including the number of drawers is stored in the 'chests' table in mysql like Table: Chests chest_id chest_name chest_color chest_serial chest_num_drawers so when I select a chest in the dropdown, I need to create fields like Drawer 1 - Drawer N as text boxes in the form. The mySQL queries I can do as that is super simple, I am just not sure how to make it do the query once a chest is selected. Any help appreciated, and if I am asking in the wrong place, a direction to the proper place to ask would also be appreciated. :) Thanks in advance
[jQuery] extend an Object
Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] Re: Superfish Wordpress
you're php always assigns current page class to Home li class="current_page_item"a href=""Home/a/li try this: li ?php if(is_home()){echo 'class="current_page_item"';}? a href=""Home/a/li if you use the pathClass option properly you can shorten the superfish constructor $('ul.sf-menu') .superfish({ pathClass : 'current_page_item' delay: 500, speed: 'fast' }); Taniss wrote: hi, i to do this in the header $('document').ready(function(){ $('ul.sf-menu') .find ('li.current_page_item,li.current_page_parent,li.current_page_ancestor') .addClass('current') .end() .superfish({ pathClass : 'current' delay: 500, speed: 'fast' }); }); /script and this in the body. body div id="page" div id="header" h1a href=""?php bloginfo('name'); ?/a/h1 h2 id="blog-description"?php bloginfo('description'); ?/h2 ?php include (TEMPLATEPATH . '/searchform.php'); ? div id="menu" ul class="sf-menu" li class="current_page_item"a href=""StationeryCiteGenerated_1" type="cite"> "Home/a/li ?php wp_list_pages('title_li='); ? /ul /div div class="clear"/div /div!-- end header -- in my suberfish.css i wrote .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:active, .sf-menu li.current_page_item { color: green; background: url(../img/nav_bg.jpg) repeat-x left bottom; it works fine but the problem that i have is when i load the website the home button is checked correct but when i go to another menu then is that checked and the home but i dont is that correct the first button must be unchecked...sorry my english is not so goodwhat ist my mistake taniss
[jQuery] update several divs within a .each() loop
Hi everybody! I want to update the contents of several divs periodically with the response i get from a php-script. the number of divs is changing depending on what the user has chosen before. i store the variable part of the ids in a hidden input field. this input field may look like this: input type=hidden name=devices value=1,2,3,4,5,6,7 to do this task periodically i use setIntervall(): script type=text/javascript // dies stellt sicher, dass updateDivs() erst ausgeführt wird, wenn die ganze seite geladen wurde $(document).ready(function() { updateDivs(); // wenn die seite komplett geladen ist, soll die progress- bar verschwinden $(#hide_me).hide(); }); setInterval(updateDivs(), 5000); /script and the Code of the updateDivs() function: code function updateDivs() { $($([name=devices]).val().split(,)) .each(function(){ var handler_url = 'devices_handler.php'; var devID = this; var randomNumber = Math.random(); // DATEN-Abfrage mit ajax-queue var monValues = $(#mon_ + devID).val(); var getValuesParams = { do:1, de:devID, mo:monValues, rand:randomNumber } $.ajax({ type: GET, cache: false, url: handler_url, data: getValuesParams, async: false, success: function(response){ //alert(response); $(#dev_ + devID).html(response); } }); }); } /code Now the Problem: The only browser who behaves as expected is Firefox 3.x - he flushes the response after every ajax-request to the corresponding div ( .html (response) ). All the other browsers are not updating the contents of the divs until all the responses are available (although i execute the request with async=false), and then they update all the divs (ids dev_1 to dev_7) at the same time... but for me it would be necessary that the other browsers behave like Firefox 3. Does anyone have an idea? I would really appreciate it :-) Thanks! Daniel
[jQuery] converting an html table to json
hi, i'm new to jquery and i was wondering how i can use it to convert an html table into a json format. i found a lot of help for doing the reverse (json to html table) but couldn't get much help with this one. thanks a lot in advance.
[jQuery] Detect Enter event with Jquery on Linux
Hi there, I am using jquery to make a Comet chat client. But I have problems to detect press enter event on Linux. It's really strange. The same code runs well on windows: j.input.bind(keydown, function(l) { if (l.keyCode == 13) { //doing some stuff here, like sending the message Any suggestions?
[jQuery] error
jCarousel: No width/height set for items. This will cause an infinite loop. Aborting... i am geetting the above error msg can anybody help me
[jQuery] Re: Detect Enter event with Jquery on Linux
Try checking for 28 instead of 13 cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Shi Zhuguo bluefl...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 08:20 AM Subject:[jQuery] Detect Enter event with Jquery on Linux Hi there, I am using jquery to make a Comet chat client. But I have problems to detect press enter event on Linux. It's really strange. The same code runs well on windows: j.input.bind(keydown, function(l) { if (l.keyCode == 13) { //doing some stuff here, like sending the message Any suggestions? inline: graycol.gifinline: ecblank.gif
[jQuery] Re: Ajax call Scope - Module Pattern and non singleton pattern
I realized that using the engfer(s)´s module pattern (http:// www.engfers.com/code/javascript-module-pattern/) i can access only using async:false attribute for the ajax call. If i use the async:true i don´t get the params. But it is not a well done practice.
[jQuery] Re: jQuery Cycle Plugin and Links
the details you want to display can also be contained elsewhere if you want by using the index of the current slide to match the index of another set of containers function onAfter(curr, next, opts) { var index = opts.currSlide; // use index to refernece other containers to work with } thus you can hide a series of containers and display the ones you want on each slide. Also can use the onBefore to hide, animate or whatever to remove the info showing , let new slide show up, then add new info with onAfter Mescalero wrote: Thanks guys, Using that, this is what i have: $(function() { $('#slides').before('div id="nav" class="nav"').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav', after: onAfter }); }); function onAfter() { $('#article-description').html("h3" + this.title + "/ h3") .append('p' + this.alt + ' a href=''Read more /p'); } and then in the body i have something like: img name="" src="" width="388" height="218" title="Botanical Garden" alt="Almost 300 acres, the botanical garden has miles of streams and nature trails, display gardens, and flowers and plants." link="http://www.scbg.com" / the only problem is that this.link is coming up undefined. I am curious where i need to define it so that it will pick up the link attribute like it does "src" and "title." If i just put the link in the unused 'name" attribute and change to + this.name it also works, but that i may want other attributes later down the road...does this make sense? Matt On Jul 20, 7:07pm, Mike Alsup mal...@gmail.com wrote: I would like to add another attribute to the img tag called "link." This attribute would define where the image would link to if someone clicks the image. Then i could do something like: .append('p' + this.alt + ' a href=''Read more /p'); Does anyone know what/where i can add in the cycle js to accomodate for this.link? Check out the 'callbacks' example on this page: http://www.malsup.com/jquery/cycle/int2.html
[jQuery] Re: Programmatically Resize a resizable element
I don't know if anyone has worked on doing this using methods or event triggering, but you could certainly do it the way we do in unit tests - simulate the drag on the resize handle. We use the simulate plugin for that: http://jqueryjs.googlecode.com/svn/trunk/plugins/simulate/jquery.simulate.js Here are some examples: http://jquery-ui.googlecode.com/svn/trunk/tests/unit/resizable/resizable_core.js - Richard On Tue, Jul 21, 2009 at 7:46 PM, Gerwood Stewart gerw...@gmail.com wrote: I think this has probably been asked before but. I want to resize an element that has .resizable() on it. I want the resizable 'stop' event to trigger when it is done. Is there a way to do this? Thanks
[jQuery] Re: Should this work?
jQuery UI Effects has color animation support: http://docs.jquery.com/UI/Effects/animate http://jqueryui.com/demos/animate/ - Richard On Tue, Jul 21, 2009 at 8:56 PM, Rick Faircloth r...@whitestonemedia.comwrote: NM…”Only properties that take numeric values are supported (e.g. backgroundColor is not supported).” *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Rick Faircloth *Sent:* Tuesday, July 21, 2009 7:35 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Should this work? $('.menu1 a:last').css('background-color','#fff').animate({backgroundColor:'#222'}, 1000) -- *Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger*
[jQuery] Jquery Ajax Postbacks
can ant one tell me or give me some shot example regarging jquery ajax post backs or related some documents it will great help for me Thanks in Advance gladrinkz
[jQuery] Re: jquery ui dialog get element from button
Sorry i forgot to add it. img style=cursor:pointer class=button id=REF09624002 src=images/delete.png / The button is placed before the dialog div. Carlo On Tue, Jul 21, 2009 at 2:43 PM, Mean Mikemcgra...@gmail.com wrote: Carlo buddy where is the button with the id that your looking for ? On Jul 21, 5:06 am, Carlo Landmeter clandme...@gmail.com wrote: I'm not able to send the whole html but i can show you the jquery stuff: I am using this in a drupal CMS with jQuery 1.2.6 and jQuery UI 1.6. Drupal includes the following css/js style type=text/css media=all@import /sites/default/modules/jquery_ui/jquery.ui/themes/default/ui.all.css;/style script type=text/javascript src=/misc/jquery.js/script script type=text/javascript src=/sites/default/modules/jquery_ui/jquery.ui/ui/minified/ui.core.min.js/script script type=text/javascript src=/sites/default/modules/jquery_ui/jquery.ui/ui/minified/ui.dialog.min.js/script script type=text/javascript src=/sites/default/modules/jquery_ui/jquery.ui/ui/minified/ui.draggable.min.js/script script type=text/javascript $(document).ready(function(){ $(#dialog).dialog({ autoOpen:false, modal:true, overlay: {backgroundColor: #000,opacity: 0.5}, resizable:false, buttons:{ Delete: function() {window.location = /home/ + somevar ;}, Cancel: function() {$(this).dialog(close);} } }); $(.button).click(function(){ $(#ui-dialog-title-dialog).text(Attention); var message = You are about to do something: ; $(.ui-dialog-content).text(message + $(this).attr(id)); var somevar = $(this).attr(id); $(#dialog).dialog(open); }); }); /script Then somewhere at the end of the page I have: div id=dialog/div Hope this helps. Carlo On Mon, Jul 20, 2009 at 9:11 PM, Mean Mikemcgra...@gmail.com wrote: can I see the html that goes with this code ? On Jul 18, 4:48 am, Carlo Landmeter clandme...@gmail.com wrote: Thanks for tip for my vars. I have tried the code you provided but this does not work. When i click my delete button it will complain that somevar is not set. So i guess it means the dialog function is run before the somevar variable is set. Anyway arround this? carlo On Fri, Jul 17, 2009 at 5:37 PM, Mean Mikemcgra...@gmail.com wrote: Carlo, jQuery /javascript is procedural so you just need to move things around like this [code] $(document).ready(function(){ $(#dialog).dialog({ autoOpen:false, modal:true, overlay: {backgroundColor: #000,opacity: 0.5}, resizable:false, buttons:{ Delete: function() {window.location = /home/ + $somevar ;}, Cancel: function() {$(this).dialog(close);} } }); $(.button).click(function(){ $(#ui-dialog-title-dialog).text(Attention); var message = You are about to do something: ; $(.ui-dialog-content).text($message + $(this).attr(id)); var somevar = $(this).attr(id); $(#dialog).dialog(open); }); }); [/code] I also noticed that your mixing php variables with javascript variables i.e. javascript variables do not use $ I'm not sure if this causes any problems but I removed them Mike On Jul 17, 9:54 am, Carlo Landmeter clandme...@gmail.com wrote: I will try that ones I have tackled the following issue. I keep having issues with dialog because the dialog is created before i use the .click function. Because of this i cannot change some options of the dialog. For instance: If i click the button i am able to retrieve the id of this button and use it. problem is that my dialog function has to be loaded before i use the dialog(open) function. How am i able to insert the ID in the $somevar variable in my below example? The only way I can think of getting this done is putting the dialog function inside the .click function but for this we already have a dedicated function dialog(open). Any idea how to solve this? $(document).ready(function(){ $(#dialog).dialog({ autoOpen:false, modal:true, overlay: {backgroundColor: #000,opacity: 0.5}, resizable:false, buttons:{ Delete: function() {window.location = /home/ + $somevar ;}, Cancel: function() {$(this).dialog(close);} } }); $(.button).click(function(){ $(#dialog).dialog(open); $(#ui-dialog-title-dialog).text(Attention); var $message = You are about to do something: ;
[jQuery] Re: Should this work?
Thanks, Richard. From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Richard D. Worth Sent: Wednesday, July 22, 2009 8:59 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Should this work? jQuery UI Effects has color animation support: http://docs.jquery.com/UI/Effects/animate http://jqueryui.com/demos/animate/ - Richard On Tue, Jul 21, 2009 at 8:56 PM, Rick Faircloth r...@whitestonemedia.com wrote: NM.Only properties that take numeric values are supported (e.g. backgroundColor is not supported). From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Rick Faircloth Sent: Tuesday, July 21, 2009 7:35 PM To: jquery-en@googlegroups.com Subject: [jQuery] Should this work? $('.menu1 a:last').css('background-color','#fff').animate({backgroundColor:'#222'}, 1000) -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] Re: shifting a box sideways and making it gradually dissapear
Thanks! I had no idea the overflow property even existed. You've saved me a lot of head scratching. Cheers, Simon On Jul 22, 4:49 am, Paul Mills paul.f.mi...@gmail.com wrote: Hi, Try this. Add overflow:hidden to #box and then animate the left of #innerbox: #box{ width:800px; height:400px; border:1px solid #444; overflow:hidden; } $(#toggle).toggle(function(){ $(#innerbox).animate({ left: '180px' }, 'slow'); },function(){ $(#innerbox).animate({ left: '0px' }, 'slow'); }); Paul On Jul 21, 10:38 pm, Simon svansint...@gmail.com wrote: Hey, so there might be a simple solution to my problem, but here is my question: I have a box: html div id=box div id=innerbox a href= id=toggle/a There is some text inside this box. It spans the entire width blah blah blah. /div /div styles=== #box{ width:800px; height:400px; border:1px solid #444; } #innerbox{ position:relative; width:200px; float:right; } #toggle{ width:20px; background-color:grey; height:400px; float:left; } Now this innerbox needs to move to the side to reveal whatever is below it when the toggle is clicked. As the the innerbox moves out of the main box the parts of it that leave main box should become invisible. Now there is a simple solution in which I make the background of the innerbox an image and decrease the width using jQuery's .animate(). This isn't ideal however, since I kinda need there to be text users can interact with in the innerbox. javascript $(document).ready(function(){ $(#toggle).toggle(function(){ $(#innerbox).animate({ width: '75px' }, 'slow'); },function(){ $(#innerbox).animate({ width: '200px' }, 'slow'); }); }); == On the other hand, shifting the innerbox to the right (instead of decreasing the width of the image) means that it extends the reach of the encompassing box. javascript $(document).ready(function(){ $(#toggle).toggle(function(){ $(#innerbox).animate({ right: -=125 }, 'slow'); },function(){ $(#innerbox).animate({ right: '-=125' }, 'slow'); }); }); Does anyone have any ideas how I can solve this? I've thought of placing divs with a higher z-index next the main box but this isn't really an option, since it would make the website too large. Any help would be much appreciated. Thanks, Simon
[jQuery] Re: update several divs within a .each() loop
notice: if i do an alert() with the response just before i update the content of the div, everything works fine... On Jul 22, 1:58 pm, Daniel d.vui...@gmail.com wrote: Hi everybody! I want to update the contents of several divs periodically with the response i get from a php-script. the number of divs is changing depending on what the user has chosen before. i store the variable part of the ids in a hidden input field. this input field may look like this: input type=hidden name=devices value=1,2,3,4,5,6,7 to do this task periodically i use setIntervall(): script type=text/javascript // dies stellt sicher, dass updateDivs() erst ausgeführt wird, wenn die ganze seite geladen wurde $(document).ready(function() { updateDivs(); // wenn die seite komplett geladen ist, soll die progress- bar verschwinden $(#hide_me).hide(); }); setInterval(updateDivs(), 5000); /script and the Code of the updateDivs() function: code function updateDivs() { $($([name=devices]).val().split(,)) .each(function(){ var handler_url = 'devices_handler.php'; var devID = this; var randomNumber = Math.random(); // DATEN-Abfrage mit ajax-queue var monValues = $(#mon_ + devID).val(); var getValuesParams = { do:1, de:devID, mo:monValues, rand:randomNumber } $.ajax({ type: GET, cache: false, url: handler_url, data: getValuesParams, async: false, success: function(response){ //alert(response); $(#dev_ + devID).html(response); } }); });} /code Now the Problem: The only browser who behaves as expected is Firefox 3.x - he flushes the response after every ajax-request to the corresponding div ( .html (response) ). All the other browsers are not updating the contents of the divs until all the responses are available (although i execute the request with async=false), and then they update all the divs (ids dev_1 to dev_7) at the same time... but for me it would be necessary that the other browsers behave like Firefox 3. Does anyone have an idea? I would really appreciate it :-) Thanks! Daniel
[jQuery] Re: JQuery Message with Validate Plugin
Hello Check out this demo http://jquery.bassistance.de/validate/demo/marketo/ - Original Message - From: pocket claire.rock...@googlemail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Sunday, July 19, 2009 11:00 AM Subject: [jQuery] JQuery Message with Validate Plugin I am currently using the validate plugin and I needed to find a way of displaying a message when the user clicks submit but only if they meet certain criteria on their postcode. I have just seen Message which will display a pop up message. How do the two work together? Is it possible? Does the message display every time the user clicks submit or will it work if I use a regex for the set criteria so that it will display the message if the user has a postcode starting TA2 for example and won't display if they don't? I hope this makes sense. Thanks
[jQuery] Re: Calling other functions inside a function
Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then reload the page and do whatever you need to do to trigger the error. It's very likely that Firebug will give you an error message showing exactly what the problem is. If the problem isn't clear from that message (or if you don't get one), try sprinkling the code inside createCharts() with console.log() calls: function createCharts() { console.log(1); // some of your code here console.log(2); // some more of your code here console.log(3); // and some more of your code here console.log(4); } By watching the Firebug console, you will then be able to see which of your console.log() calls were actually executed. -Mike From: evanbu...@gmail.com This is probably more of a basic javascript question than a specific jquery function. I have this jQuery function named validateSubmit() which calls two other regular javascript functions. When using IE, both createCharts() and getDirectorIDs get called but when using FireFox, only createCharts() gets called and never makes it to getDirectorIDs() and I'm not sure why this occurs. Thanks script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); getDirectorIDs(); return true; } } /script- Hide quoted text - - Show quoted text -
[jQuery] Re: Calling other functions inside a function
Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject:[jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then reload the page and do whatever you need to do to trigger the error. It's very likely that Firebug will give you an error message showing exactly what the problem is. If the problem isn't clear from that message (or if you don't get one), try sprinkling the code inside createCharts() with console.log() calls: function createCharts() { console.log(1); // some of your code here console.log(2); // some more of your code here console.log(3); // and some more of your code here console.log(4); } By watching the Firebug console, you will then be able to see which of your console.log() calls were actually executed. -Mike From: evanbu...@gmail.com This is probably more of a basic javascript question than a specific jquery function. I have this jQuery function named validateSubmit() which calls two other regular javascript functions. When using IE, both createCharts() and getDirectorIDs get called but when using FireFox, only createCharts() gets called and never makes it to getDirectorIDs() and I'm not sure why this occurs. Thanks script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); getDirectorIDs(); return true; } } /script- Hide quoted text - - Show quoted text - inline: graycol.gifinline: ecblank.gif
[jQuery] Re: Jquery Ajax Postbacks
What exactly do you like to do? Ajax call do not Post back, but Call back. do you like to post back in .net application? just call the javascript __doPostBack('Yourcontrol','ypurArgument'); gladrinkz wrote: can ant one tell me or give me some shot example regarging jquery ajax post backs or related some documents it will great help for me Thanks in Advance gladrinkz -- View this message in context: http://www.nabble.com/Jquery-Ajax-Postbacks-tp24606126s27240p24608976.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: converting an html table to json
is up to you how you would like to make your json format, but you can easily loop between your table's row, and td then add the format you like. something like: var $table = $('#tableid'); $('tr', $table).each(function(i, item){ // here you can add whatever you like for each TR, then you can browse td for each tr $('td',$(this)).each(function(i,item){ // now you have all td as well }); }); nvictor wrote: hi, i'm new to jquery and i was wondering how i can use it to convert an html table into a json format. i found a lot of help for doing the reverse (json to html table) but couldn't get much help with this one. thanks a lot in advance. -- View this message in context: http://www.nabble.com/converting-an-html-table-to-json-tp24605327s27240p24609180.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Truncate plugin - Alternatives?
http://plugins.learningjquery.com/expander/ I've had good success with it sso wrote: I posted a while ago about the Truncate plugin not preserving html links in FF. I like the plugin, but it needs to present properly in FF. I couldn't figure it out and nobody responded. Is there any other plugins that provide similar funcationality? Thanks! :)
[jQuery] Re: Truncate plugin - Alternatives?
On Jul 22, 12:08 pm, Charlie charlie...@gmail.com wrote: http://plugins.learningjquery.com/expander/ I've had good success with it sso wrote:I posted a while ago about the Truncate plugin not preserving html links in FF. I like the plugin, but it needs to present properly in FF. I couldn't figure it out and nobody responded. Is there any other plugins that provide similar funcationality? Thanks! :) Perfect! Thank you for this! :)
[jQuery] Re: jquery, php question (Probably the wrong place to ask)
Thanks a bunch. I didn't even notice that I had forgot to close stuff, I am sure that error would have been glaring out at me had I paid closer attention. :) Next question, and I am now going to make an ass of myself more than I already have and assume that this part actually does relate to jQuery :) Now, with the fixes below, it works, but when I go to display the fields, it clears the entire page and just displays the fields. I would like them to appear in the dialog that I am using. I would guess that there is some probably not too fancy jQuery stuff I need to do?? I will be messing around with it and trying to figure it out today (this is the last major stumbling block on my UI), but any help would be appreciated :) On Jul 22, 2009, at 4:23 AM, p_W wrote: lol forgot to close the tags myself... document.write(trtdinput type=\text\ name=\c\ + i + \\/ td/tr); or document.write(trtdinput type='text' name='c' + i + ''/td/ tr); On Jul 22, 7:22 am, p_W paulwoolcoc...@gmail.com wrote: I'm not quite sure about your question, but I will say that I see some problems with your code... In the document.write(); function, I see 2 main problems... one is that it doesn't look like you are closing your trtd tags...after the input tag you should add /td/tr The other is in the name= attribute of the input tag...it looks like you are escaping some but not all of your quotes, and not including a closing paren for the .write function. It should be like this: document.write(trtdinput type=\text\ name=\c\ + i + \\); or if that looks too confusing, use single quotes inside, like this: document.write(trtdinput type='text' name='c' + i + ''); On Jul 21, 5:16 pm, Greg Evans greg.djr...@gmail.com wrote: The code now is like this: div id=dialog title=Create Manifest form id=myForm action=pl/ newload.pl method=post table tdChest:/td tdSELECT NAME=Aircraft option ? php $ user=user; $password=pass; $database=completChest; mysql_connect('127.0.0.1',$user,$password); @mysql_select_db($database) or die( Unable to select database); $query=SELECT * from Chests where chest_active=1; $ result = mysql_query($query); while ($myinfo= mysql_fetch_row($result)) { print option onselect( populate($myinfo[5]) ) value= \$myinfo[0]\. $myinfo[2]. .$myinfo[3]. .$myinfo[1]; } ? /select/ tdtr trtd colspan=2Items in Chest/td script type=text/ javascript function populate(max_chest){ for(var i=0;i=max_chest;i++){ document.write(trtdinput type=\text\ name=\c+i+\; } } /script /table /form /div On Jul 21, 2009, at 1:41 PM, Glazz wrote: Hi, What is the code that you now? If you have none we can help you create the code you need But you are going to use $.ajax() to get the numbers that you are talking about from the MySQL table. And then you can update the form as your needs. Btw, im a neewbie too but i can help in what i can :) Regards, Bruno. On 21 Jul, 21:24, raisputin greg.djr...@gmail.com wrote: Hello, newb here ;) This is probably the wrong place to ask, but maybe someone could point me in the right direction if that is the case :) I am pulling data from a mysql database to partially populate a form. This is all done in a 'dialog' which is really slick, so when I open that dialog, i get (please excuse the crude drawings) Dropdown menu [ Chest 1 ] [ Chest 2 ] [ etc... ] That part I have working fine, what I need to do now is make it so that when someone selects Chest_N it will populate the form with say the number of drawers in that chest as each chest may have any number of drawers (within reason of course). The information for each chest, such as mfr, etc. and including the number of drawers is stored in the 'chests' table in
[jQuery] Re: CSS height/width function value
Try the first link it mentions a JS function that could help you convert pixels to ems On 21 jul, 18:16, FirefoxRocks firefoxroc...@gmail.com wrote: I don't need to manually convert stuff, I need the retrieve a value of ems from the jQuery or otherwise use a function to convert from pixels to ems. On Jul 21, 9:11 am, gil gilalbe...@gmail.com wrote: Maybe this links could help. http://dtott.com/thoughts/2008/01/19/convert-pixels-to-ems-a-bookmark... http://riddle.pl/emcalc/
[jQuery] Re: toggle() won't hide
Hi, This could worke, try adding this to the div style overflow:hidden Ex: div id=comment-list-417 class=comment-list style=overflow: hidden; display: block; Regards On 22 jul, 01:22, sccr410 de...@ashwebstudio.com wrote: http://www.erikaashauerphoto.com/blog/ At the end of each post there is the link to the comments, clicking uses the jQuery toggle() function. This works perfectly to show the comments below, but clicking on the link again does not hide the comments as expected. This is using jQuery in noconflict mode since that is how WordPress decides to embed it.
[jQuery] Re: datepicker
Can you provide sample code or a link? Thanks On 22 jul, 00:51, acatejr acat...@gmail.com wrote: I am using the jQuery datepicker. When the user selects an item in a drop down list box the selectable dates in the calender in the datepicker get updated with all selectable dates associated with the selected drop down list item. The dates seem to update fine except for the very last one. If I click the back arrow for the last month then the forward arrow to go to the current month the calendar then has all of the new selectable dates. Any idea why the current months selectable dates aren't updated with the calender as rendered? Thanks.
[jQuery] Re: toggle() won't hide
How odd, I never would have thought to include that but it worked perfectly. This issue was actually only present in FireFox/Safari, IE handled it as expected (a first for me). - Derek On Jul 22, 11:21 am, gil gilalbe...@gmail.com wrote: Hi, This could worke, try adding this to the div style overflow:hidden Ex: div id=comment-list-417 class=comment-list style=overflow: hidden; display: block; Regards On 22 jul, 01:22, sccr410 de...@ashwebstudio.com wrote: http://www.erikaashauerphoto.com/blog/ At the end of each post there is the link to the comments, clicking uses the jQuery toggle() function. This works perfectly to show the comments below, but clicking on the link again does not hide the comments as expected. This is using jQuery in noconflict mode since that is how WordPress decides to embed it.
[jQuery] Toggle Div Based on Value
Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div
[jQuery] Re: Calling other functions inside a function
Is this the right way to do it ? script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function() { function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } }); /script On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote: Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject: [jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then reload the page and do whatever you need to do to trigger the error. It's very likely that Firebug will give you an error message showing exactly what the problem is. If the problem isn't clear from that message (or if you don't get one), try sprinkling the code inside createCharts() with console.log() calls: function createCharts() { console.log(1); // some of your code here console.log(2); // some more of your code here console.log(3); // and some more of your code here console.log(4); } By watching the Firebug console, you will then be able to see which of your console.log() calls were actually executed. -Mike From: evanbu...@gmail.com This is probably more of a basic javascript question than a specific jquery function. I have this jQuery function named validateSubmit() which calls two other regular javascript functions. When using IE, both createCharts() and getDirectorIDs get called but when using FireFox, only createCharts() gets called and never makes it to getDirectorIDs() and I'm not sure why this occurs. Thanks script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); getDirectorIDs(); return true; } } /script- Hide quoted text - - Show quoted text - graycol.gif 1KViewDownload ecblank.gif 1KViewDownload- Hide quoted text - - Show quoted text -
[jQuery] Re: Calling other functions inside a function
No, i was thinking something like this script language=javascript type=text/javascript function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } // this gets all of the director id_individual values $(document).ready(function() { getDirectoryIds(); }); /script Typically, you use $(document).ready(function(){...}); to run a function after the document is finished loading, when its ready. Not to actually define the function :) cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:18 PM Subject:[jQuery] Re: Calling other functions inside a function Is this the right way to do it ? script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function() { function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } }); /script On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote: Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject: [jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then reload the page and do whatever you need to do to trigger the error. It's very likely that Firebug will give you an error message showing exactly what the problem is. If the problem isn't clear from that message (or if you don't get one), try sprinkling the code inside createCharts() with console.log() calls: function createCharts() { console.log(1); // some of your code here console.log(2); // some more of your code here console.log(3); // and some more of your code here console.log(4); } By watching the Firebug console, you will then be able to see which of your console.log() calls were actually executed. -Mike From: evanbu...@gmail.com This is
[jQuery] ajaxStart() and ajaxStop(): Any way to know the type of the request?
What I want to do is simples, or at least I thought it was. I need to show a #loading div for GET requests and a #saving div for POST ones. I then realized that the ajaxStart/Stop callbacks do not receive any parameter (at least it's what is stated on the API Reference)... If it received a request one, I would check the request.type property, for instance. Is there any way to accomplish that? Other than setting the callback for each individual request. Thanks. Rafael Soares
[jQuery] Re: Calling other functions inside a function
Thanks. I've been looking for an example of this for a long time. On Jul 22, 2:33 pm, Michael Lawson mjlaw...@us.ibm.com wrote: No, i was thinking something like this script language=javascript type=text/javascript function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } // this gets all of the director id_individual values $(document).ready(function() { getDirectoryIds(); }); /script Typically, you use $(document).ready(function(){...}); to run a function after the document is finished loading, when its ready. Not to actually define the function :) cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:18 PM Subject: [jQuery] Re: Calling other functions inside a function Is this the right way to do it ? script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function() { function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } }); /script On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote: Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject: [jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then reload the page and do whatever you need to do to trigger the error. It's very likely that Firebug will give you an error message showing exactly what the problem is. If the problem isn't clear from that message (or if you don't get one), try sprinkling the code inside createCharts() with console.log() calls: function createCharts() { console.log(1); // some of your code here console.log(2); // some more of your code here console.log(3); // and some more of your code here console.log(4); } By watching the Firebug console, you will then be able to see which
[jQuery] Re: Calling other functions inside a function
Np, let me know if that works for you! cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:48 PM Subject:[jQuery] Re: Calling other functions inside a function Thanks. I've been looking for an example of this for a long time. On Jul 22, 2:33 pm, Michael Lawson mjlaw...@us.ibm.com wrote: No, i was thinking something like this script language=javascript type=text/javascript function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } // this gets all of the director id_individual values $(document).ready(function() { getDirectoryIds(); }); /script Typically, you use $(document).ready(function(){...}); to run a function after the document is finished loading, when its ready. Not to actually define the function :) cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:18 PM Subject: [jQuery] Re: Calling other functions inside a function Is this the right way to do it ? script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function() { function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } }); /script On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote: Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject: [jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the Firebug panel and make sure it's enabled for your site, then
[jQuery] Textarea autogrow plugin: IE6, IE7, IE8 and Opera problems
Hi everybody, i am having trouble getting the autogrow.js plugin to work properly in all versions of IE (of course!) and Opera. plugin link: http://plugins.jquery.com/project/autogrow Opera just seems to make the textareas ridiculously tall for some reason, but IE actually throws up a scripting area when .autogrow(); is activated. it brings up an error in jquery.js line 12 saying invalid argument. i am thinking this could be to do with the fact this plugin was developed for jquery 1.2 and that IE doesnt play well when using jQuery 1.3 and autogrow. does anybody have any suggestions? i'm more concerned about IE than opera. another thing to note is that IE does actually activate the first textarea it finds successfully, but doesnt listen to the min-height statement, which IE7 and 8 actually DO understand and should adhere to under normal circumstances. however, my second textarea on the page isnt autogrown at all and just behaves like a normal textarea. has anybody encountered this and found any solutions, or an alternative autogrow plugin? i tried 2 other jquery plugins based on autogrow that provided various patches and fixes to it (e.g. http://plugins.jquery.com/project/autogrowupdate) but neither of them fixed this issue.
[jQuery] Re: Calling other functions inside a function
Yes, it does. Thanks. On Jul 22, 2:49 pm, Michael Lawson mjlaw...@us.ibm.com wrote: Np, let me know if that works for you! cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:48 PM Subject: [jQuery] Re: Calling other functions inside a function Thanks. I've been looking for an example of this for a long time. On Jul 22, 2:33 pm, Michael Lawson mjlaw...@us.ibm.com wrote: No, i was thinking something like this script language=javascript type=text/javascript function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } // this gets all of the director id_individual values $(document).ready(function() { getDirectoryIds(); }); /script Typically, you use $(document).ready(function(){...}); to run a function after the document is finished loading, when its ready. Not to actually define the function :) cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 02:18 PM Subject: [jQuery] Re: Calling other functions inside a function Is this the right way to do it ? script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function() { function getDirectorIds() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; } }); /script On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote: Maybe you should pull the definition of the function out of the document ready definition? cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: evanbu...@gmail.com evanbu...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/22/2009 11:21 AM Subject: [jQuery] Re: Calling other functions inside a function Thank you. The Firebug suggestion was helpful. The error message is saying that getDirectorIds() is not defined. script type=text/javascript // make sure at least one checkbox is checked function validateSubmit() { if( $(input:checkbox:checked).length == 0 ) { alert( Please select at least one section for your PDF profile ); return false; } else { createCharts(); // error occurs here getDirectorIDs(); return true; } } /script This is the getDirectorIDs() function: script language=javascript type=text/javascript // this gets all of the director id_individual values $(document).ready(function getDirectorIDs() { var result = ; $(.chkDirector:checked).each(function() { result = result + $(this).val() + ,; }); // place the selected id_individual values in the label control lblCheckedDirectors2 document.getElementById('lblCheckedDirs').value = result; alert(cool); }); /script On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote: The reason this would happen is that you have a fatal error somewhere inside your createCharts() function. When this error occurs, it stops all JavaScript execution for the current event. Do you have any debugging tools such as Firebug? If not, install Firebug and try again. Open the
[jQuery] Re: Should this work?
Think there's a color plugin that will make this work ? http://plugins.jquery.com/project/color L Rick Faircloth wrote: NM…”Only properties that take numeric values are supported (e.g. backgroundColor is not supported).” *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Rick Faircloth *Sent:* Tuesday, July 21, 2009 7:35 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Should this work? $('.menu1 a:last').css('background-color','#fff').animate({backgroundColor:'#222'}, 1000) -- /Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger/ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.23/2254 - Release Date: 07/22/09 05:59:00
[jQuery] Dialog and document.write
Thanks for all the help everyone, the last problems are solved and a new one has cropped up. I now have all the proper variables passing where they need to go, etc, which, seems like a miracle considering my inexperience with js and jQuery :) but hey, the listmembers have been great, so here is my last problem: The problem is that, in a Dialog box when document.write gets called, it blanks out the entire page and then prints my form fields. on that new blank page and I need it to print in the dialog box. I searched around google and the only thing I could find related to recaptcha, but I wasn't sure if that solution would even apply. I have tested this in IE8 and Firefox 3.5.1 on Vista, Safari 4.0.2 on MacOS X 10.5.7, and Firefox on MacOS X 10.5.7 and it does it on all of these. again, I am probably missing something easy, but I figured I had better ask instead of banging my head against the wall Greg
[jQuery] Re: Should this work?
Thanks, Liam...I decided to the jQuery UI. It's working well. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Liam Byrne Sent: Wednesday, July 22, 2009 3:08 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Should this work? Think there's a color plugin that will make this work ? http://plugins.jquery.com/project/color L Rick Faircloth wrote: NM.Only properties that take numeric values are supported (e.g. backgroundColor is not supported). *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On Behalf Of *Rick Faircloth *Sent:* Tuesday, July 21, 2009 7:35 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Should this work? $('.menu1 a:last').css('background-color','#fff').animate({backgroundColor:'#222'}, 1000) -- /Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger/ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.23/2254 - Release Date: 07/22/09 05:59:00
[jQuery] Re: Delay a swap of a DIV
How do I bind this in with the show/hide using jQuery ? $(document).ready(function(){ $('#main-but').hide(); // This step should be Triggered one time afer X minutes $something(){ $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }); }); On Jul 22, 12:58 am, Hector Virgen djvir...@gmail.com wrote: If you know how long the movie is, you can use the native window.setTimeout() function. // Displays alert after 5 seconds window.setTimeout(function() { alert('5 seconds have passed'); }, 5000); -- Hector On Tue, Jul 21, 2009 at 1:48 PM, Mats dothebizz...@gmail.com wrote: I have a page that is a displaying a Movie, or it's really 3 Movies but to get to the 2nd Movie the user has to click a Next button. My problem is that I want to delay this button to appear until the movie is more or less done... could be 7 or 16 minutes. What would be the easiest and most propriate way to do this using jQuery... swaping out one DIV for another once after X minutes? Thanks in advance /Mats/
[jQuery] Seeking XHTML inplace editor
Just stepped over to http://plugins.jquery.com/search/node/editor - lots and lots of choices - and if to judge by the dates, many new offerings. I'm hoping someone can help me narrow down the field according to these priorities... Stability Well-formed XHTML (might argue against some of the most recent unless they are revisions with a clear track-record) Inplace editing Good AJAX integration For internal / admin / CMS usage so it can be as bloated as it needs to be long as it's easy to implement the basics: bold ital indents lists No need for tables but dropdowns with relevent CSS selectors would be nice. thnkx
[jQuery] Re: converting an html table to json
yes, that actually sounds simple. let me give a try. On Jul 22, 11:54 am, FrenchiInLA mamali.sohe...@gmail.com wrote: is up to you how you would like to make your json format, but you can easily loop between your table's row, and td then add the format you like. something like: var $table = $('#tableid'); $('tr', $table).each(function(i, item){ // here you can add whatever you like for each TR, then you can browse td for each tr $('td',$(this)).each(function(i,item){ // now you have all td as well }); }); nvictor wrote: hi, i'm new to jquery and i was wondering how i can use it to convert an html table into a json format. i found a lot of help for doing the reverse (json to html table) but couldn't get much help with this one. thanks a lot in advance. -- View this message in context:http://www.nabble.com/converting-an-html-table-to-json-tp24605327s272... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Delay a swap of a DIV
window.setTimeout(function() { $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }, 5000); 5000 is 5000ms, or 5 seconds. Do you have a way to retrieve this time on when you want it to appear? On Jul 22, 9:57 am, Mats dothebizz...@gmail.com wrote: How do I bind this in with the show/hide using jQuery ? $(document).ready(function(){ $('#main-but').hide(); // This step should be Triggered one time afer X minutes $something(){ $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }); }); On Jul 22, 12:58 am, Hector Virgen djvir...@gmail.com wrote: If you know how long the movie is, you can use the native window.setTimeout() function. // Displays alert after 5 seconds window.setTimeout(function() { alert('5 seconds have passed'); }, 5000); -- Hector On Tue, Jul 21, 2009 at 1:48 PM, Mats dothebizz...@gmail.com wrote: I have a page that is a displaying a Movie, or it's really 3 Movies but to get to the 2nd Movie the user has to click a Next button. My problem is that I want to delay this button to appear until the movie is more or less done... could be 7 or 16 minutes. What would be the easiest and most propriate way to do this using jQuery... swaping out one DIV for another once after X minutes? Thanks in advance /Mats/
[jQuery] Re: Dialog and document.write
Thanks, that worked like a charm :) On Jul 22, 2009, at 12:42 PM, Eric Garside wrote: Don't use document.write If you're using jQuery, you can insert the text using jQuery's html function. On Jul 22, 3:08 pm, Greg Evans greg.djr...@gmail.com wrote: Thanks for all the help everyone, the last problems are solved and a new one has cropped up. I now have all the proper variables passing where they need to go, etc, which, seems like a miracle considering my inexperience with js and jQuery :) but hey, the listmembers have been great, so here is my last problem: The problem is that, in a Dialog box when document.write gets called, it blanks out the entire page and then prints my form fields. on that new blank page and I need it to print in the dialog box. I searched around google and the only thing I could find related to recaptcha, but I wasn't sure if that solution would even apply. I have tested this in IE8 and Firefox 3.5.1 on Vista, Safari 4.0.2 on MacOS X 10.5.7, and Firefox on MacOS X 10.5.7 and it does it on all of these. again, I am probably missing something easy, but I figured I had better ask instead of banging my head against the wall Greg
[jQuery] Re: Delay a swap of a DIV
Hi James, I know how long the movies are and can activate the button som e20-30 seconds before each part ends. This worked so thanks alot! /Mats/ On Jul 22, 10:19 pm, James james.gp@gmail.com wrote: window.setTimeout(function() { $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }, 5000); 5000 is 5000ms, or 5 seconds. Do you have a way to retrieve this time on when you want it to appear? On Jul 22, 9:57 am, Mats dothebizz...@gmail.com wrote: How do I bind this in with the show/hide using jQuery ? $(document).ready(function(){ $('#main-but').hide(); // This step should be Triggered one time afer X minutes $something(){ $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }); }); On Jul 22, 12:58 am, Hector Virgen djvir...@gmail.com wrote: If you know how long the movie is, you can use the native window.setTimeout() function. // Displays alert after 5 seconds window.setTimeout(function() { alert('5 seconds have passed'); }, 5000); -- Hector On Tue, Jul 21, 2009 at 1:48 PM, Mats dothebizz...@gmail.com wrote: I have a page that is a displaying a Movie, or it's really 3 Movies but to get to the 2nd Movie the user has to click a Next button. My problem is that I want to delay this button to appear until the movie is more or less done... could be 7 or 16 minutes. What would be the easiest and most propriate way to do this using jQuery... swaping out one DIV for another once after X minutes? Thanks in advance /Mats/
[jQuery] resizeable stops working
I have a layout with a resizable div which works fine initially. When I load some html in to the resizable div I can no longer resize the div even though when i look at the div in firebug the div still has the resizable classes added to it. I dont think it is a css issue from my testing. What do i need to do in order for my resizable div to work after content has been loaded in to it? Regards Robin
[jQuery] animate fade stop() problem
Hello over there! The problem is: when I start hovering in and out very fast, the new div block appears before previous one dissapears. How to get rid of that effect? I heard that there is stop() event, how to implement it in the current situation? I tried to put it before animate, but that doesn't give any effect. $(function() { var offsetY = 10; var offsetX = 20; $('#logolnk').hover( function(event) { $(div id='tooltip'Sorry this website is under construction/div) .css(opacity, .7) .fadeIn(500) .appendTo('body') .css(top, event.pageY + offsetY) .css(left, event.pageX + offsetX); }, function() { $(#tooltip).stop ().animate({opacity: 0},500, function(){ $(this).remove (); }); } ); $(#logolnk).mousemove(function (event) { $(#tooltip) .css(top, event.pageY + offsetY) .css(left, event.pageX + offsetX) }); }); http://i192.photobucket.com/albums/z228/Somebi/problem.jpg
[jQuery] Re: plugin - is there any rule like notEqual
I've done this, perhaps not the best way. Seems to work. See below. Add this method to the validator object: $.validator.addMethod(notEqualTo,function(value, element, params) { return this.optional(element) || value != params; }); And then add the rule: $(#form_id).validate({ rules: { first_element_id: { notEqualTo: $(#second_element_id).val() } } }); =) Cam On May 30, 2:34 am, itsoft3g itsof...@gmail.com wrote: hi, is there any rule like rule{ client: {notEqual: newClient; required:true} } and the field is required too. This field is select field. I have option: optionselect one/option and optionnewClient/ option , other client names. Thanks in advance.
[jQuery] Jquery Validation How To
Hi, I have a form that includes four text fields for phone numbers: Business, Home, Cell and Fax A user must fill in at least one phone number. How would I set up the validation for this? Cheers
[jQuery] Switching a tabs content from a remote source to a local source
It seems that if you change the url of a tab from a remote source (ajax request) to a local source i.e. ('#myTabs').tabs('url', 1, '#myLocalContentDiv'); When you then click on this tab, it makes an ajax request (to http://myURL/#myLocalContentDiv) rather than simply showing the local content. This in effect reloads the entire page into the tab. Any way round this, or shall I report this as a bug? Thanks.
[jQuery] JQuery IE Bug? trigger with TABLE Element
Hi, I am having trouble with the Trigger in JQuery 1.3.2 and IE. It works in FireFox but breaks in IE6 and 8. JQuery.js line 2644 if ( (!elem[type] || (jQuery.nodeName(elem, 'a') type == click)) elem[on+type] elem[on+type].apply( elem, data ) === false ) The elem[type] give a Invalid procedure call or argument Watch: NAME VALUE TYPE type node:changed String elem.nodeName TABLE String elem[type]Invalid procedure call or argument Error Can anyone help with this issue? Do you need more info, what? Thanks. Regards, Diogo
[jQuery] Zend Framework and chained dropdowns
I almost have this I am just stuck. I have two dropdowns. The first one determines what goes in the second on.e When I select the first one, it has an onChange event and it calls an action which returns my data. I have no idea on how to make this data update my second dropdown box. Should the data echo? Should the data be view variables? Can someone give me some guidance?
[jQuery] Re: slideToggle() behavior change between 1.3.2 and 1.2.6
I discovered it today as well, after a much too long bug-finding journey, anyone else?
[jQuery] How do I implement this jQuery/AJAX effects on my page?
If you go here, http://demo2.analoganalytics.net/publishers/7/offers and click on Email and Txt for any coupon offer, I would like to duplicate that exactly on my page. By looking at their script, it looks like they're using Prototype. However, I'm new to jQuery and wondering can the almost exact same effect be apply to jQuery? Perhaps a combination of fadeIn, fadeOut, slideDown and slideUp? On that page, I'm wondering how after submitting the email, it clears the box to display the Thank You! Your coupon is on its way to em...@email.com and then the original element content appears again? Also, by clicking the email image, the original element contents clears, without the email textbox and submit button showing. How is that achieved? I know this may be a newbie question, but I'd like to see a simple example on to duplicate the exact same thing. I'll handle the server- side (PHP mail() and SMS code in a separate page). So this means, the script also uses AJAX as well right?
[jQuery] Superfish - speed problem
Hi there, I'm trying to get my Superfish menu to display the instant that I hover over it. However there is a slight pause before the menu is displayed. I am using supersubs as well, this is the set-up call I am using. $(document).ready(function(){ $('ul.sf-menu').supersubs({ minWidth:12,// minimum width of sub-menus in em units maxWidth:27,// maximum width of sub-menus in em units extraWidth: 1 // extra width can ensure lines don't sometimes turn over // due to slight rounding differences and font-family }).superfish({ onInit:function(){}, onBeforeShow: function(){}, onShow:function(){}, onHide:function(){}, delay : 200, animation : {height:'show'}, speed : 1 }) }); I would like it to work as quickly as the one on this site: http://www.salesforce.com/ but when I add a jQuery .hover function on the top menu items, to set a background css style on the top level a elements, the hover style gets applied before the menu is shown. Anyone got any ideas? Thanks! Ben P.S. many thanks to Joel Birch for this great nav system!
[jQuery] Parsing a complicated JSON file with JQUERY !
As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down ! http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning CSS,visible:1,Category:{id:1,name:CSS},Comment: [{id:3,post_id:2,date:2009-07-22 14:16:00,content:Nice CSS tut ;),userName:Talal,a_url:http:\/\/ rwina.talal.com,e_mail:mail...@gtol.de,showMail:1}]}]},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1,Post: {id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22
[jQuery] [autocomplete] Dynamic textboxs
I can't put autocomplete working with dynamic textboxs. I have a javascript function to add dynamic textboxs, but when i attach the autocomplete function to the dynamic textboxs, it doenst work. Some work that might help this issue: // Javascript function that adds dynamicly textboxs var initial_count = new Array(); var rows_limit = 5; // Set to 0 to disable limitation function addRow(table_id) { var tbl = document.getElementById(table_id); // counting rows in table var rows_count = tbl.rows.length; if (initial_count[table_id] == undefined) { // if it is first adding in this table setting initial rows count initial_count[table_id] = rows_count; } // determining real count of added fields var tFielsNum = rows_count - initial_count[table_id]; if (rows_limit!=0 tFielsNum = rows_limit) return false; var input = 'input class=text_area type=text name=author[] id=bla size=70 maxlength=250/'; var remove= 'input type=button value=- onclick=removeRow (\''+table_id+'\',this.parentNode.parentNode)/'; try { var newRow = tbl.insertRow(rows_count); var newCell = newRow.insertCell(0); newCell.innerHTML = input; var newCell = newRow.insertCell(1); newCell.innerHTML = remove; } catch (ex) { //if exception occurs alert(ex); } } // Button that adds textboxs dynamicly input type=button name=Button value=+ onClick=addRow ('authorsTable') / // Jquery autocomplete function call $(document).ready(function() { $(#bla).autocomplete(cities); }); NOTICE: I already have this working with fixed textboxs, the only problem is with dynamicly added textboxs. Thanks
[jQuery] Looking for some help converting this to jquery
Hi, I have a old script that adds a class to a button/submit/reset based on the length of its value and I'd like to convert it to jquery. I'm just looking for any suggestions on the best way to rewrite it. Thanks in advance for any help function setbuttonclass() { if(document.getElementById document.createTextNode) { var x = document.getElementsByTagName('input'); for (var i=0;ix.length;i++) { var s = x[i].value; var nolower = s.split(/[^A-Z\W]/); var word = (nolower.length/2 + s.length); if (((x[i].type == ('button'||'reset'))||(x[i].type == 'reset')||(x [i].type == 'submit')) ((word) = 12)){ x[i].className = 'mb'; } else if (((x[i].type == 'button')||(x[i].type == 'reset') ||(x [i].type == 'submit')) ((word) = 4) (word != 0)){ x[i].className = 'b'; } else { if (((x[i].type == 'button')||(x[i].type == 'reset') ||(x [i].type == 'submit')) (word != 0)){ x[i].className = 'sb'; } } } } }
[jQuery] Re: Switching a tabs content from a remote source to a local source
#myLocalContentDiv is not a URL so how can you construe this as a bug? Your best bet is to ask fo help on the jQuery UI list which focuses on UI issues but you will need to provide more info than what you've presented here. What do you mean by "change the URL"? for example. A simplified breakdown of your markup and intentions will help WR wrote: It seems that if you change the url of a tab from a remote source (ajax request) to a local source i.e. ('#myTabs').tabs('url', 1, '#myLocalContentDiv'); When you then click on this tab, it makes an ajax request (to http://myURL/#myLocalContentDiv) rather than simply showing the local content. This in effect reloads the entire page into the tab. Any way round this, or shall I report this as a bug? Thanks.
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down !http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning CSS,visible:1,Category:{id:1,name:CSS},Comment: [{id:3,post_id:2,date:2009-07-22 14:16:00,content:Nice CSS tut ;),userName:Talal,a_url:http:\/\/ rwina.talal.com,e_mail:mail...@gtol.de,showMail:1}]}]},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1,Post: {id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we
[jQuery] Google Maps and JQuery,
Hi, I want to know if this can be done using jQuery and Google Maps. In my website I have a Google map where users could add new markers with a description on it and the marker they put would be permanent on my map, meaning if they comeback they would still see the markers they added. I also want the feature that they could just drag and drop the marker, so it would be easy to the users. What would be my approach and how would I do it? Thank you!
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated What is that supposed to mean? *what do you want to accomplish?* i want to parse doesn't really mean anything and other than there are a lot of characters, there's nothing overly complicated about it the $.each method will walk key/value pairs and the array members of the object (and that's all that is, an object, there's nothing more complex than that) On Jul 22, 6:18 pm, James james.gp@gmail.com wrote: What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down !http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning CSS,visible:1,Category:{id:1,name:CSS},Comment: [{id:3,post_id:2,date:2009-07-22 14:16:00,content:Nice CSS tut ;),userName:Talal,a_url:http:\/\/ rwina.talal.com,e_mail:mail...@gtol.de,showMail:1}]}]},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1,Post: {id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
even am having issue with a simple GET request using the GETJSON method...could anyone please provide me with the sample code ? On Thu, Jul 23, 2009 at 4:58 AM, MorningZ morni...@gmail.com wrote: I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated What is that supposed to mean? *what do you want to accomplish?* i want to parse doesn't really mean anything and other than there are a lot of characters, there's nothing overly complicated about it the $.each method will walk key/value pairs and the array members of the object (and that's all that is, an object, there's nothing more complex than that) On Jul 22, 6:18 pm, James james.gp@gmail.com wrote: What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down ! http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning CSS,visible:1,Category:{id:1,name:CSS},Comment: [{id:3,post_id:2,date:2009-07-22 14:16:00,content:Nice CSS tut ;),userName:Talal,a_url:http:\/\/ rwina.talal.com,e_mail:mail...@gtol.de ,showMail:1}]}]},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1,Post: {id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful
[jQuery] Re: Google Maps and JQuery,
you can wrap jquery around the gMaps APi functions to make it easier to create jQuery interactions from markers to other parts of your page( click functions etc) , manipulating marker window content, using AJAX etc. The mapping functions like drag markers are done using gMaps API. What is your current datasource for the markers? and where did you plan to store the moved positions? pennfoli0 wrote: Hi, I want to know if this can be done using jQuery and Google Maps. In my website I have a Google map where users could add new markers with a description on it and the marker they put would be permanent on my map, meaning if they comeback they would still see the markers they added. I also want the feature that they could just drag and drop the marker, so it would be easy to the users. What would be my approach and how would I do it? Thank you!
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
$.getJSON( url_of_json_request, function(json) { $.each(json, function(i) { json[i] // current top level index }) } ) On Jul 22, 7:30 pm, Ajay Sharma sharmaa...@gmail.com wrote: even am having issue with a simple GET request using the GETJSON method...could anyone please provide me with the sample code ? On Thu, Jul 23, 2009 at 4:58 AM, MorningZ morni...@gmail.com wrote: I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated What is that supposed to mean? *what do you want to accomplish?* i want to parse doesn't really mean anything and other than there are a lot of characters, there's nothing overly complicated about it the $.each method will walk key/value pairs and the array members of the object (and that's all that is, an object, there's nothing more complex than that) On Jul 22, 6:18 pm, James james.gp@gmail.com wrote: What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down ! http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning CSS,visible:1,Category:{id:1,name:CSS},Comment: [{id:3,post_id:2,date:2009-07-22 14:16:00,content:Nice CSS tut ;),userName:Talal,a_url:http:\/\/ rwina.talal.com,e_mail:mail...@gtol.de ,showMail:1}]}]},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/
[jQuery] increment a date inside of an array fetched by json and processed by plugin
I'm using this plugin 'fullCalendar (http://arshaw.com/fullcalendar/ docs/) that is a very nice jquery plugin. It has some parameters for events where the end date of the event is displayed as the day before the end date of the data that feeds the calendar. Not sure why that is but I need a workaround because my data comes from a database where the end date of an event is truly the end date. (i.e. if event ends 2009-07-22 the calendar renders it through 2009-07-21). The calendar is populated from a json array. Can you help me write code to increment the 'end' values within the returned array? $ (document).ready(function() { $('#calendar').fullCalendar({ draggable: true, eventSources: [ $.fullCalendar.gcalFeed( 'http://www.google.com/calendar/feeds/usa__en %40holiday.calendar.google.com/public/basic', {draggable: false, className: 'mygcal'}), ../sources-json/travel-cal.php, ../sources-json/projects-cal.php, ../sources-json/time-byday-cal.php ] }); });
[jQuery] Re: JQuery IE Bug? trigger with TABLE Element
a link to the page where it's happening (or a test page where you replicate the problem) would help. On Jul 22, 9:31 am, Diogo diogo.l...@gmail.com wrote: Hi, I am having trouble with the Trigger in JQuery 1.3.2 and IE. It works in FireFox but breaks in IE6 and 8. JQuery.js line 2644 if ( (!elem[type] || (jQuery.nodeName(elem, 'a') type == click)) elem[on+type] elem[on+type].apply( elem, data ) === false ) The elem[type] give a Invalid procedure call or argument Watch: NAME VALUE TYPE type node:changed String elem.nodeName TABLE String elem[type] Invalid procedure call or argument Error Can anyone help with this issue? Do you need more info, what? Thanks. Regards, Diogo
[jQuery] Re: extend an Object
Something like this? function person(name, address) { this.name = name; this.address = address; this.whoAmI = function() { if (this.creditLimit) alert(this.name + ' address:' + this.address + 'credit limit:' + this.creditLimit); else alert(this.name + ' address:' + this.address); } return this; } function customer() { this.creditLimit = 0; this.creditCheck = creditCheck; return this; function creditCheck() { alert(this.creditLimit); } } var a = new person('john smith', '10 main st'); var cust = new customer(); a.whoAmI(); $.extend(a, cust); a.creditLimit = 1000; a.whoAmI(); On Jul 22, 10:02 pm, jeanluca lca...@gmail.com wrote: Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] Re: any plugin for twitter+flickr+fb+delicious+tagged
any advices?
[jQuery] Superfish via PixoPoint menu w/background images problem
Hello, I'm hoping someone can shed some light on this. I'm setting up a Wordpress site, using the Pixo Menu Plugin to auto generate the top menu. It integrated Superfish out of the box. I'd already designed the site, and successfully adapted the css to match, using background images for the back, but have run into one sticking point. Though this code in the css allows for the top menu to stay selected using a background color as the cursor drops into the menu and submenus below... #pixopoint_menu1 li:hover,#pixopoint_menu1 li.sfhover { color:#175696; background: yellow; } ... I can't figure out how to adapt it now that I'm using background images for the top level LI elements. I can't get the hover state to stick when the cursor drops into the cub UL. This is what I've tried: #pixopoint_menu1 li.page_item.page-item-7:hover, #pixopoint_menu1 li.page_item.page-item-7.sfhover { background: transparent url(/img/nav.png) no-repeat; background-position: -110px -27px; } I'm using very specific LI classes, as the top menu LI's vary in width, and I'm repositioning a background png for the different states. Any insight into how to fix this would be appreciated. Thanks, Michael
[jQuery] jQuery validation custom method doesn't work
Hello all I have added a method on jQuery validator like this $.validator.addMethod('myEqual', function (value, element) { return value == element.value; // this one here didn't work :( }, 'Please enter a greater year!'); $.metadata.setType(attr, validate); $(#educationForm).validate({ showErrors: function(errorMap, errorList) { this.defaultShowErrors(); }, errorPlacement: function(error, element) { error.appendTo( element.parent(td).next (td) ); }, /*success: function(label) { label.text(ok!).addClass(success); },*/ rules: { txt_end: { required: true, myEqual: #txt_begin } }, submitHandler: function() { } }); the form looks like this div id=wrapper_form form id=educationForm name=educationForm method=post action= table width=500 border=0 tr td width=100Period:/td td width=200input type=text name=txt_begin id=txt_begin size=8 maxlength=4 class=required year ui-widget- content ui-corner-all / to input type=text name=txt_end id=txt_end size=8 maxlength=4 class=required year ui-widget-content ui-corner-all / /td td width=200/td /tr tr td colspan=2 input type=submit name=btn_submit id=btn_submit value=Submit class=ui-button ui-state-default ui-corner-all / input type=button name=btn_cancel id=btn_cancel value=Cancel class=ui-button ui-state-default ui-corner-all / /td td /td /tr /table /form /div but why the custom method I added didn't work? return value == element.value; // this one here didn't work :( it always return true for any value :( am I missing something here? I didn't use the built in method because later in the form I would require to write another method to check for greater or equal and lower or equal ( = and = ) I have tested this method with greater or equal and lower or equal by replacing the == with = or with = It didn't work either
[jQuery] Re: Looking for some help converting this to jquery
On Jul 23, 6:42 am, sleepwalker danielpaulr...@gmail.com wrote: Hi, I have a old script that adds a class to a button/submit/reset based on the length of its value and I'd like to convert it to jquery. I'm just looking for any suggestions on the best way to rewrite it. Instead of code, can you provide a concise statement of what the code is expected to do? It may be different from what it actaully does. Thanks in advance for any help function setbuttonclass() { if(document.getElementById document.createTextNode) { var x = document.getElementsByTagName('input'); It doesn't seem sensible to infer the availability of a particular method by testing a random selection of other methods. To determine if getElementsByTagName is supported, test it directly. for (var i=0;ix.length;i++) { var s = x[i].value; var nolower = s.split(/[^A-Z\W]/); If the intention is to split on lower case characters, why not: var nolower = s.split(/[a-z]/) var word = (nolower.length/2 + s.length); Surely there is a simpler way to determine the class that is to be applied to buttons? if (((x[i].type == ('button'||'reset'))||(x[i].type == 'reset')||(x The expression - ('button'||'reset') - will always return the value button. When posting code, manually wrap it at about 70 characters so that auto-wrapping doesn't introduce more errors. [i].type == 'submit')) ((word) = 12)){ The test to see if the input is of type button, submit or reset can be done once, then the other logic applied. Getting x[i] every time in every expression is very inefficient: store a reference and re-use it. x[i].className = 'mb'; } else if (((x[i].type == 'button')||(x[i].type == 'reset') ||(x [i].type == 'submit')) ((word) = 4) (word != 0)){ x[i].className = 'b'; } else { if (((x[i].type == 'button')||(x[i].type == 'reset') ||(x [i].type == 'submit')) (word != 0)){ x[i].className = 'sb'; Those tests seem out of sequence, and all the brackets make it very hard to read. The code can be greatly simplified (see below). } } } } } Consider: function setButtonClass() { if (document document.getElementsByTagName) { var inputs = document.getElementsByTagName('input'); var reType = /button|reset|submit/; var reSplit = /[a-z]/; var i = inputs.length; var el, nolower, s, word; while(i--) { el = inputs[i]; // Calculate word s = el.value; nolower = s.split(reSplit); word = (nolower.length/2 + s.length); // If input is of type button, reset or submit if (reType.test(el.type)) { // If word is 12 or greater, assign mb if (word 11) { el.className = 'mb'; // Else if word is less than 12 but greater than 4 // assign sb } else if (word 4 word 12) { el.className = 'sb'; // Else if word is greater than zero (but less than 5) // assign b } else if (word 0) { // el.className = 'b'; } // If word less than 1, no className is assigned } } } } -- Rob
[jQuery] Re: Jquery Validation How To
The validation is only triggered during submit event which is fine to me. I don't like interactive validation as it creates distraction to the users. $(form).validate( { errorLabelContainer: #errMsg, wrapper: li }); $(#phoneCount).rules(add, { min: 1, messages: { min: 'A contact number is required.' } }); $(#business, #fax, #cell, #home).change(function() { if ($(this).val() != '') changeCounter(this,1); else changeCounter(this,-1); }); }); function changeCounter(calleer, i) { var curVal = parseInt($(#phoneCount)[0].value,10); $(#phoneCount)[0].value = curVal + i; } input type=hidden id=phoneCount name=phoneCount value=0 / div labelBusiness:/labelinput type=text id=business name=business /br / labelHome:/labelinput type=text id=home name=home / br / labelCell:/labelinput type=text id=cell name=cell / br / labelFax:/labelinput type=text id=fax name=fax / br / /div input type=submit id=btnSubmit name=btnSubmit value=Submit / On Jul 23, 3:19 am, kmac lucie.friga...@gmail.com wrote: Hi, I have a form that includes four text fields for phone numbers: Business, Home, Cell and Fax A user must fill in at least one phone number. How would I set up the validation for this? Cheers
[jQuery] Re: (Validate) Validation is only occuring the first time Submit is clicked
Thanks for coming back...I'm having the same problem and your solution doesn't work for me.
[jQuery] [Validate] Customize Error Labels
Hi, I need help with the Validation plugin. I want to disable the generated error labels and I need to find a way to add the class error to existing form labels instead. Currently I don't use it and simply want to add highlighting to the existing fields and labels. My forms already contain fields with corresponding labels (using the basic for - id relationship). And all i need to do now is to add the class error to these labels if the corresponding fields has errors. Sorry if this question have been asked before. Thx
[jQuery] Re: jQuery validation custom method doesn't work
Your code should have been: $.validator.addMethod('myEqual', function (value, element, param) { return value = $(param).val(); // this works know }, 'Please enter a greater year!'); On Jul 23, 12:21 pm, Erwin Purnomo panda...@gmail.com wrote: Hello all I have added a method on jQuery validator like this $.validator.addMethod('myEqual', function (value, element) { return value == element.value; // this one here didn't work :( }, 'Please enter a greater year!'); $.metadata.setType(attr, validate); $(#educationForm).validate({ showErrors: function(errorMap, errorList) { this.defaultShowErrors(); }, errorPlacement: function(error, element) { error.appendTo( element.parent(td).next (td) ); }, /*success: function(label) { label.text(ok!).addClass(success); },*/ rules: { txt_end: { required: true, myEqual: #txt_begin } }, submitHandler: function() { } }); the form looks like this div id=wrapper_form form id=educationForm name=educationForm method=post action= table width=500 border=0 tr td width=100Period:/td td width=200input type=text name=txt_begin id=txt_begin size=8 maxlength=4 class=required year ui-widget- content ui-corner-all / to input type=text name=txt_end id=txt_end size=8 maxlength=4 class=required year ui-widget-content ui-corner-all //td td width=200/td /tr tr td colspan=2 input type=submit name=btn_submit id=btn_submit value=Submit class=ui-button ui-state-default ui-corner-all / input type=button name=btn_cancel id=btn_cancel value=Cancel class=ui-button ui-state-default ui-corner-all / /td td /td /tr /table /form /div but why the custom method I added didn't work? return value == element.value; // this one here didn't work :( it always return true for any value :( am I missing something here? I didn't use the built in method because later in the form I would require to write another method to check for greater or equal and lower or equal ( = and = ) I have tested this method with greater or equal and lower or equal by replacing the == with = or with = It didn't work either
[jQuery] Re: Customize Error Labels
Read errorPlacement on validate docs. $(document).ready(function() { $(form).validate({ errorPlacement: function(error, element) { $(element).prev().addClass(error); } }); }); labelInput:/labelinput type=text id=txtInput name=txtInput class=required / On Jul 23, 3:03 pm, Rizky br4inwas...@gmail.com wrote: Hi, I need help with the Validation plugin. I want to disable the generated error labels and I need to find a way to add the class error to existing form labels instead. Currently I don't use it and simply want to add highlighting to the existing fields and labels. My forms already contain fields with corresponding labels (using the basic for - id relationship). And all i need to do now is to add the class error to these labels if the corresponding fields has errors. Sorry if this question have been asked before. Thx
[jQuery] Re: Superfish Features highly desired/needed.
Hmmm.. I thought superfish was supposed to be sort of supported on this forum. I kind of was hoping for an answer from the developer. Charlie wrote: curious what makes you want it to become the defacto solution yet this is second time in 24 hours you've complained about it Supersubs plugin provides excellent support for mega menus, what is lacking there for you? Asking for themes is being lazy, so really back to your complaint about keyboard nav. What solutions do you propose? JC wrote: Superfish is awesome.. I sincerely appreciate the fact that the developer considered physically impaired users by allowing the use of keyboard navigation. There are two things that I think is really needed. 1. better keyboard navigation protocol. In this thread I outline the ideal solution (mimicing mac os x's keyboard menu navigation.) I would appreciate if the developer were to read my post there. 2. Easy support for mega menus.. Check out the front page of http://photobucket.com/ and hover over what's new 3. A set of themes that people can choose from. Downloadable and tweakable (okay, this isn't quite as important but would be cool.) I'd really like superfish to become the defacto menu solution and I think these suggestions would really improve it. Keep up the good work!
[jQuery] Catch Exception
Hello, In my code (ASP.NET MVC using Nhibernate) , I do this : $(document).ready(function() { $('.DOFFDelete').click(function() { var id = $(this).attr(id); $.post(/Customer/DayOffDelete, { customerid: getCustomerId(), doffId: id }, function(data) { $(#myFormDOFF).html(data); }); }); }); Then I display the result in the DIV named myFormDOFF Of course, my .NET code can generate exception. I'd like when I receive an exception didn't change the content of myFormDOFF but display the message send by the exception in another DIV. How can I do this ? Thanks,