Problem with IE
I have this code and in Internet Explorer have a problem. I need block just special caracter(my regex), in Chrome, Opera and Mozilla It's OK, but in the IE It block all key. <script type="text/javascript"> function regexAlfanumerito(event) { var regex = new RegExp("[\sa-zA-Z0-9çÇáéíóúýÁÉÍÓÚÝàèìòùÀÈÌÒÙãõñäëïöüÿÄËÏÖÜÃÕÑâêîôûÂÊÎÔÛ]+"); if ((event.keyCode != 9) && (event.keyCode != 8) && (event.keyCode != 32)) { var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
Help me!what is mean "the index position of the element in the set "?
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <!--jQuery1.81--> <script type="text/javascript" src="../../js/jquery.min.js"></script> <script type="text/javascript"> $(function () { $('input:first').click(function(){ $("ul li:last").html(function (index, oldhtml) { return "<a href='#'>" + index + "</a>" });
dynamic css attributes and values
I'm building a css animation builder and trying to populate a dynamic set of css attributes with dynamic values. I have sliders that set the values of attributes (font-size,color,margin-top,margin-left,etc.). Eventually I hope to make that part dynamic based on what attributes the user wants to modify. The key/values get written to a text area with a semi-colon separating each pair. Later in my process I need to re-apply the values that were written to the text area to the page element that is supposed
Keep accordion pane open
Hello I would like to keep dynamically the accordion menu item open in the page that has been selected from the menu items here is the code <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { // Store variables var accordion_head = $('.accordion > li > a'), accordion_body = $('.accordion li > .sub-menu');
Why is this not working with stopPropigation?
Hi, I can't for the life of me work out whats going on here :/ I have this function: jQuery(document).ready( function($) { $(document).on("click", '.add_fave', function(event) { event.preventDefault(); event.stopImmediatePropagation(); return false; alert("HERE"); }); }); ) It never gets to alert("HERE") (which is fine), yet it always then redirects of that page :/ I thought
Jquery: Calculating values form multiple select elements
code for table(mygrid) in html: <table cellspacing="0" border="1" style="border-collapse:collapse;" id="mygrid" rules="all"> <tbody> <tr> <th scope="col">Nr de ord</th> <th scope="col" class="hideGridColumn"> </th> <th scope="col" class="hideGridColumn">StudentId</th> <th scope="col">Numele Prenuele</th> <th scope="col"> <span id="mondayText">Luni<br></span>
How do i show current date with year?
Hello, i am new to jquery and i wanted to know that how do i show date with year ? also i want to set date next to 2 days. please share your knowledge. http://www.ndkpromotions.com
CSS3/Webkit Slider, Jquery questions
http://jsfiddle.net/xzFam/ Only works in webkit right now as I'm still working on it.. Basically, I don't know where to start with JQuery. Wondering if there is a way to make the above <ul> element infinite (or at least lots of times) without repeating it endlessly in the markup. Also, I would like the texts opacity to become transparent when it is not inline with the rest of the header..? If that makes sense. I think the first question might be a bit easier to combat than the second bit.. Thanks,
How to align header in a particular place
Hi, I'm new to this forum and jquery. I need your help on this small issue. please have a look at this link: http://jsfiddle.net/fL5c9/1/ i want to align H2 element in even pages middle. if a h2 header in odd column, it should be moved to very next even column middle. yes, it should be aligned to middle of the column and related content should follow. if it is in even column, it should be aligned to middle of the column. could you please help me on this? thanks Rajan
Multiple sliders and last one doesnt work?? its baffling me
I am working in WordPress on an options page and everything is fine except one slider, which gets the ui-style applied, When I click on it jquey ui.js passes an undefined object on mouse move. The weird thing is all the others work fine, in fact the jquery is applied to 2 elements in the same declaration and one works but the other doesnt. I have figured out that it must be because a new jquery object is created and its not in its list of dom objects. But why this only one slider when all the others
Window resize event working issue on FF/Safari
Hi there! At some different points of my code I have developed some table data, wich structure is a static header and a scrollable body. The HTML code goes as: <!DOCTYPE html> <html> <head> [..] </head> <body> <div id="wrapper"> <div id="static_header"> <table>[..]</table> </div> <div id="scroll_table"> <table>[..]</table> </div>
Location function issue
So I got this on my code: $(document).ready(function(){ [...] $(funtion(){ $('div#btn').click(function(){ $(location).attr('href', '../otherHTML.html'); return false; }); }); [...] }); And dont' know why it's failing when I'm using the same strategy for other buttons and they work out. Everything around is fine, I mean, the URL's *html* file exists and so on ... - I didn't know it was imposible, so far I wouldn't
Autocomplete: Microsoft JScript runtime error: Object doesn't support this property or method
Hi All, I tried using the example as is given on the http://jqueryui.com/demos/autocomplete/#remote-jsonp link. It always gives me an error "Microsoft JScript runtime error: Object doesn't support this property or method". I tried this example on IE 7 and Chrome web browsers. I'm using jQuery 1.4.1.min.js, jquery-ui.min.js, jquery.ui.core.js, jquery.ui.autocomplete.js, jquery.ui.position.js and jquery.ui.widget.js I examined and found the issue while using the sample code with and without master
How to use .animate() with a notification system
Hello, I'm quite a beginner with the JQuery framework. I'm building a very simple notification system showing at the top of the screen. Here is my actual script : function msg(txt) { if(txt) { $("#message").html(txt); $('#message').animate({ top: '14' }, 1000, "easeOutBounce", function() { // Animation complete setTimeout( function() { $('#message').animate({ top: '-66'
What should I use to create a JQuery/JavaScript popup?
Hey guys. I've tried searching on Google and found dozens of different popup scripts, but I'm not sure if there's any particulars one I should use. I'm trying to make the inventory system on my text game have popups when you click a item's image. The popup should have buttons that allow you to equip, eat, drop, or add to your shop. If I pre-loaded all the popups and simply made them visible, there would need to be dozens of them...so how could I make a popup system that would create the popup dynamically
Extracting a sub-array from multidimensional array
Hello Everyone: I've a serialized multi-dimensional array which uses keys. How can I use jQuery to extract one of the sub-arrays (as users select them) from the multi-dimensional array? Following are applicable details: Multi-dimensional array name: mail_array mail_array is serialized There are three keys to each sub-array keyMsgID keyEmail keySubject Users see a table displaying email and subject. The goal is to remove emails they select from the array. Any ideas on how to go about this are greatly
Passing variables through modal
Hey Guys, I've run into a problem where it involves passing a variable to a jquery modal dialogue upon a user clicking a link. *This also is a topic where it involves some php. Basically, at the moment i have got 2 results from a database that each have a id (24, 25). The links are displayed on schedule.php. When the user clicks one of these links, it will open up the modal (lineup.php), which will then show the id depending on what link the user has clicked. I have given it my best shot, but my
Insert data in database using AJAX
I've been using this files two insert data in the database, but unsuccesfully. Can someone tell me what's wrong? index.php <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript" src="jquery-1.6.4.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#submit').click(function() { var name = $('#name').val();
Multiple object geolocation and tracking
A friend and I are trying to make a bus tracking application for the town that we live in in hopes of making the bus system more reliable. We've been looking online to see if this is possible or if it's been done before and currently I don't think either of us has found anything. So my question is, is it possible with the google maps API, to geolocate multiple object given e data (working on getting the data) and to have those markers move as the object moves along its path? And on top of that, is
Problem leaving animated "busy" image running when switching pages
I'm not sure whether this is a browser, javascript or jQuery issue, but: I want to display an animated "busy" image while switching to a new page, however: ShowBusy() ; // Show animated "busy" image location.href = "/newpage.php" ; freezes the animation. Using a normal link, coupled with a click event to display the busy image works fine, as in: $('.busy').click( function() { ShowBusy(); return true ; } and <a href="/newpage.php" class="busy">Click Me</a> but for various resons isn't always
Repeat
How I can repeat this code every time when all animation end. My Idea is when the animations stop must start again and again and .... every time The code <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Jquery Animation</title> <style type="text/css">body{margin:0;padding:0;color:#333}#effectTwo{display:none}</style> <link rel="stylesheet" type="text/css" href="http://www.codingjack.com/textfx/css/cj-text-fx.min.css" /> <script src="http://www.codingjack.com/textfx/js/jquery-1.6.1.min.js"
Convert text to uppercase
I found this script on the internet but it doesn't seem to work in my webpage. $('jqueryselector').val($(this).val().toUpperCase()); What am I missing? I get the following error: SCRIPT5007: Unable to get value of the property 'toLowerCase': object is null or undefined jquery.tools.min.js, line 1 character 25784 I'm not even sure why I am getting a 'toLowerCase' error when I'm using the toUpperCase function?? So confused!
Validate select fields based off drop down selection
I'm trying to validate select fields depending on the drop down selection. I have also tried if ($('#PropertyOwnership').val() != "Property Owner") { nothing is working. How do I fire select validation based off of what the user selects from the dropdown? The jQuery: if ($('#PropertyOwnership').attr("value") != "Property Owner") { aReturn = ValidateItem('RentalContactsName', true, "Please enter the contact's name.", null, true); if (!aReturn) return aReturn; } The HTML: <div><select id="RentalPropertyOwnership" name="RentalPropertyOwnership">
Tried IF ELSE with two function, does not work
Tried combining my Jquery validate with proress animation like this, but does not work: these two functions need to work as validate is successful and all field filled, then do page animation of progress load. [code] jQuery(function(){ if(validate){ jQuery("#oldpassword").validate({ expression: "if (VAL.length > 5 && VAL) return true; else return false;", message: "Please enter a Current Password" });
Reading Hex values from conf file!
Hi! I'm having trouble solving this one. I'm reading a conf file via http from my local computer. In that conf file I have 8 different colours represented in HEX values e.g. #3be6c4 etc. I'm reading the conf file as follows: $.ajax({ url: "http://some_path/colours.conf?callback=?", type: 'GET', success: function(res) { var result = $(res.responseText); console.log(result); } }); What I would like to do is, grab the values and into my index.html. The will appear in a list. Any suggestions on how
Alert refreshes page
Not sure why but when I click the OK button for the function it refreshes the entire page instead of going to the field as a focus. function IsNumeric(item, message, scrollTo, focus) { var numExp = /[0-9 -()+]+$/; var aReturn; aReturn = $('#' + item).val().match(numExp); if (message && !aReturn) alert(message); if (scrollTo && !aReturn) ScrollToPosition(0, scrollTo); if (focus && !aReturn) { $('#' + item).focus(); ScrollToElement(item); } return aReturn; } function IsAlpha(item, message, scrollTo, focus) {
Galerie thumbnail Pop-Up
Iam looking for a pop up window for my galerie. By clicking on a thumbnail the pop-up window should appear. Possibly like used in lightbox for an single image.
problem in version 1.8.0 and 1.8.1
I use this expression $("#[id^='lbl']").html("") for reset labels that show error messages on contact form. On the version for subject I get the error: "Microsoft JScript runtime error: Syntax error, unrecognized expression: #[id^='lbl']". But When I work with version 1.7.2 my from validation work as always. Maybe I doing something wrong, but I it work on 1.7.2. why it won't work on the newer versions? I can reset every label by using it ID something like $('#lblFirstName').html("") this is a better
Replace Part of an Link in an HTML File
Hello community, I want to replace a part of a link. See my example below. The Links : 1) href="/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=219" 2) href="/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=220" should be changed into : 1) href="http://www.newsite.de/new.aspx?ID=219" 2) href="http://www.newsite.de/new.aspx?ID=220" Thank you in advance for your support I've alredy try this but this doesn't work. $('table tr td.ms-vb-icon a').attr('href', $('table
asp:GridView rowselect
Can you help me.. I need to highlight row on gridView row click event and display first 2 column values in label. How do I do this with jquery?
Auto swap thumbnail image
Hello ppl, Im starting to learn jquery. I have a question.. I have a banner and this banner have some thumbnail images. When i click on any thumb, it changes to a bigger size of the thumb. But it only changes when the user clicks on a thumb image. I need it to automatically swap in X seconds. So, I have: <div id="banner"> <img src=˜img1.jpg˜ /> <img src=˜img2.jpg˜ /> <img src=˜img3.jpg˜ /> </div> <div id="thumb"> <img src=˜thumb_img1.jpg˜ /> <img src=˜thumb_img2.jpg˜
problems authenticating an ajax request
Hello all, I'm trying to send an ajax request which should authenticate via basic http authentication. In the jQuery.ajax() documentation page (http://api.jquery.com/jQuery.ajax/) it states that there are two options, "username" and "password" that can be specified, and that they are going "to be used in response to an HTTP access authentication request." I set those two options in my request, but I cannot see any "Authorization: Basic xxx" header being send by jquery. this is my code: $.ajax(
jQuery file must be in same folder as HTML program
On two occasions I have needed to place the jQuery.js file and the .css in the same folder as the html program. It seems it is the only way I can get the program to work correctly. Admittedly, these .js and .css files were the work of someone else who contributed the program free to other users. This odd requirement of same folder placement leads me to ask for understanding here. Please help: is there a way around this? although, I have not tried everything, I suppose, as yet. Thanks, dre7777777
Jquery: Adding an onload event for a gridview
I have one grid, here is html code: <table cellspacing="0" border="1" style="border-collapse:collapse;" id="grid1" rules="all"> <tbody><tr> <th scope="col">Nr de ord</th> <th scope="col">StudentId</th> <th scope="col">Name LName</th> <th scope="col"> <span id="mondayText">monday<br></span> <span id="monday">14.05.2012</span> </th> <th scope="col"> <span id="thuesdayText">thuesday<br></span> <span id="thuesday">15.05.2012</span>
How to create a function in jquery executed right after a grid is loaded
I have one simple gridview, I want to create a function in jquery that is executed right after a grid is loaded. I'm trying to call with: live and ready, but it doesn't work :(
How can I parse this file using $.getJSON? Thanks!
{ "data":[ { "id":"2047", "from":{ "id":"5245", "name":"Ian Graham" }, "to":{ "id":"234", "name":"Alan Ford" }, "type":"1", "replyto":"0", "date_sent":"1343234342", "date_read":"1343837983", "subject":"re: This is SP", "message":"Hi How are you[quote=Alan Ford]This is SP..Thais is SP[\/quote]", "message_formatted":"Hi How are you",
jquery using .on()
Hi there, i am working on a small jquery javascript...i have a method called attach event which attaches event using $('body').on("click", "#div", {data}, function); all this done in switch case statement subject to page type.... however in one page i have radio button and form with button which are loaded via ajax call... i can click all the buttons, they load form and submit form to server but the form is submitted device, this all happens when i click radio button, if i dont click radio button
Dropdown append behaves erratic in IE8 :: Jquery Bug of DOM Manipulation (for IE8)?
The jQuery preferred code below fails in IE8 but works in all other browsers. When I say fail, what is happening is it seems to be populating the dropdown but there so many blank empty rows. for (var i in objProspectiveBrides) { var optElement = new Option(objProspectiveBrides[i].BrideName, objProspectiveBrides[i].BrideId); if (objProspectiveBrides[i].IsPremiumMember) {
SCRIPT438: Object doesn't support property or method 'match'
I keep getting the error "SCRIPT438: Object doesn't support property or method 'match' " Its a simple text box the user enters numbers only into. Here's the code for my function: function IsNumeric(item, message, scrollTo, focus) { var numExp = /[0-9 -()+]+$/; var aReturn; aReturn = $('#' + item).match(numExp); if (message && !aReturn) alert(message); if (scrollTo && !aReturn) ScrollToPosition(0, scrollTo); if (focus && !aReturn) { $('#' + item).focus(); ScrollToElement(item); }
How does cross domain apply to iframes loaded using the file protocol?
I am doing some very basic html stuff by opening the file on the file system and editing it. Then I open the file using the browser to view it. I am getting some "Error: Permission denied to access property 'ownerDocument'" messages when trying to access the iframe. So I am not sure if I am just trying to access the iframe wrong, or if because I am using the file protocol and there are some permission issues. Here is the html I am working with: <html> <head> <meta http-equiv="Content-Type"
Next Page