Basic javascript stuff using JQuery
Hi all, I've got this idea in which Jquery can play a central role. I'm not too bright with javascript so I was wondering if someone could help me out with the following; I'd like to have a form with a textfield in it. In this field I can enter a number and on .change of this field I'd like to have an amount of input fields equal to the amount entered in the textfield generated in the form just below the initial input field. How would I go about doing that? I guess putting the textfield val in a
[jQuery] Replacing an inline onkeypress
I'd like to make use of this function: http://jennifermadden.com/javascript/stringEnterKeyDetector.html to prevent the enter key from submitting forms (we'll be using barcode scanners to enter data into a form, and we don't want forms submitted prematurely). That script as it is requires the addition of an onkeypress attribute for specific form fields. I'd like to do something like this: $("#myform input").keypress( function() { return checkEnter(event); } ); ...but I don't know "event" gets properly
[jQuery] Add Class based on page name???
Is it possible to add a class to links based on what page you are on? Or have a onClick class hold through the page load?
[jQuery] ToolTip Bassistance. Not working as expected ...
Hello, Please check my form: http://www.27lamps.com/Beta/FileStyleValidate/FileStyleValidate.html Why does the ToolTip over the Title input shows on the bottom? And why the ToolTip for the input of type file does not even show? How can I solve this- Thanks, Miguel
[jQuery] Toggle Event Not Working in Safari
In Safari, the toggle event is skipping a function. Here's an example of what it's doing: [code] $("a").toggle( function () { $(this).css({"list-style-type":"disc", "color":"green"}); }, function () { $(this).css({"list-style-type":"disc", "color":"red"}); }, function () { $(this).css({"list-style-type":"", "color":"black"}); } ); [/code] In this example, when I click on a link the first time, its color changes to red. When I click a 2nd time, it goes to green. The third click changes
[jQuery] jquery cycle - advanced uses
I'm using the jquery cycle plugin - it's fantastic, but I'm coming up just short of how I want it to function. The goal is to have a cycle that runs along with a pager. The pager is custom and works on hover. Additionally, I want the cycle to pause while you're hovering on a pager item, and resume once you've left. This code appears to work correctly, but it occasionally says paused or if you mouseover a second pager while the first is fading in it stays paused on the first. I'm a new convert to
[jQuery] Superfish
hi, I have a question referring to superfish. My horizontal dropdown menu looks like. - red background and white font. - hover: white background and red font. Added the Color in the following section: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #FFF; outline: 0; color: #D1001A; } Works fine till now :-) - if I move over a menu and then move to a submenu the submneu changes to white backgr. and red font BUT in the first menu the font
[jQuery] Sliding Effect Problem
Hi I have written some code that slides items within 2 divs, at the same time First on the left is an image that slides to the next and on the right is text. All works good except the element <div> that contains the text wont slide any contents except pure text. It wont slide any <h1></h1> <h2></ h2> or any other tag i put inside it it just makes them vanish, though any plain text inside the div will slide just fine... any ideas? Here is an example of the <div> elements i want to slide...they slide
[jQuery] Determining visible elements in an overflowed div
Is there any way to use jQuery to determine which elements/items are visible within a div that is overflowing? ie. let's say I have a bunch of elements contained within a <div>, where the elements are overflowing the <div>. I want to use localScroll to scroll vertically to a given element, but I'd like to know what other elements are visible within the <div> once this scroll completes. Is there any way to accomplish this? -- View this message in context: http://www.nabble.com/Determining-visible-elements-in-an-overflowed-div-tp19425508s27240p19425508.html
[jQuery] uiTabs - Reference to self during Init.
I have the following uiTabs initialization code in my $ (document).ready function: var $tabs = $("#tabarea > ul").tabs( { selected: 0 , disabled:[2] , spinner:'' , cache:true , ajaxOptions: { cache: false } , load: function(e,ui) { handleTabLoad(ui.index,this); // this doesn't = $tabs? } , select: function(e,ui) { handleTabSelect(ui.index); } , show: function(e,ui) { handleTabShow(ui.index);
[jQuery] Conceptual problem. Is posible with Jquery??
Hi everybody! I have a conceptual problem and I'm not sure if it's possible to resolve with jQuery (or Javascript). In resume, I have an application with a few floats divs and I would like to select more than one with dragging a box with the mouse, like a common file-explorer. Everyone knows a plugin that works on this way or something similar? I greatly appreciate any help. Greetins!!!
[jQuery] problem in datePicker in IE6
I am using datePicker and on the basic of selected start and end date i get data from databse.The problem i am facing is,if i dont click on any of two date field and click the subsit button it closes my browser by giving this widnow error in popup "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.".If i just click on any of the two date fields then it words well.Only IE6 gives this error.Other browsers r working perfectly well. code is <input name="date1"
How to do an AJAX request from generated HTML
Hi everyone, I have a form: <div id="toupdate"> <form id="ticketform" action="index.php" method="post"> <p><input type="text" name="first_name" id="first_name" class="forminput" /> Voornaam </p> <p><input type="text" name="last_name" id="last_name" class="forminput" /> Achternaam </p> <p><input type="text" name="email" id="email" class="forminput" /> E-mail </p> <p><input type="text" name="telephone" id="telephone" class="forminput" /> Telefoon</p> <p><textarea
[jQuery] jQuery Display:Block - None IE 7 Problem
<div dir="ltr"><div>Hi,</div> <div> </div> <div>We are using jQuery <a href="http://1.2.6.">1.2.6.</a> in a page which have a div will be visible or invisible.</div> <div> </div> <div>Our problem is that, when we click "Uye Ol" button on page the div sets css display block or none but if mouse going out of the button input items in the div floating left.</div> <div> </div> <div>You can visit the page : <a href="http://mk.manatest.com/">http://mk.manatest.com</a></div> <div> </div> <div>Anyone help
[jQuery] bind event data is mysterious
OK, I hope the answer to this is 'do it this way or that way noob!' I make this statement while in a loop: $( ("#audioin"+i) ).bind("change", { roomnum: roomindex, itemid:i, member:'audioin' }, updateItem); // roomindex, i, and audioin are known-good vars with values. my function: function updateItem(e){ var membername = e.data.member; var roomnumber = e.data.roomnum; var itemnumber = e.data.itemid; if(this.type == "checkbox"){ //project is a known-good global object Im using project.rooms[roomnumber
[jQuery] post data response problem
I am getting a data response from post in the form of variable1 | variable2 I am having trouble splitting this and applying the results to where its needed. $.post($(this).attr("href")),{}, function(data) { update = data.split('|'); $(update[0]).replaceWith(update[1]); }; return false; Thanks
[jQuery] Dependant Dynamic Dropdowns
Howdy all, I've fiddled around a little with jQuery and I can see it's extremely powerful. However my experience and knowledge toward jQuery is (very) limited. I'm working with Drupal which has jQuery integrated into it, and basically I need to create a 2 level dependant dropdown list. That is, when the first dropdown is altered, the contents of the second dropdown change to reflect relevant information to the first. If anyone could throw me some example code, that would be phenominal! Thanks in
[jQuery] superfish menu, Error: $("ul.sf-menu") is null
I'm using the superfish menu with a navigation module in dotnetnuke that emits the page structure as an unordered list. Most pages work fine with the menu system and superfish. However, some pages give me the following error: Error: $("ul.sf-menu") is null, source file:http://blahblahblah.com/default.aspx line: 4 The menu still works using the CSS, but the superfish features fail at that point. Any ideas on what is wrong and how to fix? Thanks.
[jQuery] Validate Problem. Online Example. Please, help me out ...
Hello, Please, check my online example: http://www.27lamps.com/Beta/FileStyleValidate/FileStyleValidate.html I am using FileStyle (http://www.appelsiini.net/projects/filestyle) to style the input of type file.. Both form inputs are required. If you submit the form you will see the Title required message but not the File required message. If you inspect the element with Firebug you will see that the File required message was added to the markup. I think I need to change the place where it is added
[jQuery] Working on website trying to make a list.
I am working on a website and I am trying to create a table. I plan to use php to generate the table with data from the mysql database to fill up the table however I want to set a max on that amount and if it goes over I want to generate other pages or create on the fly links to load to take the data that is in the table and load in the other data. I can't fully explain it. SO examples would be like ebay or any board form if you notice like on ebay if you searched cars and you get all the listings
[jQuery] $.getJSON does not call call back function
Hi, I am trying to call a cross domain web service using the following code. The return data is in XML format. It appears that the call back function isn't get called. I can not add ?callback=? to the then of the url. Any thought? Thanks. $.getJSON("http://www.webservicex.net/WeatherForecast.asmx/ GetWeatherByZipCode", {zipcode:"21234"}, function(data){ var idx = 0; $(data).find('WeatherData').each(function(){ WeatherData[idx] = $(this).find('MaxTemperatureF').text(); WeatherPicture[idx] = $(this).find('WeatherImage').text();
[jQuery] UI Drag and drop, dragging issue.
Has anyone else experienced an issue with dragging and dropping items from a table to a div? I have a group of items in a table and can drag them to a div for a drop, but along the way I lose the visible clone, when leaving the table area. I can still make the drop, though. It appears that the application fails because the clone disappears and I need the clone to remain.
[jQuery] Slider menu like http://ui.jquery.com/demos
Hi there, Do you know any Jquery plugin or source code like: http://ui.jquery.com/demos . I like this menu style but I am new at JQuery. I want to build new one but I stuck some places so need to see some source codes. If you know any, please inform me. Thank you...
[jQuery] [validate] metadata bug
If this is in a form: <input class="required" type="text"/> and the form is validated with: jQuery("#demo_form").validate({meta:"validate"}); // inside $.ready Then I get this : meta is undefined file:///C:/Development/Assets/test/datetime/jquery.validate.js Line 507 Which is caused by this: return meta.messages && meta.messages[method]; I think this is a new function in the 1.4 script but I think it should check for !meta before calling 'meta.messages' : if(!meta){ return; } This fixes the bug Mike
[jQuery] blockUI + negative text-indent FF2 Mac
Just wanted to share something that I discovered today while troubleshooting a weird issue on FF2/Mac. I created a modal pop-up window using blockUI which has product details, including 2 buttons. Got it all styled up and looking good and then when testing on FF2 Mac, I discovered the content of the modal window was not showing and the box itself extended to the left of the screen. After a solid 45 minutes of hunting down the cause, I discovered it was because I had negative text-indent on my buttons
[jQuery] Create an XML jQuery object from string
How do i create an jQuery XML object from string? i tried $(theXMLString) and jQuery constructs it using probably the HTML template and i'm unable to traverse the tree properly in this mode. is there anyway to specify the string as XML instead of the default HTML? thanks :)
[jQuery] Slide toggle Function multiple times on a page! (for different elements)
Please take a look why this only works in FF <style type="text/css"> <!-- .itemAcceseor { width: 600px; border: 1px dashed #333333; background-color: #00FF00; margin: 20px; } .a, .b { display:none; } -> </style> <script language="JavaScript" src="file:///Macintosh HD/Users/ebraun/ Desktop/jquery-1.2.6.min.js" type="text/javascript"></script> <script> $(document).ready(function(){ $('.showMore').bind("click",function() { $("."+this.id ).slideToggle(500); }); });
Reverse jDrawer jquery plugin
I came across this plugin with an example here and wanted to know is this best plugin to achieve a result such as on this page for the navigation?
[jQuery] Cancel .toggle() when a link is clicked
How do you stop .toggle() from toggling an object when a link (or any object) inside the object is clicked. Here's a quick contrived example: <div id="toggle"> Click here for more info <a onClick="DoSomething();">do something</a> </div> <div id="info">blah blah blah...</div> <script> $("#toggle").toggle( function () { $("#info").show(); }, function () { $("#info").hide(); } ); </script> Clicking on the "toggle" <div> toggles the "info" <div>. If the "do something" link is clicked, the "toggle" <div>
[jQuery] Leveraging a Select tag to drive Cycle Plugin Slideshow
Has anyone used a Select tag to act as the paging mechanism for a Cycle slideshow? In reference to: http://www.malsup.com/jquery/cycle/pager.html Basically I want control over the pager's tab names (they seem to default to 1, 2, 3 etc.). Thanks in advance! p.s. if you have a better idea, here's what I am trying to do. In my shopping cart, I want the user to be able to pick the text of a label and have a corresponding image appear next to the selection to show them what they're selecting looks like.
[jQuery] New jQuery Website...
<div dir="ltr">I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o)<div> </div><div>Chris<br clear="all"> -- <a href="http://cjordan.us">http://cjordan.us</a> </div></div>
[jQuery] ADO.NET and JQuery
Does anyone know how and what is the best way to interact with ASP.NET, ADO.NET, and JQuery? I have an ASP.NET GridView and when a link is clicked int he gridview, more detail is to be shown in a modal popup. I want to pass an id to a JQuery Popup and show relevant information. Has anyone done this before? Thanks, Xaisoft
[jQuery] Adding a new row
Hi I need a help I have a table in which some 100 rows are there, each row contain a button, when i click button i want to add a new row below this row only how can i do this ? can any one help me Thanks
[jQuery] [validate] Translation of the message-object with the SetDefaults function? How?
Hi! I want to translate the messages of the validation plugin without touching the org. files. I tried to overwrite the message object like this: <code> $.validator.setDefaults({ messages: { required: "Dies ist ein Pflichtfeld!", remote: "Bitte ändere die Eingabe.", } }); </code> How do I overwrite the message object? Thanx for your help
[jQuery] [validate] jQuery can't access children in the returned data
Can't anyone help me figure it out why this is happening? $(".ajaxForm").validate({ submitHandler: function(form) { $(form).ajaxSubmit({ dataType: 'html', success: function(responseText){ console.log( $(responseText) ); //returns 'Object length=61' console.log( $('body',responseText) ); //returns 'Object length=0' console.log( $(responseText)[59] ); //returns '<div class="content">' whose parent is <body>
[jQuery] [validate]
Hello All! First off, the jQuery Validator plugin is great! All the functionality you could want in a form validation module. But, I have a small problem with select boxes and the 'required' attributes. I have this <select> form: <label for='eventvenue'>City:</label><select name="eventvenue" id="eventvenue" onchange="document.getElementById('menus').style.display='inline';" title='Please select a city.'> <option value=""></option> <option value="1">Portsmouth</option></select> And this is t he accompanying
[jQuery] Where to download jquery's doc
Hi, I have a terrible speed on visiting doc.jquery.com. So I want to download a copy of jquery's reference manual. Where Can I find it? Thanks very much! -- Regards, Wang Yi
[jQuery] [validate] calling multiple fields in one remote: call?
Is there a way to call multiple fields into one remote: call in the validate script? I have a credit card validation that is dependent on the card selected in an above select box. Example: $(document).ready(function(){ var options = { target: '#formResult', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback url: '../ajax/myPaymentInfo_Submit.php', type: 'POST' }; var validator = $("#MyPaymentInfo").validate({
[jQuery] [validate] Inserted HTML Removed on Field Focus
I'm using the validation plugin and I'm getting some odd behavior when displaying errors and then focusing on a field. Here's my jQuery code: $('#demo-form').validate({ rules: { fname: 'required', lname: 'required', company: 'required', title: 'required', phone: {required: true, phone: true, notDefault: true}, email: {required: true, email: true, notDefault: true} }, messages: { fname: 'Please enter your first name.', lname:
[jQuery] Validation Plugin Not Working in FF3 but okay in IE, Chrome and Opera 9.5?
I am using the great Validation plugin by Jörn Zaefferer (http:// bassistance.de/jquery-plugins/jquery-plugin-validation/). In my project it is working fine except when the page is viewed with FF3. It works fine with IE7, Chrome and Opera 9.5. You can view my post on this project at http://beckelman.net/post/2008/09/08/Client-Side-Validating-Bulk-Insert-With-jQuery-Validation-Plugin.aspx and a demo at http://beckelman.net/Demos/jQueryValidateDDLAndTBCombo/Default.aspx. Has anyone run across this
Next Page