[jQuery] Simple jQuery question
Hi! I'm new here and also pretty bad at writing javascript. I'm using a snippet of code by Lloyd Irvin (http://agyuku.net/2009/05/back-to-top- link-using-jquery/) that allows the user to scroll back to the top of the page by clicking on a fixed button that fades in only when you begin scrolling down the page. It's a great code and I'm trying to rewrite it partially so instead of scrolling to the top it scrolls to a another section of the website. This is the original snippet of code from Lloyd: script jQuery(function() { jQuery(this).pngFix(); jQuery(window).scroll(function() { if(jQuery(this).scrollTop() != 0) { jQuery('#toTop').fadeIn(); } else { jQuery('#toTop').fadeOut(); } }); jQuery('#toTop').click(function() { jQuery('body,html').animate({scrollTop:0}, 800); }); }); /script The script works with this div: div id=toTop^ Back to Top/div. And here's mine, which is the same except that I replaced the 0 position to 500: script jQuery(function() { jQuery(this).pngFix(); jQuery(window).scroll(function() { if(jQuery(this).scrollTop() != 500) { jQuery('#toTop').fadeIn(); } else { jQuery('#toTop').fadeOut(); } }); jQuery('#toTop').click(function() { jQuery('body,html').animate({scrollTop:500}, 800); }); }); /script Now my question. At this point, the button disappears only when the user hit the 500 mark. I would like it to disappear and stay invisible when the user reaches the 500 mark and anything below. I think it's got to do with this line: if(jQuery(this).scrollTop() != 500) but I just don't know the right wording. Also, at this point, when the page loads, the button doesn't show unless you start scrolling down. Is there a way to make it appear when the page loads? I think this is all pretty simple stuff for you developers. It's just too much for me at this point. I would appreciate your input and advice. Thanks!
[jQuery] SlickGrid updates
Lots of changes in this one: - Updated jQueryUI to 1.7.2. - Updated jQueryUI theme. - Started putting preliminary support for jQueryUI themes CSS framework. - Removed unminified library files. - New option in SlickGrid: leaveRoomForNewRows. False by default (a change from the previous version). If true and new rows can be added, the grid adds one page of whitespace at the end to make bulk data entry easy. - Implemented paging support in the DataView (slick.model.js). - Implemented pager control to work with DataView (slick.pager.js). - Updated example7-model.html to make use of the pager. Play around with http://slickgrid.googlecode.com/svn/trunk/examples/example4-model.html and let me know what you think.
Re: [jQuery] Write jQuery Data
The jQuery way uses this method : http://docs.jquery.com/Data Another is to hide an html element that holds your data, but you'll probably like .data() better. Michel Belleville 2009/11/22 Niche bjorn@gmail.com I have 2 servers, a front end and a backend. I cannot execute server side scripts on the front end server. I need to get information from a form and pass it to my backend server. I must use Ajax for this. I am doing this with jQuery. I would like to store the form field information in JSON format and then read it on the backend server. How would I go about this, thanks.
[jQuery] insert date in a table
Hi, I need to insert the time in a table like this: script type=text/javascript var Date=new Date(); jQuery(document).ready(function(){ $(p).click( function() { $(#time_table).append(trtd,document.write(new Date()),/td/tr); } ); }); /script but this don't work... thanks, Alfredo
Re: [jQuery] Problem with lock of browser after $.ajax call
Could you provide an url to the page or something so we can help diagnose ? Michel Belleville 2009/11/21 Michael Holm Kristensen holl...@gmail.com Hi, I have a problem with some of my jquery code.. i will make this short an straight ahead. What i want is: 1. page that will print a loader bar to begin with. 2. make a ajax call to some information from an external source. 3. print the information from external source when i get the response. Everything works just fine.. by now: here is some of my code: server: ?php $sample = array( 'name' = 'Michael' ); echo(json_encode($sample)); ? client: script type=text/javascript $(document).ready(function(){ $(#ForecastSchema).html('p#160;/pp align=centerimg src=/img/ajax-loader.gif width=220 height=19 //ppPlease wait while we fetch the lastest data from weather.com./p'); $.ajax({ type: GET, url: /ajax/get_forecast.php, async: true, success: function(msg){ $(#ForecastSchema).html (msg); }, }); }); /script div id=ForecastSchema/div And everything above works just fine.. My problem is if i put a sleep(120); in my server, and fake a delay.. My browser will suddently just lock the page, i cannot click on any links on the page untill the 2 minutes has past. I have also tried to put a timeout in the ajax call, but nothing helps.. i have also tried to play with async, and nothing help here neither.. hope that someone can help me, how i can ex. navigate back to the frontpage while the page is loading..?
Re: [jQuery] insert date in a table
This is how the code should be in my knowledge : script type=text/javascript var Date=new Date(); jQuery(document).ready(function(){ $(p).click( function() { $(#time_table).append(trtd + new Date().toString() + /td/tr); }); }); /script Thanks Regards, Dhruva Sagar. On Mon, Nov 23, 2009 at 4:07 PM, Alfredo Alessandrini alfreal...@gmail.comwrote: Hi, I need to insert the time in a table like this: script type=text/javascript var Date=new Date(); jQuery(document).ready(function(){ $(p).click( function() { $(#time_table).append(trtd,document.write(new Date()),/td/tr); } ); }); /script but this don't work... thanks, Alfredo
[jQuery] Re: is this legal acording to the jQuery licence
Can anyone answer on this? On Nov 19, 4:11 pm, Dimitar Velkov dimitar.vel...@gmail.com wrote: Hello, I need to use jQuery lib in a script that will be included in my clients sites. My script will be included last in the body of a html page, and jQuery lib will be included dynamically from my script. Can anyone tell me is this going to have conflict with older jQuery libraries and with other libraries. If it's going to have conflict can someone tell me hot to solve it. I have made some modification on jquery, can someone tell me if this is legal according to the jQuery license. Here is the changes they are on the beginning of the script: (function(){ var // Will speed up references to window, and allows munging its name. window = this, // Will speed up references to undefined, and allows munging its name. undefined, // Map over jQuery in case of overwrite _jQuery = window.AR_jQuery, // Map over the $ in case of overwrite _$ = window.AR_jQuery, jQuery = window.AR_jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context ); }, I'll wait for response. Thanks -- Dimitar Velkov
[jQuery] Re: Problem with plugins
Its the javasscript on the php page, and the only php there is to output the urls, and these urls are being printed correctly The url doesn't affect the understanding of the rest of the code... On Nov 19, 3:08 pm, Michael Geary m...@mg.to wrote: Can you post a link to a test page? It's impossible to tell what is wrong from the .js file you attached. It's not even JavaScript code: it's PHP code. The browser doesn't ever see your PHP code. All it sees is the *output* of the PHP code. There could be any number of things wrong, but there's no way to tell what they may be without seeing that actual output in a test page. -Mike On Thu, Nov 19, 2009 at 8:03 AM, Paulo Henrique paulode...@gmail.comwrote: Can someone help me find any problem with the code attached? I am using it on a website, but its happening a problem with some of my plugins... I use all of them on other websites and they all work fine, but on this one, some aren't working. When I call the editable plugin, it throws an error message saying editable is not a function... the same happens with sortable, from jquery-ui... On another website I'm working, this happens with ALL jquery plugins. Does anyone know what might be causing this? Att. Paulo Henrique Vieira Neves Bsc. Sistemas de Informação +55 38 9141 5400 MSN: paulode...@live.com GTALK: paulode...@gmail.com SKYPE: paulodemoc
Re: [jQuery] Re: is this legal acording to the jQuery licence
See http://groups.google.com/group/jquery-en/browse_thread/thread/2ab7ba203fc3267f - Richard On Mon, Nov 23, 2009 at 5:52 AM, Dimitar dimitar.vel...@gmail.com wrote: Can anyone answer on this? On Nov 19, 4:11 pm, Dimitar Velkov dimitar.vel...@gmail.com wrote: Hello, I need to use jQuery lib in a script that will be included in my clients sites. My script will be included last in the body of a html page, and jQuery lib will be included dynamically from my script. Can anyone tell me is this going to have conflict with older jQuery libraries and with other libraries. If it's going to have conflict can someone tell me hot to solve it. I have made some modification on jquery, can someone tell me if this is legal according to the jQuery license. Here is the changes they are on the beginning of the script: (function(){ var // Will speed up references to window, and allows munging its name. window = this, // Will speed up references to undefined, and allows munging its name. undefined, // Map over jQuery in case of overwrite _jQuery = window.AR_jQuery, // Map over the $ in case of overwrite _$ = window.AR_jQuery, jQuery = window.AR_jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context ); }, I'll wait for response. Thanks -- Dimitar Velkov
Re: [jQuery] Re: Problem with plugins
First of all, if this is a .js script, why is there html in the first few lines ? Michel Belleville 2009/11/23 Paulodemoc paulode...@gmail.com Its the javasscript on the php page, and the only php there is to output the urls, and these urls are being printed correctly The url doesn't affect the understanding of the rest of the code... On Nov 19, 3:08 pm, Michael Geary m...@mg.to wrote: Can you post a link to a test page? It's impossible to tell what is wrong from the .js file you attached. It's not even JavaScript code: it's PHP code. The browser doesn't ever see your PHP code. All it sees is the *output* of the PHP code. There could be any number of things wrong, but there's no way to tell what they may be without seeing that actual output in a test page. -Mike On Thu, Nov 19, 2009 at 8:03 AM, Paulo Henrique paulode...@gmail.com wrote: Can someone help me find any problem with the code attached? I am using it on a website, but its happening a problem with some of my plugins... I use all of them on other websites and they all work fine, but on this one, some aren't working. When I call the editable plugin, it throws an error message saying editable is not a function... the same happens with sortable, from jquery-ui... On another website I'm working, this happens with ALL jquery plugins. Does anyone know what might be causing this? Att. Paulo Henrique Vieira Neves Bsc. Sistemas de Informação +55 38 9141 5400 MSN: paulode...@live.com GTALK: paulode...@gmail.com SKYPE: paulodemoc
[jQuery] Values from datatable to generate ul, li
hi all! i m using treeview of jquery.. if i provide the formatted html like ul,li,ul,li,/li,/ul,/li,/ul, the plugin works perfect. now i don't have ul,li rather, i've a datatable or collection which contains fields Id,name,parentId,depthlevel how can i generate ul,li list from these fields or is there any way to direct bind data with jquery plugin. u can find plugin http://docs.jquery.com/Plugins/Treeview thanx
[jQuery] [autocomplete] how to shorten the dropdown??
i am trying to shorten the result div. how do you do this. i want it to be the same size as the input box, not 3 times as big. :-)
Re: [jQuery] Looking after dropdown menu like's Superfish with RTL support
Nitsan Bin-Nun wrote: The problem is that I couldn't turn Superfish into RTL view (so the submenus will be open in the left side of the main menu instead of the left of it). Does anyone have experience with this? Someone can suggest me a solution? I'm running after a solution for like a week and haven't found what i'm looking for yet. I created RTL overrides plus a flipped submenu indicator sprite for Superfish. You can grab the CSS and sprite at http:2tbsp.com/node/114 -- View this message in context: http://old.nabble.com/Looking-after-dropdown-menu-like%27s-Superfish-with-RTL-support-tp19740248s27240p26454131.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] I want join this group
Hi guys: I would like to join see group. To learn jquery
[jQuery] Re: jQuery Opacity functions doing strange things to 1px semi-transparent png background
I hope you've found an appropriate answer as this is from a while back, but I'll still post what I have found so some other searching soul someday may stumble across this. I've suffered from this same problem as well. The result looks similar to the following http://ow.ly/E1xV There is supposed to be a bar about 25px high all the way across at something like 70% transparency. It's a single pixel opaque png image. I also have searched on this a lot to which I have found nothing. I even tried to use the ie png error fixing script (which actually made the problem worse). Now I am not fully sure what is going on behind the scenes that causes the error...my wildest guess would be something to do with IE rounding the pixel someway or another because of the opacity? The simplest fix (and only one) that I have found is just make sure the png image is larger than 1x1. I've been going with 5x5 just to be on the uber-safe side.
[jQuery] jquery help
sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance
[jQuery] Re: JQuery and ColdFusion
Hi, in your following statement: window.location.href = 'index.cfm?fuseaction=myapp.home'; if you try the full path OR relative url of index.cfm then i guess your problem would get solved. e.g. window.location.href = 'index.cfm?fuseaction=myapp.home'; thanks Prashant On Nov 20, 12:28 pm, Westside malik.robin...@gmail.com wrote: Hi, I'm trying to use ColdFusion and JQuery but I'm having some problems setting/reading session variables. I have a login box that I use jquery to do the ajax work. In my ajax call I have this snippet $(form).ajaxSubmit({ type: 'POST', dataType: 'json', url: '/myapp/model/System.cfc?method=authenticatereturnFormat=json' success: function(resp, textStatus){ if(resp[0]==true){ window.location.href = 'index.cfm?fuseaction=myapp.home'; } }); So within System.cfc there is a method called authenticate, in this method I'm trying to set some session variables (e.g, session.email, session.title) that I can reference once the user is logged in. So if the response from the ajax call returns true, the user gets redirected to this other page using window.location.href shown above. For some reason though, these session variables don't exist (session.email, session.title) when I try to cfdump them out on the 'index.cfm?fuseaction=myapp.home' page. I can dump them in the CFC and see that they are getting set correctly, but outside the CFC, they dont show up. Can anyone please shed some light on why I can't see my session variables? It mus thave something to do with calling the CFC directly or something Thanks
[jQuery] Sorting spans which are in li elements.
Hi there, My xhtml structure looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s1Name value 1/span span class=s2Time value 1/span span class=s3Status value 1/span /li li span class=s1Name value 1/span span class=s2Time value 2/span span class=s3Status value 3/span /li li span class=s1Name value 3/span span class=s2Time value 3/span span class=s3Status value 3/span /li /ul /div /div I am trying to sort span values for Name, Time and Status.. I can implement to just only one menu item by adding div =1, div =2 ... which covers li elments. But it cannot provide my needs. I have to implement it to all. When I click time menu element (let assume Time value 2 is greater than Time value 3 and Time value 3 is greater than Time value 1), all s2 spans should be at the top of the list... looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s2Name value 1/span span class=s3Time value 1/span span class=s1Status value 1/span /li li span class=s2Name value 1/span span class=s3Time value 2/span span class=s1Status value 3/span /li li span class=s2Name value 3/span span class=s3Time value 3/span span class=s1Status value 3/span /li /ul /div /div And should be available for other menu elements also... Could you show me the ways to do it? Best Regards.
[jQuery] list bullet style
Can anyone think of a snappy way to set the font to bold only on the bullet(decimal)? The content of the LI should remain font- weight:normal
[jQuery] (validate) $.format() abnormalities
Hello, I'm using the following string as an error message when a username is already taken remote: $.format({0} already exists) I am also using keyup validation. The problem is if a user types test in the username field (username is already taken) then the message test already exists comes up. But when on the same page, the user deletes test and types test2 (another username that is taken) then the message test already exists comes up. This message should be test2 already exists. Anyone know how to fix this? Thanks
[jQuery] dialog partial content not visible in IE7
I have a jQuery dialog where some of the content does not display initially in IE7. When I mouse over the dialog, the content appears. This problem does not seem to occur in IE8 or other browsers (FF, Safari, Chrome). He is a link to the (test) site. If you click on the login link in IE7, three links at the bottom of the dialog will not appear. https://exdev.ucx.ucr.edu/enroll/catalog/olr_catalog_main.php I cannot find any reason this is occurring. Have tried several things to make them appear (set focus, do a show on the containing div, etc.), but nothing seems to work. Any help or ideas would be greatly appreciated. Bill
[jQuery] Re: is this legal acording to the jQuery licence
bump
[jQuery] Bind select change event in IE7 ... NOT!
I'm dynamically generating a select element and using jQuey's load() command to replace the content of an HTML div. I then chain the bind for the change event to the load() command and everything works fine in FF, but not IE7 (IE never fires the event). If I bind a click event as opposed to a change event, that works fine in both browsers, but I don't want click. My solution: Use the livequery plugin to bind the change event in jQuery's ready handler. This works fine in both browsers. My question is why does the chaining method not work but the livequery method does? Chaining: $(#foo).load(url, parameters).bind(change, bar); livequery: $(mySelect).livequery(change, bar);
[jQuery] Slow-loading jCarousel
I'm currently working on a site for a client who requested the jCarousel script. I didn't have any trouble getting it to work... however, it seems like the script hesitates before it loads. (You can see the li bullets and all of the images before it snaps into place.) Here's the test site: http://identitypr.com/2010/ Any ideas? Thanks!! Aaron
[jQuery] Overlay with image
Can BlockUI have an overlay with an image?
[jQuery] trouble with iframe and form elements, bgiframe, jkmegamenu
Greetings, I am Working with IE6. I am conditionally, dynamically creating an iframe and populating it with an external site. One site I'm loading is a cgi with form elements that are messing up the navigation. I'm using jkmegamenu.js for my navigation. As happens with IE6 the menu opens behind the dropdown select form controls. I am calling bgiframe but it's not working. I suspect it is related to the frames being destroyed and recreated with each option selected from navigation, but I'm not sure where to apply bgiframe so it's applied. I have it in two places shown below inside the goHere function. Since i'm unable to send a link for viewing I have posted the code. I should also note that the jkmegamenu did not work [in my implementation] until I removed the jQuery.noConflict(); from the jkmegamenu.js. I'm not sure if that's related to bgiframe not working as expected. This is my first JS/jQuery/CSS development project - just for fun to learn jQuery. I'm hoping for a little guidance. Thank you. Mike - !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / script type=text/javascript src=http://internal.site.com/jquery/jquery-1[1].3.2.js;/script !--[if lt IE 7]script type=text/javascript src=../jquery/bgiframe_2.1.1/jquery.bgiframe.js/script![endif]-- script type=text/javascript src=../jquery/jkmegamenu.js/script link type=text/css media=screen rel=stylesheet href=../css/menu.css / link type=text/css media=screen rel=stylesheet href=../jquery/jkmegamenu.css / script type=text/javascript jkmegamenu.definemenu(megaanchor0, megamenu0, click) jkmegamenu.definemenu(megaanchor1, megamenu1, click) /script script type=text/javascript function destroyAllIframes() { while ($(iframe).length 0) { $(iframe).remove(); } } function goHere( app,sys ) { destroyAllIframes(); if (app == 'scheduling') { $(loading).replaceWith(div id='loading' class='separator'img src='./loading.gif'pLOADING Controls/p/div); var iframe = document.createElement('IFRAME'); $(iframe).attr({ id: 'frameName', frameBorder: 'none', width: '500', height: '500', scrolling: 'yes', src: http://internal.site.com/submit_ctrl.cgi?system=; + sys }); document.body.appendChild(iframe); $('div table i a p ul li').bgiframe(); $(iframe).load(function() { $('div table i a p ul li').bgiframe(); $(loading).replaceWith(div id='loading' class='separator'pControls/p/div); }); } } /script /head body table class='main' td align=top a href=# class=btn soft id=megaanchor0/a div id=megamenu0 class=megamenu p class=menutitleQuick Links (opens new browser)/p div class=column h3Company/h3 ul lia href=http://site.com/; target=_blankHome/a/li lia href=https://hr.com; target=_blankHR/a/li lia href=http://phone.com/; target=_blankPhone Book/a/li /ul /div div class=column h3Related/h3 ul lia href=http://www.google.com; target=_blankGoogle/a/li lia href=http://www.google.com; target=_blankGoogle/a/li lia href=http://www.google.com; target=_blankGoogle/a/li lia href=http://www.google.com; target=_blankGoogle/a/li /ul /div /div td align=top a href=# class=btn blue id=megaanchor1SYS01/a div id=megamenu1 class=megamenu p class=menutitleSystems Control and Management/p div class=column h3Status/h3 ul lia href=console.jarConsole/a/li lia href=javascript:goHere('status','bh01')Current Week/a/li lia href=javascript:goHere('prevstatus','bh01')Last Week/a/li lia href=javascript:void()TWS View/a/li lia href=#Log Files/a/li /ul /div div class=column h3Controls/h3 ul lia href=javascript:goHere('scheduling','bh01')Scheduling/a/li lia href=javascript:goHere('parameters','bh01')Parameters/a/li lia href=javascript:goHere('tapedrives','bh01')Servers/a/li lia href=javascript:goHere('dbtbl','bh01')Tables/a/li lia href=javascript:goHere('hut','bh01')HUT/a/li /ul /div div class=column h3Documentation/h3 ul lia href=javascript:goHere()Process Overview/a/li lia href=javascript:goHere()Setting Up New Processes/a/li lia href=javascript:goHere()The Code/a/li /ul /div br style=clear: left / div class=column h3Statistics/h3 ul lia href=javascript:goHere()History/a/li lia
[jQuery] [Jquery] Sorting select drop down list with optgroup
Hello, I've got the following drop down list select size=1 id=mylist optgroup label=Label1 / option value=1A/option option value=2B/option option value=3C/option optgroup label=Label2 / option value=4AA/option option value=5BB/option option value=6DD/option /select I am trying to do two things but don't know how 1. I want to add an option using jquery to the optgroup I specify 2. Once the option is added I want all options under that optgroup to be re-sorted alphabetically. For example say I want to add the option CC with value 7 under Label2, I want the final list to look like the following. select size=1 id=mylist optgroup label=Label1 / option value=1A/option option value=2B/option option value=3C/option optgroup label=Label2 / option value=4AA/option option value=5BB/option option value=7CC/option option value=6DD/option /select Can anyone help me to do this, or point me in the right direction? Thanks
[jQuery] Re: Beginners problem with selectors
Hi , I hope it would helpfull. html head script language=javascript src=jquery-1.3.2.min.js/script script function getLastTR() { alert($(#tbl tr:last).html()); } /script /head body table id=tbl trtdfirst tr/td/tr trtdtabletrtdII tr/td/tr/table/td/tr trtdIII tr/td/tr /table input type=button name=bt value=getLastTR onclick=getLastTR () / /body /html thanks Prashant On Nov 19, 7:20 pm, jkrassman joakim.krass...@sportdykare.se wrote: Hi, sorry if I am posting in the wrong group? I am having a simple nested table, looks like this table id=mytable tbody tr tdtest/td tdtabletrtdNew test/td/tr/table/td /tr /tbody /table So my problem is that I cant get the last TR within the first table? var Obj = $(table#list tbodytr:last); Of course it looks at the last tr in the table, but how should I manage to get the last TR in the first table? Best regards, Joakim
Re: [jQuery] dialog partial content not visible in IE7
Please post this question to the jQuery UI list: http://groups.google.com/group/jquery-ui http://groups.google.com/group/jquery-uiAlso, it would help if you could reduce this to a minimal test page that reproduces the issue. Thanks. - Richard On Sat, Nov 21, 2009 at 9:23 PM, Bill wcma...@gmail.com wrote: I have a jQuery dialog where some of the content does not display initially in IE7. When I mouse over the dialog, the content appears. This problem does not seem to occur in IE8 or other browsers (FF, Safari, Chrome). He is a link to the (test) site. If you click on the login link in IE7, three links at the bottom of the dialog will not appear. https://exdev.ucx.ucr.edu/enroll/catalog/olr_catalog_main.php I cannot find any reason this is occurring. Have tried several things to make them appear (set focus, do a show on the containing div, etc.), but nothing seems to work. Any help or ideas would be greatly appreciated. Bill
[jQuery] Re: Values from datatable to generate ul, li
vb.net Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim cn As String = Data Source=mysqlserver;Initial Catalog=mydatabase;User ID=myuser;PWD=password Using conn As New SqlConnection(cn) Dim cmd As New SqlCommand(sp_paislocal, conn) cmd.CommandType = CommandType.StoredProcedure Dim ad As New SqlDataAdapter(cmd) Dim ds As New DataSet() ad.Fill(ds) ds.Relations.Add(New DataRelation(pais, ds.Tables (0).Columns(pais), ds.Tables(1).Columns(pais))) MasterRep.DataSource = ds.Tables(0) MasterRep.DataBind() End Using End Sub Protected Sub MasterRep_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs) If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then Dim drv As DataRowView = TryCast(e.Item.DataItem, DataRowView) Dim ChildRep As Repeater = TryCast(e.Item.FindControl (ChildRep), Repeater) ChildRep.DataSource = drv.CreateChildView(pais) ChildRep.DataBind() End If End Sub On 23 Nov, 11:12, CreativeMind aftab.pu...@gmail.com wrote: hi all! i m using treeview of jquery.. if i provide the formatted html like ul,li,ul,li,/li,/ul,/li,/ul, the plugin works perfect. now i don't have ul,li rather, i've a datatable or collection which contains fields Id,name,parentId,depthlevel how can i generate ul,li list from these fields or is there any way to direct bind data with jquery plugin. u can find pluginhttp://docs.jquery.com/Plugins/Treeview thanx
Re: [jQuery] JQuery and ColdFusion
I use ColdFusion and jQuery all the time with no problems. In fact, I use it with mach-ii. Looks like you're using fusebox? Just a guess. Calling the CFC directly is your problem. When you do that, it bypasses the application.cfm/cfc, which is normally where your session scope is defined. Because you are not going through the same application scope, your session variables won't be there. Better to create an event (in mach-ii terms) that your application engine can understand and just pass it through that way, just like a normal browser call. instead of: /myapp/model/System.cfc?method=authenticatereturnFormat=json Something like index.cfm?fuseaction=authenticate Then let your framework do the rest. -dave evartt Westside wrote: Hi, I'm trying to use ColdFusion and JQuery but I'm having some problems setting/reading session variables. I have a login box that I use jquery to do the ajax work. In my ajax call I have this snippet $(form).ajaxSubmit({ type: 'POST', dataType: 'json', url: '/myapp/model/System.cfc?method=authenticatereturnFormat=json' success: function(resp, textStatus){ if(resp[0]==true){ window.location.href = 'index.cfm?fuseaction=myapp.home'; } }); So within System.cfc there is a method called authenticate, in this method I'm trying to set some session variables (e.g, session.email, session.title) that I can reference once the user is logged in. So if the response from the ajax call returns true, the user gets redirected to this other page using window.location.href shown above. For some reason though, these session variables don't exist (session.email, session.title) when I try to cfdump them out on the 'index.cfm?fuseaction=myapp.home' page. I can dump them in the CFC and see that they are getting set correctly, but outside the CFC, they dont show up. Can anyone please shed some light on why I can't see my session variables? It mus thave something to do with calling the CFC directly or something Thanks
[jQuery] How can I implement Comet (Ajax reverse) in my application?
Hi, I have an application that must be in real time. It works this way: - From a Windows software I send data to a Web Service that updates an XML file in the server. - The front end (simply html file + jquery) calls a $.ajax within a setInterval of 4 seconds. This ajax function reads the xml file and refresh the content of the page based on the lastest content of the xml file. In my local tests it's working fine, but I'm afraid that this way I could overload the server with not so much clients. I've been searching and looking in this group and in the web about how the google's gmail works and I found the Comet technique, wich seems to be a good implementation to me. The problem is that I can't figure out how to adjust the few tutorials and examples I've found to my case. The concept is simple: to read the xml file as it's modified. So I'd like an simple example that I could use for this case. Or maybe the overload of the repetitive ajax calls is similar to the server processing using Comet. Can't be that? Thanks in advance! Gustavo Paulino, São José do Rio Preto, Brazil
[jQuery] jquery-autocomplete encoding character issue
Hello, I have a problem with the encoding / decoding of Norwegian characters namely Ø turned into à This happens with the jquery-autocomplete plugin and not with the jquery load() method. That is, this : $(totalAvtaleNavn).load(suggestTotalAvtaleUrl, {q:TTTøøre}); works fine. Always. But this : $(#miID).autocomplete(myUrl, { minChars: 2, matchContains: 1, formatItem: function(row) { return(row[2]); }, formatResult: function(row) { return(row[1]); } }); works only when run from within a Grails run-app on my local machine, and does not work when run from a test server with Tomcat. My guess is that the jquery-autocomplete plugin is sensitive to some environment affecting its handling of utf-8 encoding and decoding. Any idea ?
[jQuery] Floating Menu (Over Slideshow)
I wish to know if there is a tutorial (or any help) available to recreate the same outcome as the menu shown on this site? http://www.atlantis.com/default.aspx Thanks in advance, Matt.
[jQuery] Re: Need to hide a href title content, but still need it available in the DOM
That worked beautifully!!! Thanks so much for teh help. Dave BTW... They call me CAPTAIN OBVIOUS!!!
[jQuery] Re: Click event outside of an element
Perhaps something along these lines is what you are looking for? $(document).click(function(event) { if (!$(event.target).hasClass('classname')) { // run this code if anywhere in the document except the item is clicked } }); On Nov 20, 8:29 am, Keysher keys...@gmail.com wrote: Hi! I am newbie in JQuery. I want to catch click event outside and specified class. For example, I have a div with class classname, and I want to attach some actions when I click outside, in the rest of the page. I tried with this (to get the classname where I click): $('*').click(function(){ alert($(this).attr('class')); }); But not works! Any idea? Thanks! P.D: sorry for the bad english!
[jQuery] Re: (validate)
Thanks for your aid. On Nov 22, 1:40 am, Tsz Ming WONG tszm...@gmail.com wrote: On Sun, Nov 22, 2009 at 11:21 AM, Enoch enochelli...@gmail.com wrote: script type=text/javascript $().ready(function() { // validate signup form on keyup and submit $(#regform).validate({ rules: { fname: { required: true, minlength: 2 }, email: { required: true, email: true }, messages: { fname: Please enter your firstname, email: Please enter a valid email address, } }}); }); Because you have syntax error in your code. Also, extra comma after `email: Please enter a valid email address` is not needed. -- Best Regards, tszming
[jQuery] (validate)
I am trying to override only the showLabel function in the jquery.validate.js . I've found inheritence plugin for it. Nevertheless , I wasn't able to implement the example givven with it. Is there any way that I can reuse the jquery.validate.js without changing the original , but by overriding the function somehow , so that the label will be handled in some other manner in my own file of js ?
[jQuery] Problem with $(document).ready in =IE7 only
Hello everyone, I'm trying to figure out this weird error I'm seeing. I have a simple script that, after the document is ready, I want to change a CSS attribute from display:none to display:block and then load the jquery inifinite carousel plugin: script type=text/javascript language=javascript !-- $(document).ready(function() { $(#carousel).css({ 'display' : 'block' }); }); $(function(){ $('#carousel').infiniteCarousel({ transitionSpeed : 500, displayTime : 1, textholderHeight : .15, displayProgressBar : 0, displayThumbnails: 0, }); }); -- /script This works fine in Safari, Firefox and IE 8. But in IE 7 (and I assume lower but I'm not testing for it because it's not a requirement), I get an object expected error on the last }); in the first function. I've googled around and changed up the script include so it's set to language instead of type, I've moved stuff around, made sure that my JS include path is correct, but I'm stumped. For reference, here's how I include my JS. I know I can use the google inclusion code, but when I have that IE7 throws another hissy about variables not being defined: script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js/script script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js/ script link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ smoothness/jquery-ui.css type=text/css rel=stylesheet So I'm 99.9% positive it's not loading the js fast enough for the function, but I'm not sure how to fix it.
[jQuery] Re: Problem with $(document).ready in =IE7 only
So I'm 99.9% positive it's not loading the js fast enough for the function And that would not be correct, as the browser waits for the script to be loaded... so there is no race condition to be had... Maybe it's something else in your HTML throwing off IE7, like this? http://groups.google.com/group/jquery-en/browse_thread/thread/b79cf59b7d40f8f0?hl=en On Nov 23, 9:03 am, JD john.de...@gmail.com wrote: Hello everyone, I'm trying to figure out this weird error I'm seeing. I have a simple script that, after the document is ready, I want to change a CSS attribute from display:none to display:block and then load the jquery inifinite carousel plugin: script type=text/javascript language=javascript !-- $(document).ready(function() { $(#carousel).css({ 'display' : 'block' }); }); $(function(){ $('#carousel').infiniteCarousel({ transitionSpeed : 500, displayTime : 1, textholderHeight : .15, displayProgressBar : 0, displayThumbnails: 0, }); }); -- /script This works fine in Safari, Firefox and IE 8. But in IE 7 (and I assume lower but I'm not testing for it because it's not a requirement), I get an object expected error on the last }); in the first function. I've googled around and changed up the script include so it's set to language instead of type, I've moved stuff around, made sure that my JS include path is correct, but I'm stumped. For reference, here's how I include my JS. I know I can use the google inclusion code, but when I have that IE7 throws another hissy about variables not being defined: script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js/script script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js/ script link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ smoothness/jquery-ui.css type=text/css rel=stylesheet So I'm 99.9% positive it's not loading the js fast enough for the function, but I'm not sure how to fix it.
[jQuery] Re: Tablesorter date help
A topic just like this http://groups.google.com/group/jquery-en/browse_thread/thread/bafebc3906044486/bf1c587647d38e22?hl=en On Nov 20, 9:35 am, hOtTiGeR hotti...@gmail.com wrote: Hi, I'm using this plugin and need to filter the date, but am having difficulties. Do you know how I would sort dates in the format mm/ ? Thanks
[jQuery] Re: Sorting select drop down list with optgroup
Well, you need to correct structure to start with select size=1 id=mylist optgroup label=Label1 / option value=1A/option option value=2B/option option value=3C/option /optgroup optgroup label=Label2 option value=4AA/option option value=5BB/option option value=7CC/option option value=6DD/option /optgroup /select Now you could say: $(#myList optgroup[label='Label2']).append('option value=7EE/ option'); On Nov 21, 8:54 am, mahdoum aub.kabb...@gmail.com wrote: Hello, I've got the following drop down list select size=1 id=mylist optgroup label=Label1 / option value=1A/option option value=2B/option option value=3C/option optgroup label=Label2 / option value=4AA/option option value=5BB/option option value=6DD/option /select I am trying to do two things but don't know how 1. I want to add an option using jquery to the optgroup I specify 2. Once the option is added I want all options under that optgroup to be re-sorted alphabetically. For example say I want to add the option CC with value 7 under Label2, I want the final list to look like the following. select size=1 id=mylist optgroup label=Label1 / option value=1A/option option value=2B/option option value=3C/option optgroup label=Label2 / option value=4AA/option option value=5BB/option option value=7CC/option option value=6DD/option /select Can anyone help me to do this, or point me in the right direction? Thanks
RE: [jQuery] JQuery and ColdFusion
I just set my session variables in the method I'm calling via jQuery/ajax ...any reason you can think of why that would be a bad idea? Rick -Original Message- From: Dave Evartt [mailto:da...@wehali.com] Sent: Friday, November 20, 2009 4:27 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] JQuery and ColdFusion I use ColdFusion and jQuery all the time with no problems. In fact, I use it with mach-ii. Looks like you're using fusebox? Just a guess. Calling the CFC directly is your problem. When you do that, it bypasses the application.cfm/cfc, which is normally where your session scope is defined. Because you are not going through the same application scope, your session variables won't be there. Better to create an event (in mach-ii terms) that your application engine can understand and just pass it through that way, just like a normal browser call. instead of: /myapp/model/System.cfc?method=authenticatereturnFormat=json Something like index.cfm?fuseaction=authenticate Then let your framework do the rest. -dave evartt Westside wrote: Hi, I'm trying to use ColdFusion and JQuery but I'm having some problems setting/reading session variables. I have a login box that I use jquery to do the ajax work. In my ajax call I have this snippet $(form).ajaxSubmit({ type: 'POST', dataType: 'json', url: '/myapp/model/System.cfc?method=authenticatereturnFormat=json' success: function(resp, textStatus){ if(resp[0]==true){ window.location.href = 'index.cfm?fuseaction=myapp.home'; } }); So within System.cfc there is a method called authenticate, in this method I'm trying to set some session variables (e.g, session.email, session.title) that I can reference once the user is logged in. So if the response from the ajax call returns true, the user gets redirected to this other page using window.location.href shown above. For some reason though, these session variables don't exist (session.email, session.title) when I try to cfdump them out on the 'index.cfm?fuseaction=myapp.home' page. I can dump them in the CFC and see that they are getting set correctly, but outside the CFC, they dont show up. Can anyone please shed some light on why I can't see my session variables? It mus thave something to do with calling the CFC directly or something Thanks
[jQuery] Re: Floating Menu (Over Slideshow)
On Nov 19, 9:44 pm, Zenith matthewrow...@gmail.com wrote: I wish to know if there is a tutorial (or any help) available to recreate the same outcome as the menu shown on this site? http://www.atlantis.com/default.aspx I know of no tutorials like that. But the JS is available and unobfuscated. It might take time to get through it all, but there's probably a lot to learn by reading the source. There are plenty of content-scrolling plug-ins for the image. And there are drop-down plug-ins available for the menus. As to the menu floating on top of the scrolling images, it's just a combination of position: absolute and high z-index on the CSS for the menu. Cheers, -- Scott
Re: [jQuery] Write jQuery Data
Hi Michael, could you elaborate a bit more. I am completely lost... If I was to store the data as such ³ $(div).data(test, { first: 16, last: pizza! }); . How would I retrieve that data from a remote server using .getJSON or something similar? Thanks for your help. On 11/23/09 4:45 AM, Michel Belleville michel.bellevi...@gmail.com wrote: The jQuery way uses this method : http://docs.jquery.com/Data Another is to hide an html element that holds your data, but you'll probably like .data() better. Michel Belleville 2009/11/22 Niche bjorn@gmail.com I have 2 servers, a front end and a backend. I cannot execute server side scripts on the front end server. I need to get information from a form and pass it to my backend server. I must use Ajax for this. I am doing this with jQuery. I would like to store the form field information in JSON format and then read it on the backend server. How would I go about this, thanks.
RE: [jQuery] I want join this group
Unless there's some level of joining that I've missed, it seems that you've already joined! Welcome! :o) Rick -Original Message- From: Miccel [mailto:maohong...@gmail.com] Sent: Sunday, November 22, 2009 1:17 AM To: jQuery (English) Subject: [jQuery] I want join this group Hi guys: I would like to join see group. To learn jquery
Re: [jQuery] Problem with $(document).ready in =IE7 only
You don't need the language=javascript in the script tag; that isn't the problem. There is an extra comma at the end of the object literal in your infiniteCarousel({...}) call. See if removing that helps. Note that $(document).ready(function() { ... }); and $(function() { ... }); mean exactly the same thing. You may want to pick one form or the other for consistency. And no need to have two separate ones (although no harm done either). -Mike On Mon, Nov 23, 2009 at 6:03 AM, JD john.de...@gmail.com wrote: Hello everyone, I'm trying to figure out this weird error I'm seeing. I have a simple script that, after the document is ready, I want to change a CSS attribute from display:none to display:block and then load the jquery inifinite carousel plugin: script type=text/javascript language=javascript !-- $(document).ready(function() { $(#carousel).css({ 'display' : 'block' }); }); $(function(){ $('#carousel').infiniteCarousel({ transitionSpeed : 500, displayTime : 1, textholderHeight : .15, displayProgressBar : 0, displayThumbnails: 0, }); }); -- /script This works fine in Safari, Firefox and IE 8. But in IE 7 (and I assume lower but I'm not testing for it because it's not a requirement), I get an object expected error on the last }); in the first function. I've googled around and changed up the script include so it's set to language instead of type, I've moved stuff around, made sure that my JS include path is correct, but I'm stumped. For reference, here's how I include my JS. I know I can use the google inclusion code, but when I have that IE7 throws another hissy about variables not being defined: script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js/script script type=text/javascript language=javascript src=http:// ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js/ script link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ smoothness/jquery-ui.csshttp://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/%0Asmoothness/jquery-ui.css type=text/css rel=stylesheet So I'm 99.9% positive it's not loading the js fast enough for the function, but I'm not sure how to fix it.
[jQuery] Re: list bullet style
what do you mean by snappy? you could always just use CSS (not sure how this questions relates to jQuery or JavaScript at all) to replace the bullet with your own image: HTML: ul liList Item 1/li liList Item 2/li liList Item 3/li /ul CSS: ul li {list-style-type:none;background:transparent url(path/to/bold- bullet.gif) no-repeat left center;} as far as i know, you can't style just the bullet unless you wrap the li/'s content in some other tag, such as: HTML: ul lispanList Item 1/span/li lispanList Item 2/span/li lispanList Item 3/span/li /ul CSS: ul li {font-weight:bold;} ul li span {font-weight:normal;} but in the last example, you are adding non-semantic span/ tags, which should be avoided where possible. On Nov 21, 1:45 am, dnagel grandna...@gmail.com wrote: Can anyone think of a snappy way to set the font to bold only on the bullet(decimal)? The content of the LI should remain font- weight:normal
[jQuery] How to detect a child window closing and then refresh current window.
Hi there, I am building an LMS that launches courses in a child window that communicate back to the server through Javascript. I need to refresh the window that launches the child window after the child window is closed. The main restriction is that I can not put any additional code or even touch the existing code of the child window. And go. :) I am struggling with this one. I have searched on google but can only find regular javascript stuff that is always talking about the child detecting the parent but not the other way around and not with jquery. Any help would be greatly appreciated. Thanks in advance. Ray James.
[jQuery] jquery toggle Ie7 problem
hey, can somebody help me? i am a fairly new user to jquery and i have a problem with a website i've designed. This website is for a local architect and on this page i want to show a list of all his projects. If you then click on one of this links i would like the toggle to show some extra information. however i can't seem to figure out how i can load the page with the toggle divs closed. i've tried to put display:none to the div.project tag, this works, but the problem is that the images are also not displayed in IE7 url: http://www.dexo-design.nl/quanjel/projecten.php http://www.dexo-design.nl/quanjel/projecten.php this is a part of the code (where div.project should load closed): h4 class=projecta href=# onClick=return false- Interieur woonhuis Van Mourik, Delft /h4 div class=projectpLorem ipsum..//..ed fringilla dignissim pharetra./p/div thanks in advance, -- View this message in context: http://old.nabble.com/jquery-toggle-Ie7-problem-tp26481964s27240p26481964.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] ie problem modifying html.
Hallo all. I got a strange issue with IE (all versions). I have an homepage that defines an iframe. From the iframe content i modify the head to append a css in this way, http://pastie.org/711448 Then I append from the iframe a div in the parent that uses a css class in the just injected css. All work great in all browsers, since in IE is pressed the F5 button. After this the css injected is deleted, then I recreate it but in the consequent calls the div does not find the css in the header. If after the F5 i delete all temporary files all continue to work great. Seems to be a cache problem in IE: does anyone know how to fix this problem? Kind regards Massimo
[jQuery] Re: How to detect a child window closing and then refresh current window.
On Nov 23, 11:32 am, RayJames cdlcollege.rayja...@gmail.com wrote: [ ... ] I need to refresh the window that launches the child window after the child window is closed. The main restriction is that I can not put any additional code or even touch the existing code of the child window. I don't know if there are any events that you can collect, but you can watch it in a timer. I don't know of anything in jQuery that would help you do this, but some simple JS should work: function onWindowClose(windowRef, id, callback) { setTimeout(function check() { if (windowRef == null || windowRef.closed) { callback(id); } else { setTimeout(check, 20); } }, 20); } Check out http://jsbin.com/usuco (code: http://jsbin.com/usuco/edit) to see it in action. Cheers, -- Scott
Re: [jQuery] Write jQuery Data
Well, to store things client-side you've already got it halfway, you know how to store stuff. Now you retrieve it the same way, except you don't pass the second parameter. var my_acorn = $('div').data('test'); Nothing tough here. (that's all in the doc I've given you anyway) Now if you wanted to query your server and get json data, .getJSON() is your best bet indeed, and http://docs.jquery.com/Getjson will tell you exactly how to use it. I'll let you handle the server-side part using your favorite flavour of server, language and data storage. Michel Belleville 2009/11/23 Bjorn Symister bjorn@gmail.com Hi Michael, could you elaborate a bit more. I am completely lost... If I was to store the data as such “ $(div).*data*(test, { first: 16, last: pizza! }); . How would I retrieve that data from a remote server using .getJSON or something similar? Thanks for your help. On 11/23/09 4:45 AM, Michel Belleville michel.bellevi...@gmail.com wrote: The jQuery way uses this method : http://docs.jquery.com/Data Another is to hide an html element that holds your data, but you'll probably like .data() better. Michel Belleville 2009/11/22 Niche bjorn@gmail.com I have 2 servers, a front end and a backend. I cannot execute server side scripts on the front end server. I need to get information from a form and pass it to my backend server. I must use Ajax for this. I am doing this with jQuery. I would like to store the form field information in JSON format and then read it on the backend server. How would I go about this, thanks.
Re: [jQuery] Write jQuery Data
Oh, and to serialize your stuff, you can use the nifty serialize method jQuery provides for the forms : http://docs.jquery.com/Ajax/serialize ; basically you input a form, it outputs a JSON string containing its data. Michel Belleville 2009/11/23 Michel Belleville michel.bellevi...@gmail.com Well, to store things client-side you've already got it halfway, you know how to store stuff. Now you retrieve it the same way, except you don't pass the second parameter. var my_acorn = $('div').data('test'); Nothing tough here. (that's all in the doc I've given you anyway) Now if you wanted to query your server and get json data, .getJSON() is your best bet indeed, and http://docs.jquery.com/Getjson will tell you exactly how to use it. I'll let you handle the server-side part using your favorite flavour of server, language and data storage. Michel Belleville 2009/11/23 Bjorn Symister bjorn@gmail.com Hi Michael, could you elaborate a bit more. I am completely lost... If I was to store the data as such “ $(div).*data*(test, { first: 16, last: pizza! }); . How would I retrieve that data from a remote server using .getJSON or something similar? Thanks for your help. On 11/23/09 4:45 AM, Michel Belleville michel.bellevi...@gmail.com wrote: The jQuery way uses this method : http://docs.jquery.com/Data Another is to hide an html element that holds your data, but you'll probably like .data() better. Michel Belleville 2009/11/22 Niche bjorn@gmail.com I have 2 servers, a front end and a backend. I cannot execute server side scripts on the front end server. I need to get information from a form and pass it to my backend server. I must use Ajax for this. I am doing this with jQuery. I would like to store the form field information in JSON format and then read it on the backend server. How would I go about this, thanks.
[jQuery] Re: (Jquery Validate) Keep getting an error in IE8
I'm getting this same error. Does anyone have a patch for it? On Nov 7, 9:31 pm, chobo2 howser_...@hotmail.com wrote: Hi I don't know what is going but my jqueryvalidateplugin(1.5.5) is not working and I am not sure for how long since I do most of my testing on firefox. The problem is this I go to one of my forms that jqueryvalidateon it and hit my create button my validation kicks in as it should and does this right in all browsers including IE8. Now where it does not work is when I do this. I choose the first dropdown list and choose something. Then hit create now all validation errors should show up expect the one for the first dropdown box. It does this in all browsers except in IE 8. I get this Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0) Timestamp: Sun, 8 Nov 2009 03:26:08 UTC Message: Object required Line: 890 Char: 5 Code: 0 URI: http://localhost:3668/Scripts/Plugins-Development/jquery.validate.js This is what is on line 890 return options.length 0 ( element.type == select-multiple || ($.browser.msie !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length 0); This like the whole method block. methods: { //http://docs.jquery.com/Plugins/Validation/Methods/required required: function(value, element, param) { // check if dependency is met if ( !this.depend(param, element) ) return dependency-mismatch; switch( element.nodeName.toLowerCase() ) { case 'select': var options = $(option:selected, element); return options.length 0 ( element.type == select-multiple || ($.browser.msie !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length 0); case 'input': if ( this.checkable(element) ) return this.getLength(value, element) 0; default: return $.trim(value).length 0; } }, Not sure what is going on.
[jQuery] two jajax queries conflict
good days when i execute below codes i am getting the download .gif at #sonuc and #pass same time . i can not fix this conflict , can anybody help me thx... $(document).ready(function(){ $('#userid').keyup( function(e){ e.preventDefault(); var userid=document.getElementById(userid).value; $.ajax({ type: 'GET', url: 'logincheck.jsp', data: 'userid='+userid, dataType:text/html, success: function(sonuc) { $('#sonuc').html(sonuc); } }); return false; } ); //$.ajaxTimeout(); $(#sonuc).ajaxStart(function(){ $(this).html('img src=image/yukleniyor.gif /'); }); $(#sonuc).ajaxError(function(){ $(this).html('img src=image/error.png /'); }); }); /* function sonucAl() { var userid=document.getElementById(userid).value; $.ajax({ type: 'GET', url: 'logincheck.jsp', data: 'userid='+userid, dataType:text/html, success: function(sonuc) { $('#sonuc').html(sonuc); } }); return false; } */ $(document).ready(function(){ $('#password').keyup( function(e){ e.preventDefault(); var password=document.getElementById(password).value; $.ajax({ type: 'GET', url: 'passcheck.jsp', data: 'password='+password, dataType:text/html, success: function(sonuc) { $(#pass).html(sonuc); } }); return false; } ); $(#pass).ajaxStart(function(){ $(this).html('img src=image/yukleniyor.gif /'); }); $(#pass).ajaxError(function(){ $(this).html('img src=image/error.png /'); }); }); /*function sifreAl() { var password=document.getElementById(password).value; $.ajax({ type: 'GET', url: 'passcheck.jsp', data: 'password='+password, dataType:text/html, success: function(sonuc) { $(#pass).html(sonuc); } }); return false; } */
[jQuery] Invalid argument jquery.min.1.3.2.js Code 0 IE7,IE8
Check it out HTML ul lione/li litwo/li lithree/li lifour/li lifive/li /ul CSS ul{ display:block; overflow:hidden; padding:0px; margin:0px; } ul li{ list-style-type:none; float:left; background-color:#666; margin-right:10px; position:relative; top:0px; padding:5px 10px; } JAVASCRIPT var menu_node = null; var menu_lenght = $(ul).children().length; var menu_elements = $(ul).children(); var total_widths= 0; var speed = 1000; for(i=0;imenu_lenght;i++){ menu_node = menu_elements[i]; total_widths+= $(menu_node).outerWidth(); total_widths+= parseInt($(menu_node).css(margin-left),10); total_widths+= parseInt($(menu_node).css(margin-right),10); $(menu_node).css({left:-+total_widths+px}); } for(i=0;imenu_lenght;i++){ menu_node = menu_elements[i]; $(menu_node).animate({left:0px},speed); } ERROR IN IE7 and IE8 :'( Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Mon, 23 Nov 2009 17:00:24 UTC Message: Invalid argument. Line: 12 Char: 12949 Code: 0 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js ERROR LINE: $(menu_node).css({left:-+total_widths+px}); Tracing with the developer tool of IE8 i found http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js or either other jquery 1.3.2 1661: elem[ name ] = value; Any suggestion? Thanks
[jQuery] jcarousel scroll bug
I found a bug in the scroll function of jcarousel : If the number of items is not a mutiple of the scroll parameter, then when you go back in the list, the first item is nether shown again. Ex : try a list of 6 items with visible parameter=4 and scroll parameter=4. The solution is to change line 453 : this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') this.options.size != null this.first == 1) ? this.options.size : this.first - this.options.scroll); replace by : this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') this.options.size != null this.first == 1) ? this.options.size : Math.max(0,this.first - this.options.scroll)); Because the result of this.first - this.options.scroll can be negative, the scroll didn't allow to go to the first element again. Regards
Re: [jQuery] jquery help
Using solely the content of your message I've deduced that : 1. you're facing a problem 2. you're using jQuery 3. something that is composed of two files containing stuff isn't doing whatever it's meant to be doing using functions and probably gizmos I've got the first and second point, though the third is not quite as clear. Maybe your code would help, plus a description of what it's meant to do ?... Michel Belleville 2009/11/19 shobhit chaturved...@gmail.com sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance
Re: [jQuery] Get URL from a DIV which was loaded with $.load();
Unless you store it you loose it. I suggest adding code in the .load() callback that'll store the url in the div. Michel Belleville 2009/11/23 tobias.br...@me.com tobias.br...@me.com Hello, is there any way to get the URL from a div which was previously loaded via $.load(); ? For example from: $('#div').load('http://www.google.de'); Tobias
[jQuery] Re: Get URL from a DIV which was loaded with $.load();
Ok, i try to be more precise: I load via $.load(); a remote page containing only a html table with data. I regular reload the div with new content because i've implemented a pagination. Now i also have a delete button which deletes selected rows from this table inside my div and right after the delete i want to reload the currently openened url (i.e. /data/ sessions/?page=15) Right now i've added a hidden div with the current url which i can read with jquery and reload it with $.load()... but i wonder if there is a more clever way :-) Tobias On Nov 23, 7:06 pm, Michel Belleville michel.bellevi...@gmail.com wrote: Unless you store it you loose it. I suggest adding code in the .load() callback that'll store the url in the div. Michel Belleville 2009/11/23 tobias.br...@me.com tobias.br...@me.com Hello, is there any way to get the URL from a div which was previously loaded via $.load(); ? For example from: $('#div').load('http://www.google.de'); Tobias
[jQuery] Need assist with using a selector in treeview
Hi All, I cant seem to find the right way to check for the HitArea div class. I'm using a nice piece of code found here as follows: I need to be able to know when the class name changes between hitarea expandable- hitarea and hitarea collapsable-hitarea .. All I can get to work is the hitarea* and this doesn't cut it..Any assistance would be greately appreciated as I'm realtively new at JQuery. NOTE: I also tried catching just the LI tags collapseable and expandable but to no avail.. $(document).ready(function(e) { jQuery.delegate = function(rules) { return function(e) { var target = $(e.target); for (var selector in rules) if (target.is(selector)) return rules [selector].apply(this, $.makeArray(arguments)); } } $('#black').click($.delegate({ '.hitarea*': function(e) { alert(hit3); }, '.folder': function(e) { $('#errMessage').empty(); $(#lblLMSFolder).empty(); $(#lblLmsAlignedClassTitle).empty(); $(#lblLMSFolder).toggle().append($(e.target).closest (.folder).text()); } }); SNIP of markup li id= class=expandable div class=hitarea expandable-hitarea/ span class=folderHR Management/span ul style=display: none; li id= class=last span class=file input id=1 class=checkclass type=checkbox name=checkbox/ Attendance Management.zip /span /li /ul /li
Re: [jQuery] jquery help
Thanks Michael for helping out. I have two servers. Server 1: Scripting Server I have full control over this server and this is where all server side script goes. Server 2: Client Server I cannot put any server side script (such as php) on this server. Only HTML, CSS, Javascript. I have to work under the above conditions. I have a form on (Server 2), that collects user data. I need to store that user data on (Server 1). My limitations are that I cannot refresh the entire page, only parts of the page. Ajax Limitations: Does not work cross domain unless: using php, local proxy, iFrame, JSON. My only option is to use JSON. So What I need is on: On (Server2) package the data in a JSON format, so that when (Server1) goes to the URL of (Server2), it will see the JSON data with the values I need. Take those values. I know how to read the values and have the code on (Server1). Its setting things up on (Server2) I have a problem with. Hope that clarifies things :) Bjorn On 11/23/09 1:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Using solely the content of your message I've deduced that : 1. you're facing a problem 2. you're using jQuery 3. something that is composed of two files containing stuff isn't doing whatever it's meant to be doing using functions and probably gizmos I've got the first and second point, though the third is not quite as clear. Maybe your code would help, plus a description of what it's meant to do ?... Michel Belleville 2009/11/19 shobhit chaturved...@gmail.com sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance
Re: [jQuery] jquery 1.3.2 syntax error line 324 in IE6
that's odd! CompanionJS is saying there is a syntax error in what is clearly a comment. Looks like that is a CompanionJS error. On Nov 22, 2009, at 10:25 PM, viperasi wrote: Thank reply. the syntax error has be found jquery-1.3.2.min.js. check the attach pic. https://twitter.com/viperasi my fridge!:http://bit.ly/ohBHG 有事您说话 On Fri, Nov 20, 2009 at 4:42 AM, Karl Swedberg k...@englishrules.com wrote: nothing here looks like it would cause a syntax error. Maybe the problem is in your formLogin() function? --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 19, 2009, at 2:00 AM, viperasi wrote: Whether jquery-1.3.2.js or jquery-1.3.2.min.js,i always got the error.Other browsers without error. Below is the code: $(function(){ $('#username').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); $('#password').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); $('#valicode').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); }); Can anyway help me please? I think it's something really simple and I'm just being stupid. Many thanks for reading and sorry for my poor English. https://twitter.com/viperasi my fridge!:http://bit.ly/ohBHG 有事您说话 jquery_error_in_ie6.JPG
[jQuery] Jquery UI Tabs FX only working in one direction
Hi Guys Just a quick one. I have a site that features a Jquery UI Tab widget within one section of an Accordion. I am having a problem with the effects on this Tab only working when navigating backwards in the list (i.e. going tab 3, tab 2, tab 1). When I run forwards through the list of tabs, the effect does not work and it just jumps between the tabs like no effect is specified. The tabs can be found here: http://www.paulbraham.com/new_test/#content=2 Also, my site uses the Jquery BBQ plugin to keep a history of where the user has been (for the back button and bookmarking). I am not sure if this is causing the effects issue. Thanks in advance Paul
[jQuery] Re: Get URL from a DIV which was loaded with $.load();
On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote: Right now i've added a hidden div with the current url which i can read with jquery and reload it with $.load()... but i wonder if there is a more clever way :-) What Michel is suggesting is that you store this in the div when you do the load. To store and fetch the data, you can just use: http://docs.jquery.com/Core/data#name http://docs.jquery.com/Core/data#namevalue So simply try: $(#myDiv).load(myUrl, {my: data}, function (responseText) { // ... anything else you need here. $(this).data(url, myUrl); }); Then later: var url = $(#myDiv).data(url); And that's it! -- Scott
[jQuery] Re: Get URL from a DIV which was loaded with $.load();
Thanks for the reply... what i dont understand... for what do i need a callback function? Would this work ? $(#div).load(/data/sessions/15, { url: /data/sessions/15 }); and later var url = $(#div).data(url); Tobias On Nov 23, 8:06 pm, Scott Sauyet scott.sau...@gmail.com wrote: On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote: Right now i've added a hidden div with the current url which i can read with jquery and reload it with $.load()... but i wonder if there is a more clever way :-) What Michel is suggesting is that you store this in the div when you do the load. To store and fetch the data, you can just use: http://docs.jquery.com/Core/data#name http://docs.jquery.com/Core/data#namevalue So simply try: $(#myDiv).load(myUrl, {my: data}, function (responseText) { // ... anything else you need here. $(this).data(url, myUrl); }); Then later: var url = $(#myDiv).data(url); And that's it! -- Scott
[jQuery] Re: How to detect a child window closing and then refresh current window.
Thanks Scott, I will check that out and report back. Thanks. On Nov 23, 10:37 am, Scott Sauyet scott.sau...@gmail.com wrote: On Nov 23, 11:32 am, RayJames cdlcollege.rayja...@gmail.com wrote: [ ... ] I need to refresh the window that launches the child window after the child window is closed. The main restriction is that I can not put any additional code or even touch the existing code of the child window. I don't know if there are any events that you can collect, but you can watch it in a timer. I don't know of anything in jQuery that would help you do this, but some simple JS should work: function onWindowClose(windowRef, id, callback) { setTimeout(function check() { if (windowRef == null || windowRef.closed) { callback(id); } else { setTimeout(check, 20); } }, 20); } Check outhttp://jsbin.com/usuco(code:http://jsbin.com/usuco/edit) to see it in action. Cheers, -- Scott
[jQuery] Re: Get URL from a DIV which was loaded with $.load();
Ok, this code is now working for me... function() { $('#sessions-' + id).load(url, function() { $(this).data('url', url); }); } otherfunction() { $('#sessions-' + id).load(url); } Thank you very much for your help guys :-) Tobias On Nov 23, 8:33 pm, tobias.br...@me.com tobias.br...@me.com wrote: Thanks for the reply... what i dont understand... for what do i need a callback function? Would this work ? $(#div).load(/data/sessions/15, { url: /data/sessions/15 }); and later var url = $(#div).data(url); Tobias On Nov 23, 8:06 pm, Scott Sauyet scott.sau...@gmail.com wrote: On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote: Right now i've added a hidden div with the current url which i can read with jquery and reload it with $.load()... but i wonder if there is a more clever way :-) What Michel is suggesting is that you store this in the div when you do the load. To store and fetch the data, you can just use: http://docs.jquery.com/Core/data#name http://docs.jquery.com/Core/data#namevalue So simply try: $(#myDiv).load(myUrl, {my: data}, function (responseText) { // ... anything else you need here. $(this).data(url, myUrl); }); Then later: var url = $(#myDiv).data(url); And that's it! -- Scott
Re: [jQuery] jquery help
Good, now I know your server architecture in details. Still you forgot to mention what problem you are facing, and how it relates to jQuery. As far as I can see using your reply you're using the right method, and I don't see any error or problem you should be facing here. Michel Belleville 2009/11/23 Bjorn Symister bjorn@gmail.com Thanks Michael for helping out. I have two servers. Server 1: Scripting Server – I have full control over this server and this is where all server side script goes. Server 2: Client Server – I cannot put any server side script (such as php) on this server. Only HTML, CSS, Javascript. I have to work under the above conditions. I have a form on (Server 2), that collects user data. I need to store that user data on (Server 1). My limitations are that I cannot refresh the entire page, only parts of the page. Ajax Limitations: Does not work cross domain unless: using php, local proxy, iFrame, JSON. My only option is to use JSON. So What I need is on: On (Server2) package the data in a JSON format, so that when (Server1) goes to the URL of (Server2), it will see the JSON data with the values I need. Take those values. I know how to read the values and have the code on (Server1). Its setting things up on (Server2) I have a problem with. Hope that clarifies things :) Bjorn On 11/23/09 1:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Using solely the content of your message I've deduced that : 1. you're facing a problem 2. you're using jQuery 3. something that is composed of two files containing stuff isn't doing whatever it's meant to be doing using functions and probably gizmos I've got the first and second point, though the third is not quite as clear. Maybe your code would help, plus a description of what it's meant to do ?... Michel Belleville 2009/11/19 shobhit chaturved...@gmail.com sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance
Re: [jQuery] Sorting spans which are in li elements.
I'd select the spans bearing the same class as the clicked element, pick their parent lis and put them back in order. To select elements bearing the s1 class in an the aptly named list : $('#list .s1') To pick an element's closest li : element.closest('li') To remove an element from its current location : element.remove() Removing the element returns the nodes all the same so you can append it somewhere else using : element.appendTo(somewhere()) I guess you know how to sort an array : array.sort() And jQuery being very similar to construction games, it's funnier when you do the assembling yourself once you've got all the parts and a plan. Michel Belleville 2009/11/21 javam.org alt...@gmail.com Hi there, My xhtml structure looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s1Name value 1/span span class=s2Time value 1/span span class=s3Status value 1/span /li li span class=s1Name value 1/span span class=s2Time value 2/span span class=s3Status value 3/span /li li span class=s1Name value 3/span span class=s2Time value 3/span span class=s3Status value 3/span /li /ul /div /div I am trying to sort span values for Name, Time and Status.. I can implement to just only one menu item by adding div =1, div =2 ... which covers li elments. But it cannot provide my needs. I have to implement it to all. When I click time menu element (let assume Time value 2 is greater than Time value 3 and Time value 3 is greater than Time value 1), all s2 spans should be at the top of the list... looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s2Name value 1/span span class=s3Time value 1/span span class=s1Status value 1/span /li li span class=s2Name value 1/span span class=s3Time value 2/span span class=s1Status value 3/span /li li span class=s2Name value 3/span span class=s3Time value 3/span span class=s1Status value 3/span /li /ul /div /div And should be available for other menu elements also... Could you show me the ways to do it? Best Regards.
[jQuery] Re: Sorting spans which are in li elements.
My initial reaction is that your information might be more suited to a table, in which case you could use the tablesorter plugin. http://tablesorter.com/docs/ On Nov 21, 5:58 pm, javam.org alt...@gmail.com wrote: Hi there, My xhtml structure looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s1Name value 1/span span class=s2Time value 1/span span class=s3Status value 1/span /li li span class=s1Name value 1/span span class=s2Time value 2/span span class=s3Status value 3/span /li li span class=s1Name value 3/span span class=s2Time value 3/span span class=s3Status value 3/span /li /ul /div /div I am trying to sort span values for Name, Time and Status.. I can implement to just only one menu item by adding div =1, div =2 ... which covers li elments. But it cannot provide my needs. I have to implement it to all. When I click time menu element (let assume Time value 2 is greater than Time value 3 and Time value 3 is greater than Time value 1), all s2 spans should be at the top of the list... looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s2Name value 1/span span class=s3Time value 1/span span class=s1Status value 1/span /li li span class=s2Name value 1/span span class=s3Time value 2/span span class=s1Status value 3/span /li li span class=s2Name value 3/span span class=s3Time value 3/span span class=s1Status value 3/span /li /ul /div /div And should be available for other menu elements also... Could you show me the ways to do it? Best Regards.
Re: [jQuery] Re: Sorting spans which are in li elements.
Indeed here's a typical example where a table would fit, and a definetly a table sorter plugin. Though I don't know how much latitude he has depending on the expected styling and wether he's allowed to change html code. Michel Belleville 2009/11/23 amuhlou amysch...@gmail.com My initial reaction is that your information might be more suited to a table, in which case you could use the tablesorter plugin. http://tablesorter.com/docs/ On Nov 21, 5:58 pm, javam.org alt...@gmail.com wrote: Hi there, My xhtml structure looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s1Name value 1/span span class=s2Time value 1/span span class=s3Status value 1/span /li li span class=s1Name value 1/span span class=s2Time value 2/span span class=s3Status value 3/span /li li span class=s1Name value 3/span span class=s2Time value 3/span span class=s3Status value 3/span /li /ul /div /div I am trying to sort span values for Name, Time and Status.. I can implement to just only one menu item by adding div =1, div =2 ... which covers li elments. But it cannot provide my needs. I have to implement it to all. When I click time menu element (let assume Time value 2 is greater than Time value 3 and Time value 3 is greater than Time value 1), all s2 spans should be at the top of the list... looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li span class=s2Name value 1/span span class=s3Time value 1/span span class=s1Status value 1/span /li li span class=s2Name value 1/span span class=s3Time value 2/span span class=s1Status value 3/span /li li span class=s2Name value 3/span span class=s3Time value 3/span span class=s1Status value 3/span /li /ul /div /div And should be available for other menu elements also... Could you show me the ways to do it? Best Regards.
[jQuery] Where to place my code on AJAX calls
I am jumping into ajax with Jquery and I have what I think is an easy question. I have successfully used jquery load to bring an external php doc into my page. That page has a form on it where I want to use jquery to reload that external page to reload with ajax when the form is submitted. What I need to know is where to put the code to act on the external form. Do I place the code on the page .load ing the external form or do I need to place it on the external form? I've tried it both ways and I can't get it to work. For testing I'm just doing something simple $(document).ready(function(){ $('#submit1').click(function(){ alert('It works!'); }); }); This code does work when it's located on the external form and I load that form explicitly rather than through an ajax call. What am I missing? I guess my question has a greater scope than just this example. Will javascript on a main page act on selectors that match those in a div that's loaded through ajax? The same question with CSS too.
Re: [jQuery] Where to place my code on AJAX calls
Welcome to the unobtrusive philosophy : http://simonwillison.net/static/2008/xtech/ This is somewhat big to take in one big gulp but I promise you will greatly benefit from reading this right now before you try to use jQuery and AJAX in a messier way and find it hard and not rewarding. Kind regards. Michel Belleville 2009/11/23 Rockinelle ericbles...@gmail.com I am jumping into ajax with Jquery and I have what I think is an easy question. I have successfully used jquery load to bring an external php doc into my page. That page has a form on it where I want to use jquery to reload that external page to reload with ajax when the form is submitted. What I need to know is where to put the code to act on the external form. Do I place the code on the page .load ing the external form or do I need to place it on the external form? I've tried it both ways and I can't get it to work. For testing I'm just doing something simple $(document).ready(function(){ $('#submit1').click(function(){ alert('It works!'); }); }); This code does work when it's located on the external form and I load that form explicitly rather than through an ajax call. What am I missing? I guess my question has a greater scope than just this example. Will javascript on a main page act on selectors that match those in a div that's loaded through ajax? The same question with CSS too.
[jQuery] Close popup (div) when clicked outside the div
Hi, I have a div which appears when a textbox gets focus. DIV has n number of textboxes. I want to say display:none when a user Clicks anywhere in the window. Div should not close if the user is switching between textboxes. All these jquery plugins, say the calendar control closes if user clicks outside. How is that happening? Any idea? I have checked http://blog.josh420.com/archives/2007/11/determine-if-any-other-outside-element-was-clicked-with-javascript.aspx but it doesnt quite help for me since I cant keep track of ids.
[jQuery] jQuery Ajax BlockUI Database
While searching around I have seen plenty of examples where people query a database and use BlockUI to put up a wait message. When the ajax completes, unblock and display the results. I'm trying to do something a little different. I would like to query a database and use the results as the message of the BlockUI 'window' - a custom popup. (I tried using BeautyTip and it kinda works but I'm having trouble positioning the tip. Also, the tip only pops up on the second try because I'm actually assigning the .bt after the ajax completion. Any clues there?) OK, that's off-topic. Is this just a retarded way of doing this? Basically I have an old school area map with rollover info coming from a db.
[jQuery] Selecting elements loaded from an AJAX call
I need some help with jQuery theory. Why can't I select an element that has been loaded through an AJAX call? For instance, I'll load table.php that renders like this: table tr td1/td tda id=fooFoo/a/td /tr /table I make the ajax call to it like this: $.post( table.php, { }, function(str) { $(tablebox).html(str); } ); But then, when I try to bind and event to one of the elements from the AJAX call, I get nothing: $('#foo').click(function() { alert('You clicked Foo'); }); I've tried binding the events from within the $.post callback, but still nothing. Can anyone explain why this is the case, and if there are any options I'm overlooking? Thanks!
[jQuery] How to implement prototypes PeriodicalExecuter in jQuery
Hello, I was using prototype for several years. Now I want to completly change to jQuery. One left problem is, that I need an equivalent to prototype's PeriodicalExecuter. How can I do the following with jQuery? # //click start button $myPeriodicalExecuter = new PeriodicalExecuter (myPeriodicalExecutedFunction, 3); //click stop button $myPeriodicalExecuter.stop(); function myPeriodicalExecutedFunction() { //do someting } # Thanks for your help Frank
Re: [jQuery] Close popup (div) when clicked outside the div
Hello. I think you could do something like $(.containerdiv:not(.divThatHoldsTheTextboxes)).click(function(){ $(.contaierDiv).css(display, none);}); this means that if the users clicks anywhere outside the div that holds the boxes the container div will be changed. I am not very pro in JQuery / js but i think that could do the trick. Rafine the things as needed --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 Odesk Profile: http://www.odesk.com/users/~~3a2d7f591313701b RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 LinkedIn Profile: http://ro.linkedin.com/in/alexandrudinulescu XHTML/CSS/jQuery Blog - http://alexdweb.com/blog MainWebsite: http://alexdweb.com On Mon, Nov 23, 2009 at 11:54 PM, Dexter varun.dex...@gmail.com wrote: Hi, I have a div which appears when a textbox gets focus. DIV has n number of textboxes. I want to say display:none when a user Clicks anywhere in the window. Div should not close if the user is switching between textboxes. All these jquery plugins, say the calendar control closes if user clicks outside. How is that happening? Any idea? I have checked http://blog.josh420.com/archives/2007/11/determine-if-any-other-outside-element-was-clicked-with-javascript.aspx but it doesnt quite help for me since I cant keep track of ids.
[jQuery] Re: jQuery Ajax BlockUI Database
I'm not sure why you would use BlockUI for this purpose... seems more like a tooltip plugin is needed that can handle HTML On Nov 23, 3:10 pm, Troy Sartain sartain.t...@gmail.com wrote: While searching around I have seen plenty of examples where people query a database and use BlockUI to put up a wait message. When the ajax completes, unblock and display the results. I'm trying to do something a little different. I would like to query a database and use the results as the message of the BlockUI 'window' - a custom popup. (I tried using BeautyTip and it kinda works but I'm having trouble positioning the tip. Also, the tip only pops up on the second try because I'm actually assigning the .bt after the ajax completion. Any clues there?) OK, that's off-topic. Is this just a retarded way of doing this? Basically I have an old school area map with rollover info coming from a db.
Re: [jQuery] jquery 1.3.2 syntax error line 324 in IE6
ah? It's CompanionJS error?WTF,I get for a long time for this reason. Thank you very much really. https://twitter.com/viperasi my fridge!:http://bit.ly/ohBHG 有事您说话 On Tue, Nov 24, 2009 at 2:30 AM, Karl Swedberg k...@englishrules.comwrote: that's odd! CompanionJS is saying there is a syntax error in what is clearly a comment. Looks like that is a CompanionJS error. On Nov 22, 2009, at 10:25 PM, viperasi wrote: Thank reply. the syntax error has be found jquery-1.3.2.min.js. check the attach pic. https://twitter.com/viperasi my fridge!:http://bit.ly/ohBHG 有事您说话 On Fri, Nov 20, 2009 at 4:42 AM, Karl Swedberg k...@englishrules.comwrote: nothing here looks like it would cause a syntax error. Maybe the problem is in your formLogin() function? --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 19, 2009, at 2:00 AM, viperasi wrote: Whether jquery-1.3.2.js or jquery-1.3.2.min.js,i always got the error.Other browsers without error. Below is the code: $(function(){ $('#username').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); $('#password').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); $('#valicode').keydown(function(event){ if(event.keyCode==13){ formLogin(); } }); }); Can anyway help me please? I think it's something really simple and I'm just being stupid. Many thanks for reading and sorry for my poor English. https://twitter.com/viperasi my fridge!:http://bit.ly/ohBHG 有事您说话 jquery_error_in_ie6.JPG
[jQuery] Re: Selecting elements loaded from an AJAX call
I'd suggest showing more code, as there is absolutely no reason why $.post( table.php, { }, function(str) { $(tablebox).html(str); $('#foo').click(function() { alert('You clicked Foo'); return false; }); } ); would not work On Nov 23, 5:00 pm, Keighl kmtrusc...@gmail.com wrote: I need some help with jQuery theory. Why can't I select an element that has been loaded through an AJAX call? For instance, I'll load table.php that renders like this: table tr td1/td tda id=fooFoo/a/td /tr /table I make the ajax call to it like this: $.post( table.php, { }, function(str) { $(tablebox).html(str); } ); But then, when I try to bind and event to one of the elements from the AJAX call, I get nothing: $('#foo').click(function() { alert('You clicked Foo'); }); I've tried binding the events from within the $.post callback, but still nothing. Can anyone explain why this is the case, and if there are any options I'm overlooking? Thanks!
[jQuery] problem with autocomplete plugin
Hi, I downloaded loopj's jQuery Plugin: Tokenizing Autocomplete Text Entry from http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-tex An excellent plugin that I had no problems modifying to my likings except for grabbing the value from the input text field. The setup instructions say to use settings.jsonContainer to grab the results but being new to json I am not sure how to go about this. Thanks, Carl
[jQuery] Reorder list numerically based on attribute?
I am wondering if it is possible to reorder a unordered list based on the list items 'rel' attribute? i have a list of items that change dynamically (its linked in with google maps, the 'rel' attribute of the list item is updated with the new distance from the google map marker icon when the marker is moved) and i want it to update the list ordering each time a 'rel' attribute changes. i had a good look about, but i cant find anything for numerical ordering (its all alphabetical) so im hoping somebody here could help? my list essientially looks like this: ul li rel=42.53Place One/li li rel=51.21Place Two/li li rel=98.32Place Three/li /ul i'd be greatful for any help!
[jQuery] slideToggle lag in Firefox
So I have a div with an input, textarea, and submit button. A link makes it so you can expand/contract this div. In Firefox only, the div resize is very laggy and its clearly shown on the site. That happens when you open it. The rest of the site is pushed down like its supposed to, but the elements being moved seem to duplicate, like FF is not rending things fast enough. The above image is the bottom of the site, appearing multiple times when it should once appear once. I read somewhere that Firebug causes things to be slower, and I do have Firebug installed, but I tested it on another computer without Firebug and the same thing happens. It works much smoother in any other browser.
Re: [jQuery] jquery help
I apologize for not being clear. I am not getting the information I need on (Server1) from (Server2). Would you be able to send me a codd snippet that will pass the information. One for the scripting server and the other for the client server. I am collecting email information. Thanks, Bjorn On 11/23/09 3:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Good, now I know your server architecture in details. Still you forgot to mention what problem you are facing, and how it relates to jQuery. As far as I can see using your reply you're using the right method, and I don't see any error or problem you should be facing here. Michel Belleville 2009/11/23 Bjorn Symister bjorn@gmail.com Thanks Michael for helping out. I have two servers. Server 1: Scripting Server I have full control over this server and this is where all server side script goes. Server 2: Client Server I cannot put any server side script (such as php) on this server. Only HTML, CSS, Javascript. I have to work under the above conditions. I have a form on (Server 2), that collects user data. I need to store that user data on (Server 1). My limitations are that I cannot refresh the entire page, only parts of the page. Ajax Limitations: Does not work cross domain unless: using php, local proxy, iFrame, JSON. My only option is to use JSON. So What I need is on: On (Server2) package the data in a JSON format, so that when (Server1) goes to the URL of (Server2), it will see the JSON data with the values I need. Take those values. I know how to read the values and have the code on (Server1). Its setting things up on (Server2) I have a problem with. Hope that clarifies things :) Bjorn On 11/23/09 1:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Using solely the content of your message I've deduced that : 1. you're facing a problem 2. you're using jQuery 3. something that is composed of two files containing stuff isn't doing whatever it's meant to be doing using functions and probably gizmos I've got the first and second point, though the third is not quite as clear. Maybe your code would help, plus a description of what it's meant to do ?... Michel Belleville 2009/11/19 shobhit chaturved...@gmail.com sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance
RE: [jQuery] slideToggle lag in Firefox
I have the same problem. Firefox eats up a lot of memory when open for a long time (900k sometimes) and my toggle divs drag ass. If I find a solution I would be happy to hear. Thanks, Dave -Original Message- From: Jason Kaczmarsky [mailto:jkaczmar...@yahoo.com] Sent: November-23-09 10:06 PM To: jQuery (English) Subject: [jQuery] slideToggle lag in Firefox So I have a div with an input, textarea, and submit button. A link makes it so you can expand/contract this div. In Firefox only, the div resize is very laggy and its clearly shown on the site. That happens when you open it. The rest of the site is pushed down like its supposed to, but the elements being moved seem to duplicate, like FF is not rending things fast enough. The above image is the bottom of the site, appearing multiple times when it should once appear once. I read somewhere that Firebug causes things to be slower, and I do have Firebug installed, but I tested it on another computer without Firebug and the same thing happens. It works much smoother in any other browser. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.709 / Virus Database: 270.14.76/2519 - Release Date: 11/23/09 04:22:00
Re: [jQuery] Reorder list numerically based on attribute?
Something like this might work... var items = $('li').get(); items.sort(function(a, b) { var relA = +$(a).attr('rel'); var relB = +$(b).attr('rel'); if (relA relB) { return 1; } if (relA relB) { return -1; } return 0; }); for (var i=0; i items.length; i++) { $('.list').append(items[i]); } --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 23, 2009, at 8:21 PM, welshy1984 wrote: I am wondering if it is possible to reorder a unordered list based on the list items 'rel' attribute? i have a list of items that change dynamically (its linked in with google maps, the 'rel' attribute of the list item is updated with the new distance from the google map marker icon when the marker is moved) and i want it to update the list ordering each time a 'rel' attribute changes. i had a good look about, but i cant find anything for numerical ordering (its all alphabetical) so im hoping somebody here could help? my list essientially looks like this: ul li rel=42.53Place One/li li rel=51.21Place Two/li li rel=98.32Place Three/li /ul i'd be greatful for any help!
[jQuery] Dynamically Changing the Stored Height of a Parent Div Based on a Child's Content
I have a comment form that is fed by Disqus. It is in a div that is scrolled with ui.slider. The problem is, I determine the maxScroll by calculating teh difference between the scrolling content and the viewport. Work great all across the site except here. Reason is, the var fot the div's heigh is set when the page loads. Then the Disqus content loads, and the height var doesn't know that the dom is not full of content. SO how can I update the height of a parent div when ever a child's height changes. Any ideas?
[jQuery] Re: list bullet style
Not quite what I'm after... Wanted to use the LI's native numbering and be able to bold just that, not the content inside the LI. Right now I have spans inside the LI with hard coded numbering to get the bold effect. I'm just trying to accommodate a client. Putting the spans around the inner content seems like 6 of one to me... Thx, D.
Re: [jQuery] jquery help
Right. Don't take it the wrong way but here's how it works on a mailing list where people help you for free, you don't ask people to do your job for you. Instead, what you could be doing is, try to do things, encounter problems, ask about the specific problems you're encountering, and usually get an answer which helps you go further by yourself. This being said, and even if I was volunteering to write a script for you, I still lack a lot of data here. So here's what you can do right now : - try using http://docs.jquery.com/Ajax/jQuery.getJSON and see if it works for you (it allows to do XSS as far as I'm aware) - when it fails and you've got a specific question to ask, come back and ask it Regards. Michel Belleville 2009/11/24 Bjorn Symister bjorn@gmail.com I apologize for not being clear. I am not getting the information I need on (Server1) from (Server2). Would you be able to send me a codd snippet that will pass the information. One for the scripting server and the other for the client server. I am collecting email information. Thanks, Bjorn On 11/23/09 3:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Good, now I know your server architecture in details. Still you forgot to mention what problem you are facing, and how it relates to jQuery. As far as I can see using your reply you're using the right method, and I don't see any error or problem you should be facing here. Michel Belleville 2009/11/23 Bjorn Symister bjorn@gmail.com Thanks Michael for helping out. I have two servers. Server 1: Scripting Server – I have full control over this server and this is where all server side script goes. Server 2: Client Server – I cannot put any server side script (such as php) on this server. Only HTML, CSS, Javascript. I have to work under the above conditions. I have a form on (Server 2), that collects user data. I need to store that user data on (Server 1). My limitations are that I cannot refresh the entire page, only parts of the page. Ajax Limitations: Does not work cross domain unless: using php, local proxy, iFrame, JSON. My only option is to use JSON. So What I need is on: On (Server2) package the data in a JSON format, so that when (Server1) goes to the URL of (Server2), it will see the JSON data with the values I need. Take those values. I know how to read the values and have the code on (Server1). Its setting things up on (Server2) I have a problem with. Hope that clarifies things :) Bjorn On 11/23/09 1:04 PM, Michel Belleville michel.bellevi...@gmail.com wrote: Using solely the content of your message I've deduced that : 1. you're facing a problem 2. you're using jQuery 3. something that is composed of two files containing stuff isn't doing whatever it's meant to be doing using functions and probably gizmos I've got the first and second point, though the third is not quite as clear. Maybe your code would help, plus a description of what it's meant to do ?... Michel Belleville 2009/11/19 shobhit chaturved...@gmail.com sir i am facing problem while using jquery: i have two different .js file both r include in one page and having same type of function like function() so they r not working at same time... plz help me out of this problem .. thanx in advance