[solved] calling the same dialog fn twice
Hi, I have 2 buttons which when I click open a dialog box in jquery. heres what I did, <html> <head> <title></title> <link type="text/css" href="css/mint-choc/jquery-ui-1.7.1.custom.css" rel="stylesheet"/> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script> <script type="text/javascript"> $(function() { $("#datepicker").datepicker(); $("#b1").click(function(){
[jQuery] Select images instead of text
Hello everyone, I've been desperately googling for a jQuery plugin that would make me able to display thumbnails that can be selectable, like does the html <select> tag (it will send photo information to a PHP script, so that I can delete the photos). That would provide a nice, visual selection of pictures, instead of its titles inside an old school style <select>. I have no idea how could I do it... Does anyone knows any script I could take inspiration of?
[jQuery] Array function
Gday, Is there a short way to do: $("#idOne").show(); $("#idTwo").show(); ? So far, my best bet is to do: $.each(["#idOne","#idTwo"],function(){ $(""+this).show(); }); Thanks in advance! -- Best regards, WiB
[jQuery] Multiple Plugins on the same page
I have searched this extensively, so if it has been covered, please forgive me. Let's see if I can describe this without confusing anyone. We have a recurring need to give users quick lookup access to several tables of information. Therefore we use a custom build autocompleter/selector system. Here is how it's laid out. We have a jQ plugin for each different selector... and each of those $.extend()'s DataSelector, which holds the meat of the entire process. Each plugin sets up the methods/vars which
[jQuery] jCarousel as Marqee Test
Hello together, I wanna use jCarousel as you can see it here http://www.dslproviderwechsel.de in the header (the scrolling company logos). Do you know the parameters for jCarousel to display the plugin as in the example. Currently I have the following problems: - the autoscroll function does not scroll smooth, it stops after every list item - can I scroll the list elements without end? Here are my current parameters: scroll: 1, auto: 1, animation: 9000, buttonNextHTML:
[jQuery] jQuery plugins and Scriptaculous
Hello, Yes, this is another jQuery and Prototype incompatibility problem. I am trying to use a jQuery plugin, Date Picker (http://www.eyecon.ro/ datepicker/), on a page that also has to use Scriptaculous. I *have* to use Prototype: it's a Rails (v1.1.6) application we use at work and I can't switch from Prototype to jQuery. I have used the noConflict() method, and it seems to work for jQuery, but not for the plugin. Here is the code of a page I wrote for testing: --------------------------------------------------------------------
[jQuery] [validation] how to validate two dependent input boxes.
Sorry if this is a double post. I can't see my previous post in the discussion. For example if you have a price range minimum and maximum. It must be checked that min. is less than max and the other way round. Is this possible?
Passing Two Values Through One Single Function - Jquery/ajax
Hi everyone, Here is my code: <script type="text/javascript"> function nextpage(str) { $('#content1').html('Loading data, please wait...').load("nextpage.php?q="+str+"&r="+str); } </script> <a href="java script:nextpage('1&2')">Next</a> The one should be the value of q and the 2 the value of r... I can't get it. I can get the q variable to pass no problem and can echo it via php, but nada with the r. I am pretty weak with javascript so any advice would help. I thought the ampersand would separate
[jQuery] [validation] how to validate two dependent input boxes.
For example if you have a price range minimum and maximum. It must be checked that min. is less than max and the other way round. Is this possible?
[jQuery] Modify selection in dynamically generated menu
In my first jQuery project, I'm trying to setup a form that has certain pieces dynamically generated based on menu selections. I have a button that loads json via Ajax and adjusts select values of the items in my form. Each of the selects in the form also has a related menu dynamically loaded via Ajax either when the select above it is changed or when the value is changed via the earlier button. I am trying to set the select values on the related menu based on the json from the button, and it's not
[jQuery] treeview , default collapsable
Hi , I want to have the tree as default collapsed , what can be the way? Thanks yogesh
[jQuery] listening for any dom change
Hi, I'm trying to bind a function to the body element of a document that will fire any time any part of the page's DOM changes. $("body").change() doesn't seem to do it. It does for some changes but not all. In particular, not when HTML or element attributes are added/ removed. Sorta key! It does trigger when a jEditable element is "saved". What I'm trying to accomplish, in case some one can suggest another way: I'm making something sort of like iGoogle. When some one adds or edits a widget, I want
[jQuery] ClueTip Width Question
Hi, I have clueTip working really nicely (for the most part) but just have two issues, well, one issue and one question. First of all thanks for all the work on this plugin its great. First question is about the width. Is there any way to have it resize based on the content? I'm just using it for simple tooltips displaying 2 lines of text (a title and a date), should I perhaps be using a different solution or do they all suffer from not being able to dynamically change width based on content? Second
[jQuery] long polling and XMLHttpRequest.responseText size
Hello, I have a HTTP server that answers a CGI request with a never endind ascii stream of data. I would like to make a async ajax call to that CGI and process the data as it arrives without having to wait endlessly for the end of the reply. So far I have got this: $(function(){ var a = $.ajax({ url: "data.cgi", success: function(data){ alert( "Data stream never ends, This is an error"); } }); a.onreadystatechange = function() { if (a.readyState == 3 /*state == LOADING*/)
[jQuery] Combining Selectors
I am confused why the following is returning undefined: alert($(this + " input[type='submit']").attr('id')); This is within the context of a plugin that I built. Removing the this makes it correctly find the input, why I want to narrow the scope.
[jQuery] Superfish Question
Hi, Here's my Superfish menu: ******************** [code] <ul class="sf-menu"> <li> <a href="/cave" class="sf-menu-tab-img"><img src="/images/ tab_cave.gif" onmouseover="this.src='/images/tab_cave_hover.gif'" onmouseout="this.src='/images/tab_cave.gif'" alt="The Cave" title="The Cave"></a> </li> <li> <a href="/archives" class="sf-menu-tab-img"><img src="/images/ tab_archives.gif"
[jQuery] code review for short snippet
I'm not new to web development or javascript, but am relatively new to jQuery. I'm wondering if someone would be willing to quickly review the following code for efficiency and best practices. The function works as required, but I'd like to take this as a learning opportunity. In a nutshell the code initially hides two divs onload and then the function shows/hides the state/province divs depending on the value of the country dropdown. I want to keep the code readable, but I know it could be tighten
[jQuery] NEWBIE - IE7 vs FireFox, Safari, etc...
Hi all I'm just getting started with jQuery, and trying to use the slideToggle () function. I have this working on a test page of my site. On Firefox 3.0x, Safari, etc. this works great, looks great. On IE7 (and older), the function works but with a major difference in how the text is laid out in when revealed. As the text initially renders, it momentarily looks exactly like how it should, and matches that of FF and other browsers, the entire body is properly indented. However, after a very brief
Changing Background Color in Table Cell
I want to be able to change the background color in a table cell based on the text in that cell. An example is if I have a column called "Status" where the text will be either "Active" or "Inactive". I would like to set the cell's background color based on whether the cell text is "Active" or "Inactive". Any assistance will be greatly appreciated. Thank you in advance. Ray
[jQuery] Is there a way to use this function without clicking the link twice?
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
Cross domain JSON request - ignoring invalid first few chars
Hello everyone. I appreciate this is a bit of a weird question but here goes. I'm using JQuery to make AJAX calls to JSON data files on another domain than mine, which I gather you can do with dataType: "jsonp". However my problem is that the JSON source is preceded with for (;;); which means it doesn't validate as valid JSON. Past that point, it's all valid. Therefore, when I try to call it with JQuery Firebug reports an "invalid label" error which I'm sure is caused by this. So is there any way
[jQuery] [autocomplete] showing a 'no results' message
Hi, In case there is no matched result when using the autocomplete plugin, is there a way to show a 'no results' message to the user in the results div, one that wouldn't be selectable and possibly in a different style? I've read the documentation and searched the forum for this issue but couldn't find an answer. Thanks, Ido
[jQuery] Cannot call a function within the callback part of $.get in IE7
Hi, I make Ajax ($.get) calls and in the calback part I call a function defined elsewhere. In FireFox this is no problem. When I checked in IE however I kept getting an error 'object expected'. It took a while to figure out that if I remove the _call_ to the function with the actual function body (the code defined in the function handler) the problem disappeared and IE does not complain.. So instead of this: $(document).ready(function(){ $('#login').click(function(){ $.get( "/?event=cms.showlogin",
[jQuery] Dynamically changing the source of SWF call
I'm looking to try and change the source of a Flash movie using jQuery. I'm working on doing it myself, but to be honest, I'm not sur eI'll be able to figure it out, so I'm going to ask you guys. Say mc_01.swf is the initial SWF that's loaded. I want to be able to click a button/text link labeled "two" and have mc_02.swf load in place of mc_01.swf. I want to be able to do this for other buttons as well. I think it should be possible, but I'm just not sure how to proceed. <!----------------//------
[jQuery] sendmail with attachment using jquery ajax
Hello to everybody, following the instruction here http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ i was able to send form contents through ajax. But how can you make this possible if there are attached files (input type="file") to the form? Bye! Alex -- View this message in context: http://www.nabble.com/sendmail-with-attachment-using-jquery-ajax-tp22894868s27240p22894868.html
[jQuery] Common Problem :: Access Restricted for URI
hi , well i have searched a lot for this , perhaps i am just unlucky enough not to hit the bulls eye , so i ask again in this forum ... Well i am using jquery for calling a remote function . I am also using the CODEIGNITER MVC . i write something like this : $.post("index.php/login/ajaxlogin" , {email : username , pass : password } , function(data) { // CODE HERE } Now lets say my url is : www.XYZ.com/index.php/welcome if i directly type thus URL in the adress bar and press enter
[jQuery] tabs effect in teh new UI??
Hello there! I am trying to add an effect to the tabs from jquery UI. Like in the 'old' version: http://stilbuero.de/jquery/tabs/ In the <head> section I have: <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery- ui-1.7.1.custom.min.js"></script> In a scrips.js I have: // Tabs $('#tabs').tabs({ fx: { opacity: 'toggle' } }); How do I add an effect like 'blind' to my tabs? Thanks in advance, kind regards, Arnold
[jQuery] [treeview]
hey all, having a problem with treeview by Jörn Zaefferer. I load the content from json, but i lose persistance of location. i get the tree folded and i don't know what branch i'm on to. i managed to fix this by pasting the location code in .async.js, var sm = current.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); }); if ( sm.length ) { sm.addClass("selected").parents("ul, li").add( sm.next() ).show ();
Passing an php variable to the jquery call
Hi, I´ve programmed a form and in an external js I bind a click-event to all checkboxes in the form. Now I need to pass an php variable to the click-event. Can I do this?
[jQuery] Can't select elements added to document using html()
Hi all, I'm new to jquery, so bear with me. I have discovered that elements that were written to the document using the html() manipulation function can not be selected later on. Specifically, I have added some <a> elements to the page using html(). The elements look like this: <a class="delete" id="3" href="#">delete</a> In my javascript doucument, I have a click function to do something when these elements are clicked, like this: $(".delete").click(function(){ do stuff... }); This does not
[jQuery] Get text of external HTML and encode
Hello, I'm trying to load an external HTML file and encode the < with <. I've tried a number of different approaches but I haven't found the proper method yet. Here are a few examples of how I've approached this.. $("#thisDiv").load("../sample.html"); $("#thisDiv").text("<").replaceWith("<"); __ $("#thisDiv").load("../sample.html").text(); $("#thisDiv").text().html(); __ $("#thisDiv").load("../sample.html").text(); $("#thisDiv").text().replace(/</g,'<'); Any suggestions or ideas?
[jQuery] Superfish not attaching pathClass to navigation items
Hi, I'm using Superfish 1.4.8 on my site (http://users.tpg.com.au/j_birch/ plugins/superfish/) and have created my navigation in the basic vertical dropdown style with the addition of SuperSubs to handle the widths of the sub-menu items. All is working great except for one thing. A number of the menu items have 2 or more levels of sub-menus within them so I thought I'd add the initialisation statement pathClass: 'current' so that I could style those menu items above the currently selected one to
[jQuery] Superfish 1.4.8
Is it possible to keep the second level on the nav-bar visible when one of the listitems has the 'current' class associated with it.
[jQuery] Superfish Levels
How to ensure that in the navbar style menu the second level ul remains visible to show the second level selected item. This item and its parent are in the current path.
[jQuery] scrollTop remembers it's own history?
I can't find the example I just posted, and this is stripped down quite a bit. I just want to record the scroll bar position before a click to a feature and go back when finished with that feature. This works, except that it builds a history of where the scrollTop positions were when the feature was clicked to. If I click to the feature 10 times, I get 10 alerts with the history of each scrollTop position. What's going on there? $(".button").click(function () { function remPos(){ getPos
[jQuery] [validate] assigning numeric values in dynamic forms
I'm not even sure if that title is correct, but I was looking at this demo for dynamic totals: http://jquery.bassistance.de/validate/demo/dynamic-totals.html and was wondering if there was some way to assign specific values to certain menu items. For example, if I chose Learning jQuery as an item, a value of 10 would appear next to it. Also, would there be some way to instead make a menu item a multiplier, as in, if I added an item and chose jQuery in Action, it would multiple whatever value was
[jQuery] location after redirect
Hello everybody. Hope you can help me with this problems. I am doing an ajax request as follows: $.ajax({'type':'post','url':url, 'complete':function(xhr,text){ .... } }); now $.ajax follows the redirect to the page I eventually get in text is not necessarily the original url. I cannot determine it from xhr.getReponseHeader(...). Is there a way to determine the url of the page I get? Thank you jQuery. It is great! Massimo
[jQuery] appending an option to select list (dropdown), making it the selected one
With the following code, I'm managing to append to a drop-down list using jQuery, but can't figure out how to amend one of the existing items in the drop down so it is not the selected one i.e. I only want the one that's appended to be the selected one. Can anyone help? Here is the simplified code. $(".actionOptAdd").bind("click", function() { . . . $.getJSON('lib/addToProj.php', {....}, function(data) }, function(data) { $.each(data, function(i,item) { if ( i == "project" )project=item;
Cloning issue
Hi I need to create a tabel with data represented from another area on my page. What i have is two ul which represents the data structure. I want to clone the data and reinsert thÃs into a table when the user click a button. I cannot know how many ul my customer will insert. So here is a sample of my data structure <div class="relatedProductGroups"> <ul> <li class="groupName"><a class="expand" href="">Groupname a</a> <ul> <li> <a href="">Product1</a> </li> <li>
The code is showing up
I am so new to Jquery, I never heard of it until the day before yesterday, and I have very little experience with javascript. I needed a time picker and finally found one my users and I should do well with. It is at: http://pttimeselect.sourceforge.net/example/index.html Before I start to use it, I need to isolate exactly what I need to make it work in my webpages. And by trial and error I have stripped everyhing I can. But some of the code is visible on the page and I cannot figure out how to prevent
Next Page