[jQuery] ajax: if you don't know the content-type coming back...?
I come from Prototype where javascript returned from an Ajax call is autoomatically executed. Unfortunately my server side is also sort of designed on that assumption. So I am POSTing via Ajax and the server returns text/html on successful validation, application/javascript only in the event of validation failure. I want javascript to execute without further ado, but if it's html I want to stick it in a DIV. So I presume, from reading the docs, that in JQuery I have to use $.ajax( { // options...
[jQuery] newbie question about accessing form variables in an .ajax post
So i have a simple text field and some jquery to post it to a server side php script. Everything works fine (writing to db etc...) except that I (obviously) want to send the data in the sub_menu form in the data element of the .ajax call. I've tried assigning id's and accessing those id's etc... I'm obviously just missing something basic. How do I assign this? It looks like this: $('#submit_sub_menu_add').click(function(){ $.ajax({ type: "POST", url: "/Menu/add-sub-menu/", data: "sub_menu_headline=John&parent_id=750",
[jQuery] Interacting with Select
<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000'>I have a select box with a onSelect event and I want to be able to get Attributes from the selected option element. I know I have to use the attr() method but how do i refer to the correct option element?? </div></body></html>
[jQuery] datepicker target
Hi, I'm having problems with datepicker...i'm cloning input fields with datepicker...then i tried everything (i know) to force datepicker to input the selected date in the cloned input field...but it just won't work... $(".datum").livequery("click",function(){ $(this).datepicker(); });
[jQuery] Need Help with form Validation
Hi all, I've been working on this site which has a couple of pretty long forms and I've been working on its validation. I have a few issues I still need to work through and I'm drawing a blank. The first two things are probably simple to solve but I don't see how. I'm using the Bassistance Validation plugin. First, I have a text field for a URL and I would like the http:// part to be filled in automatically if there's no data in the field. The client has been testing it and the validation routine
[jQuery] blank form fields in GET request
Hi, I have a form with lot of input fields - most of them are of type 'select'. In most cases only a few fields are changed. The others still show the default value. When submitting the form I get a huge url which basically looks like this: http://home/myscript?a=&b=&c=newValue&d=&e= I would like to have it simplified to http://home/myscript?c=newValue I tried already by removing the empty fields from the form but I don't like to see them disappear when submitting the form. Is there an easy way to
[jQuery] selectbox event problem in MSIE
Hello! When I try to bind an event to an option of a selectbox item, this works with Firefox and Opera, but not in MS Internet Explorer 7. Example of the code: <script type = "text/javascript"> $(document).ready(function() { $("#wgt2 option").click(function() { var selectText = $(this).text(); var selectValue = $(this).val(); alert("Test: " + selectText); }); }); </script> [...} <form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post" accept-charset="utf-8"> <select style="width: 100px;
[jQuery] blur event doesn't work with DOM element dynamically added
Hi, I have a form I'm working with where the user can drag and drop elements onto the form to populate fields. In one instance I create a new input text box if a specific item is dragged and dropped onto the form. I have a 'blur' event for all objects with a specific CSS class and this newly created element has that class. But the 'blur' event isn't getting called for these new input fields. The 'blur' event works for any text field that is assigned the class, just not for these dynamically created
[jQuery] Problem when use tab nested tab
I want when I click on parent tab, the first tab in tab child will be selected. But my code is not right. Can you show me the right solution? Thanks This is my code: $(’#container_parent > ul’).tabs({ fx: { height: ‘toggle’, opacity: ‘toggle’ }, select: function(ui) { }, show: function(ui) { switch($(’#container_ parent > ul’).data(’selected.tabs’)) { case 0: $(’#container1 > ul’).tabs(’select’, 0); break; case 1: $(’#container2 > ul’).tabs(’select’, 0); break; case 2: $(’#container3 > ul’).tabs(’select’,
[jQuery] How to test if an event has been defined?
Hi, How would I test if an ID has been defined with a Droppable "event"? That is, if $('.fileviewer-body').Droppable( ... ); has been defined previously in my page? Thanks for your help, - Dave
[jQuery] jquery lightbox problem
i am trying to use the jquery lightbox plugin (http://leandrovieira.com/projects/jquery/lightbox/). the page i am attempting to use it on is here: http://beta.snkenterprisesinc.com/about.html if you click on the thumbnail image of the award, it brings up the lightbox but all of the images (the loadign image, the close image...) are not being displayed. can someone take a look and tell me why that might be? i have been going nuts over this one. -- View this message in context: http://www.nabble.com/jquery-lightbox-problem-tp18913289s27240p18913289.html
[jQuery] fill form elements with PHP returned results
hi! I'm new to Jquery, and guys please help me on thin simple problem. I have a form where is includes, a combo box (to select news id) a text box to display the news title a text area to display the news body two radio buttons to display whether the new item is active or inactive. Now! i need to know how to fill this form when I select a news id form my combo box. I have filled the combo box with the data in my-sql DB using the PHP. and I know how to write the PHP code to retrieve result related
[jQuery] How to read the xml data?
Sends an xml document as data to the server. By setting the processData option to false, the automatic conversion of data to strings is prevented. code from jQuery documentation var xmlDocument = [create xml document]; $.ajax({ url: "save.aspx", processData: false, data: xmlDocument, success: handleResponse }); Now,in server script, how do i read the xmlDocument and save a file.my code like this: private void Page_Load(object sender, System.EventArgs e){ Stream stream = Request.InputStream; XmlDocument
[jQuery] [treeview] GET variables & location based persistence?
Love the treeview plugin, but I have one problem with it. I am using the location based persistence, but if there is a get variable in the url it doesn't persist correctly. For example: http://yourwebpage.com/group is recognized differently than http://yourwebpage.com/group?group_id=555 I understand why there might be cases that they shouldn't match, but is there a way to get treeView to match these two states so I can use location persistence while still utilizing the GET array? Is there a setting
[jQuery] Possible to reference elements with slashes in ID?
Hi, I have an element that looks like <span id="/uploads/mine.pdf">...</span> The experts will know that when I try and reference the element, var len = $('#/uploads/mine.pdf').length; the value of "len" is zero. Besides changing the ID of the span, is there any way I can reference the SPAN element? Thanks, - Dave
[jQuery] Making $.metadata extensible
I've been playing with the metadata plugin but like the idea of migrating to HTML5, including the data- attributes for metadata. I realized that rather than constantly rewriting the plugin with new methods, the plugin itself should be extensible. Thus, instead of the monolithic $.metadata.get, use: $.metadata.get = function( elem, opts ){ var opts = $.extend({},this.defaults,opts); return $.data(elem, opts.single) || $.data(elem, opts.single, this[opts.type](elem,
[jQuery] newbie problem with Ajax
Hi, I have recently started using jQuery and am trying to parse an XML document that I will load from a URL on the same host as that of the page running the script. Currently I am running XAMMP on OS X and I have a file test.html located at http://localhost/~rguha/jsdepict/test.html This loads a file called parsecml.js (located in the same directory) whose content is $(function() { $('#loadmol a').click( function() { $.ajax({ type: "GET", url: "ethane.cml", dataType: "xml",
[jQuery] questions about focus & visible
hi all How do I know 1) an element is on focus? 2) an element is visible? 3) which element is on focus? thank you in advance! Jack
[jQuery] $ is not defined error
I have download the JQuery, tring it out on our testing server. I keep getting $ is not defined error. I have been searching on google for anwers, I have seen people getting same error, but the solution does not fix my problem. Here are some points I have checked. a) I have reference the jquery2.js correctly. b) I have also made sure it is declared at the top before other jquery function calls. c) I have also tried to replace'$' with 'jQuery', it didn't work. Could someone please share some lights
[jQuery] Superfish CSS Help
Hey I really like superfish menus. It is what I have been looking for. I have installed the code and everything works perfect. However I have spent about 3 days trying to edit the CSS to make the menus look the way I want but I have not been very successful. Is there any one out there that can help? I am trying to make the menus look like the menus on this page. http://dev.wagbrag.com. This is my dev site and built this menu using UL and divs. Unfortunately the CSS is beyond me. I will be happy to
Problem with a jQuery script (drop-down)
Well i have this script for a drop-down menu. My problem is that the box starts already dropped down. I want so that it is "dropped in" (i mean simply gone) and when i click the link, the box drops down. Hope you understand me. I know it's quite easy, but the fact is i am starting out with this and i am still learning, and i need this kind of script which partly i have found here and i wanted to extend it to my needs, without success: http://www.learningjquery.com/2008/02/s ... ts-plugins . Here
[jQuery] ajaxSetup callbacks
<div dir="ltr">I'm using jquery 1.2.3, and i've found a bit of a snafu in the ajax routines: It seems that methods set by jQuery.ajaxSetup() are overridden by the options in jQuery.ajax() This means that i cannot add a global handler to update a statusbar of what is being done when. In short, i want my statusbar to go through these stages: 1) Getting <url> 2) Processing <url> 3) Processed <url> if i do : jQuery.ajaxSetup ({ type : "GET", dataType : "html",
[jQuery] jquery corner plugin and safari
hello, with safari the backparts of the rounded corners appear as white. I have tested this by looking at the http://www.methvin.com/jquery/jq-corner-demo.html page. is there a fix? also I am using version 1.7 is there a more recent version? best regards, -c.b.
[jQuery] change filename variable at jquploader
For upload image,I always rename the file to md5(microtime), so there will not be duplicate file from the user. I try using jquploader for the upload field. The problem is, I cant change the filename that generated from jquery (hidden field) become md5(microtime). Anybody knows what I could to to rename this filename on the hidden field ?
[jQuery] Adding easing to Scroll Pane
<div dir="ltr">I am using the jScrollPane plugin on this page: <a href="http://www.jimdavis.org/index.php">http://www.jimdavis.org/index.php</a> Is there a way to add easing to the vertical scroll such that the scroll accelerates/decelerates as the scroll action moves up and down? Jim </div>
[jQuery] jQuery Validation Opera Issue
I used a text area as one of the field inside my form. I didnt put any validation rule on it but why i am receiving a validation message "Please enter no more than 0 characters." ? This only appears on Opera. Any idea?
[jQuery] blockUI Plugin Lint Check Fixes
I just had to make some fixes to version 2.0.8 of the blockUI jQuery plugin as it was throwing up warnings with the JavaScript Lint Checker and as a result wasn't minifying correctly with YUI Compressor. Here's a diff of the changes I've maded against the original. If Mike Alsup (blockUI developer) sees this it would be great if he could update the blockUI plugin to help other users. --- /Users/simonplend/Sites/htdocs/projects/pingmymap/working-copy/ trunk/website/html/javascript/lib/jquery/jquery.blockUI.fixed.js
[jQuery] Possible Bug
I have a select box with option elements that I am try to do .hover() on and they are not working in IE, everything works fine in Firefox but I get nothing in IE 6 or 7. The code looks like this <select name="colors"> <option class="jqueryColor" value="black" hex="#000000" image="">Black</option> <option class="jqueryColor" value="red" hex="#FF0000" image="">Red</option> </select> javascript looks like this: $(".jqueryColor").hover( function() { if (typeof($(this).attr("hex")) != "undefined" ) {
Total Beginner, needs help.
Ok so I am completely new to JQuery, and I have some javascript experience but for some reason through all the tutorials I have looked through I can't seem to get anything to work for me. I am using dreamweaver cs3 and trying to have jquery do something EXTREMELY simple but it doesn't work for me and I am unsure why. Please someone help me just figure out this small problem so I can be on my way and learning more about this seemingly great thing called jQuery. Can someone tell me why this doesn't
[jQuery] Questions Validation Plugin (bassistance)
Hi there, I'm posting here at the request of Jörn on Twitter. I started using the Validation plugin and ran into a few questions I cannot seem to find clear answers for in the docs so I'd appreciate a little bit of help. First, I was wondering if there is a list of all built-in or default validation rules like "required", "email", "url", etc. I could not find one in the docs. Also, I was wondering if one exists for phone numbers. If not, I'd need to build a custom rule but again I cannot find clear
[jQuery] Validate: Dutch localization
I just wrote the Nederlandse (Dutch or NL) localization for the Validate plugin. http://www.spacebabies.nl/2008/08/09/jquery-validation-plugin-in-nederlands/ Comments are always welcome!
[jQuery] jQuery Validation Problem
Hi, I made a dynamic form and used Jörn's validation plugin on it. It is working in FF but unfortunately I'm having problem with my file validation on IE. The $.validator.addMethod I used is giving me an incorrect result in IE. Here is the URL of my page: http://test.fibranet-services.com/test/default.asp Anybody who has the idea on what's wrong with my code? Thanks, Nimrod
[jQuery] re-sort MySQL data using jQuery & PHP
Hello, I'm building a simple photo gallery application using PHP & MySQL, but the clients wants to have the ability to re-sort the data !! if we've a MySQL column called order, and by default it's default auto- increment, it's easy to make him change the order of each time, but it'll be mess for him, as he should re-sort all items each time he change the order of any of them . So, is there anyway / plugin, to allow the client re-sort the data by dragging them for example ? Thanks for your time !!
[jQuery] Problem with .load on dynamic images in IE...
I'm having a problem with the .load function of jQuery. For some reason it will not work correctly for IE on a dynamically generated image (one not in the cache). Below is my code. The "thumbs" will be cached, but the large images are loaded dynamically after a thumb is clicked. I also tried to .bind("load", function.... This also didn't work. Everything works great in FireFox, but everything in the .load function will not run in IE. Any suggestions? <script type="text/javascript"> $(function(){
[jQuery] Multiple views for grid
Hi all, I wanted to make a view (UI) like ITunes views (List view, Thumb nail view and grid view) if anyone can give me the idea or is there any plug-in are invented with jquery? If yes please let me know. Please help me!!!
[jQuery] How to select previous/next value/index from currently selected option?
I've got a select list with a number of options, does anyone know how to select next option in the list from currently selected option? (or previous for that matter) Tried the .next without too much luck. Thanks in advance.
[jQuery] problems with jquery lightbox plugin
i am trying to use the jquery lightbox plugin (http://leandrovieira.com/projects/jquery/lightbox/). the page i am attempting to use it on is here: http://beta.snkenterprisesinc.com/about.html if you click on the thumbnail image of the award, it brings up the lightbox but all of the images (the loadign image, the close image...) are not being displayed. can someone take a look and tell me why that might be? i have been going nuts over this one. -- View this message in context: http://www.nabble.com/problems-with-jquery-lightbox-plugin-tp18909017s27240p18909017.html
[jQuery] jquery validate plugin - need to validate IF DIFFERENT
Hello ppl of the group, I'm here to ask if there is a way to validate a field to be DIFFERENT from a value from a hidden field on a form or a sample string. I'm using jquery validate 1.2.1 I have a username/pass validation ruleset, but i need the password TO BE DIFFERENT and DO NOT CONTAIN the username on it, is there anyway to do this? ATM all i have is this. clave: "Requerido", clave_verif: { required: "Repita su clave", minlength: jQuery.format("Repita su clave"),
[jQuery] $_GET instead $_POST
Hi, i want to post some data to a php script but always variables send to server as $_GET. for example: $.post("script.php" , {var : 'value')); this code must sends $_POST['var'] to script.php, but it sends $_GET['var']. how can i solve it? i want to use it for site login and i need send data as $_POST. is it safe? Thanks AHHP
[jQuery] Problem with $.post()
Hi When I'm using $.post() on Lighttpd - all is ok. But I try to use it on Google App Engine server and it return 411 error (Content Length required). What is wrong? This is my code: $.post("/my/url/", { entry_id: 5, body: 6 }, function(json){ // some operations with result }, "json"); Please, help me. And sorry for my English.
Next Page