Opening modal into a new window
Hello, Im trying to open a modal into a new window, but taint having too much success ...It's opening instead into the parent frame. Anyone see anything. <div id='pdfdiv' style='display:none'><a target="_blank"><iframe id="pdfimg" width="100%" height="100%"></iframe></a></div> It's seems to be ignoring my target attribute. function openpdf(doc) { var url = '/my/pdf/' + doc; $('#pdfimg').attr('src', url);
Form fields order
I have a form with dinamic input fields. It means that a user can add any amount of input fields. On the server I use PHP. I need fields to be sent in appropriate order (DOM order). Form is submited via AJAX. This is an example of fields of a form: <input type="text" name="guest[]" value="" /> <input type="text" name="guest[]" value="" />When a user submit the form I use .serializeArray() and pass the result of it to $.ajax(). Is it guarantee that the server will always get fields in DOM order?
Is it possible to start execution of a queue in the middle of another execution?
Hello everyone, This is my second forum post (previous one: problem when creating simple counter in jQuery) and i would like to ask you question on queue execution before another execution ends. This is what i want to do <html> <head> <script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var status = "run"; var temp = 1; while(status == "run") { (function(temp, status) { $("body").queue("exprQueue",
problem when creating simple counter in jQuery
Hello everyone, i am new to jQuery and i was practicing to make a simple counter that starts from 1 and ends at 10 with delay of 100 msec in between. The code i used looks the following <html> <head> <title>Simple counter test</title> <script type="text/javascript" charset="utf-8" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { var i; for(i=1;i<=10;i++) { var currentTime = new Date(); while(new Date() - currentTime < 100); $("body").html(i); } }); </script>
Using a jquery toggle...help
Basically, I'd like to use a jquery toggle. I've got 3 columns, and I'd like them all to toggle. The first two slide to the left fine, but the 3rd one goes upwards. Any ideas? All divs have the same properties (apart from names) Here's the code anyway. Thanks in advance <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
JQuery buttons
Could you please look at the following code and see why the two buttons: home and search are replacing themselves and they are not one next to other on the right. If anyone has a solution please write some code. Thanks. <!-- person page template --> <!DOCTYPE html> <html> <head> <title>[[+titleLabel]]</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="../www/images/favicon.ico"
How to populate value which is in one page into another page's textfield on button click using jquery?
1.I have 2 pages (page1 and page2). 2.In page1 on button click it will navigate to page2. 3.page2 has a "textfield", so once I click on the button on page1, the value(inside DIV) which is on page1 must display in the textfield on page2.
Extract content of span inside the first matched link
Hi, I have this piece of html duplicated in the document. <a class="label application-label" href="/label/bp/app10411" rel="tag"> <span>app10411</span> <span class="remove" title="Remove"></span> </a> I need to extract the content of the first span inside the link, the "app10411" string. I have tried $(".label.application-label span:first").html() $(".label.application-label").find("span").html() $(".label.application-label").first().find("span").html() in the selector I have used ".label.application-label"
AJAX returned JSON data object parsing problem
The AJAX is returning the data. I can see the JSON in firebug but it does not get presented on the page. I assume the bug is somewhere in the data getting parsed. The submit form button works and a row gets inserted but when the user comes to the page all the todo items should be displayed first. Here is the link: janisrough.dyndns.biz/todo17.html How do I trouble shoot? The success alert doesn't fire. Thnanks, $(document).ready(function() { $.ajax({ url: 'ajax/form_handler_copy.php',
multiple slideshows
i have multiple slideshows on one page with anchor links that slide the screen to each slideshow.. its messy. I can get 2 slideshows working but I want more.. how can I achieve this.. here is a link to the page http://manmade.co.nz/index_2.html
Object doesn't support this property or method - Internet Explorer 8
I get the following error for a page that is basically a form. After filling in the form and click the save button, IE gives me this error. Object doesn't support this property or method. Line:497 Char:5 Can anyone please take a look and tell me what it could be? line 497 is the 6th from the bottom... jQuery_1_7_1("#store_notes").val( "" ) ; Here's the code... <?php include_once ( "../global/includes/settings.php" ); $current_opt_menu = $opt_menu_checklist; include_once ( "includes/header.php"
scrollbar for jquery accordion
hi everybody, i am new to jquery and tried to include a scrollbar into my accordion with changing the autoheight from false to true and in a function. but nothing did work for me. maybe you can help me with that. here the code: CODE: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> $(document).ready(function(){
Total beginner fails at jQuery - changing the colour of css borders when clicked/active
Hi all, first time poster. I have an assignment that involves using jQuery to change the colour of a CSS border for a list element from black to red when active, i.e. when the user is currently at that page, as you can see here on the menu: [IMG]http://i.imgur.com/M4kiY.png[/IMG] The "hint" code that we were given to solve the problem was this: $( '#navhome' ).attr('style', 'border-right: 1em solid red;'); $( '#navhome' ).click(function() { $( '#navhome' ).attr( 'style', 'border-right: 1em solid
Datepicker with SQL?
Hey Guys, Im having difficulty trying to work this out. Im trying to grey out the dates that have already been entered into the database. heres what I tried ******Database Stuff ***** [code] $(document).ready(function() { $("#datepicker").datepicker({minDate: 0, beforeShowDay: booked }); function booked(date){ var day = date.getDay('$grey, $grey2'); return [(day > 0), '']; }; }); [/code] Thank in advance everyone
How to show ajax page after response image all loaded
I want to use ajax load another page into a div include many images, and I hope the div show after the images been loaded completely, how to do that?
Hiding days in datepicker
Hi Everyone, I have some problem with hiding days in datepicker depending of day of week e.g. if today is friday hide saturday and if today is saturday - hide sunday. I have this code who check what day is today: $(function () { var day_date = new Date(); //var day_date = dateMin.getDate(); var weekday = new Array(7); weekday[0]="Sunday"; weekday[1]="Monday"; weekday[2]="Tuesday"; weekday[3]="Wednesday"; weekday[4]="Thursday"; weekday[5]="Friday";
var doesn't keep value, only in the console.log
I have some problem that i dont get my head arround... I want the variable of eId to be added to the data string but it always comes up as 0, but in the console log it shows the value changing... how can i add the eId value to it. Here is the code: <?php require_once('Connections/dbconnection.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc()
How to handle click event for the dynamically created anchort tags??
Hi Experts, I am nu to jQuery so this question might seem naive to you guys. But please help me out here. I am creating a number of anchor tags dynamically with different titles and assigning different click event handler to those anchor tags that too dynamically. All the anchor tags are getting created perfectly with different titles , but the PROBLEM is event handler for them all is the same as the event handler for the last created anchor tag . So when I click any of the link they all go to
Datepicker - set the data inside the input field when one of the date is selected
I have some holidays days: var holidayDays = ['24/12/2012', '2/1/2013', '14/2/2013']; and code: if( parseInt($("#date").val()) == holidayDays ) { var freeday_value = ('holiday'); $('#holiday_day').val(freeday_value); } Who didn't work. What I want to achieve: if in datepicker someone pick the date from above table, then on input field (#holiday_day) will be displayed word: holiday. Thanks for any help.
when timeout I want to run a function!
timeout works! but when timeout I want to run a function. do you have any ideas? //when you define datatype as JSON, you can do it. But my response from xajax.php is a data: "echo $_GET['name'];" $.ajax({ type: "GET", url: "xajax.php", timeout: 100, data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } //like this: //timeout: function(){location.href='blabla.html'}
jQuery license details
Hi! A few weeks ago I already postet a comment into this forum to inform about the use of jQuery in commercial projects. I got a reply by a user in this forum, but there is still a question, I don't have an answer to. So maybe an official member of jQuery could reply to my question. In MIT-License it says that the "copyright notice and the permission should be included in all copies or substantial portions of the software". So if I create a website and sell it to my customer - what do I have to do
jquery ajax call to Rest Service
I' m trying to invoke a Rest Service (wcf rest service) : http://arduinomonitoringservice.cloudapp.net/ArduinoDiagnosticsService.svc/Agents => The service returns json data. But when I try this from a jquery ajax call, it fails: I'm receiving an error or if I change the datatype to jsonp I see parseerror was not called. My js code: $.ajax( { type: "GET", url:'http://arduinomonitoringservice.cloudapp.net/ArduinoDiagnosticsService.svc/Agents',
blue color of such number, fax and email
hello :) please I have a little problem, I ready inserted a phone number and email to my mobile site is based on this site but I can not change the color of the following number and email still blue (just on my page index) thank you for your helps
Expand/Collapse jQuery Troubleshooting Help!
Hello, I am trying to figure out how to make the expand/collapse arrow images work in my HTML document. The menu itself works just fine. When clicking on the heading, its contents are displayed and when you click on it again, they disappear. So as far as that part, everything is fine. The only thing that doesn't work properly are the right/down arrows. When the page is loaded, the right arrows are displayed. Upon clicking on the heading, it becomes a down arrow. But then the problem comes in. When
Read a list of images from a dropbox folder?
Hello, I need some help please ... How I can read an XML file that contains a list of images in a dropbox folder? To scroll through the list and then download the images one by one. something like: $ get ("https://www.dropbox.com/ ...." function (images) { ...? }, "Json");
jquery selects all elements, i walt only current.
Hello, i have three div's and every div has hidden child (display none) when i write: $('.link').click(function() { $('.hidden').css({'display':'block'}) }); Something like this works, but then ALL .hidden appears, and i want to show only .hidden that is in clicked link. (current hidden not all hidden ) <div class="link"><p>show menu</p> <a href="#"><img src="images/icons/arrow.png" /></a> <div class="hiddenDiv"></div> </div> <div class="link"><p>show menu</p>
Use jQuery to detect outdated browser and alert user
Hi all! Does anyone know of a relatively simple way to use jQuery to detect what browser/user agent a website visitor is using and notify them that what they are using is outdated/unsupported? I did find this, http://www.devslide.com/labs/browser-detection. The problem is that the popup/alert window that appears if you view the page in say, IE6, is so stretched out and distorted that the user might have trouble actually seeing what they are being warned about and I didn't want to take the time
Changing the default date format
How can I change the default format of the date picker? I don't want the user to have to change it manually from mm/dd/yyyy to yyyy/mm/dd. Thanks
Javascript/jQuery Syntax Issue
Hi, sorry if this is the wrong forum for this question, but I'm new to this. This is the issue I'm having. The code below works just fine, when you hover over the div with the corresponding id, it fires a click event on a different class: <body> <div id="site1"> <p><a href="" >Website 1</a></p> </div> <script type="text/javascript"> $("#site1").hover(function() { $(".centered-btns1_s1").click(); }); </script> </body> The problem is that this
Replace auto action with onclick
Hi everyone. I'm totally new to jQuery. I used this snippet of ode (had to addapt it) to autoload (think Twitter) new posts on my page when scrolling. Since this is ressource heavy for my server when a user scrolls fast, I want it to be activated when cliking on a button, lets say <button id="load_more">Load more</button> Can anyone help me convert mine ? I can't get it to work... Here is the code I use for autoscroll : <?php $maxPage = $this->Paginator->counter('%pages%'); ?> <script type="text/javascript">
NULLify CTRL press in link clicks
I have a requirement in preventing the links in my applications from spilling over to new window/tab through CTRL keys. I have the following in my page now: $(document).click(function(e) { if (e.ctrlKey) { return (false); } }); This seems to be working fine for DIV clicks however link clicks are totally ignored. I am looking to see if I can NULLIfy the CTRL keypress alone and make it appear like
Format Numbers in Form as They are Entered.
I have a form that performs calculations. I was wondering if it is possible to format a number with commas as it is entered? For example if someone enters 1000000 a comma would appear after the 1 and the third 0 when the third and sixth 0 is entered to make it 1,000,000. The form should allow the user to enter a decimal if required. If this is possible how can I accomplish this?
Reset DIV size after .html('') method?
Hi Everyone, I'm having an issue where I use: $('div#content').html(''); to clear a div before adding new content and then: $('div#content').append('...'); to add the content. The problem is that if the previous content was larger, the height of the div stays the same and it doesn't reset when I load the new content and I get stuck scrolling through pages of blank space. I've tried using: $('div#content').html(''); $('div#content').css("height", "0"); $('div#content').append('...'); but it doesn't
Auto Suggest with drop down list selection into text box
Hi Guys, I need help~~~~ I've got a textbox, with a drop down list. This drop down list contains a list of options, when people click on one selection, it gets inserted into the textbox, provided it's not already in there. The script that I used to do this is: function ddlSuburbs_onClick() { var listBox = document.getElementById('<%= ddlSuburbs.ClientID %>'); var textbox = document.getElementById('<%= txbSuburb.ClientID %>'); var totalContent = textbox.value.split("; "); if (textbox.value
hide row in javascript
Hellow! How can I hide row (tr) that in formview with javascript? I want to do that in pageload but then it fall thanks...
Ajax call works with FF, not with other browsers
I have done a php page which returns a (valid) JSON document. The jQuery code is very simple: $.ajax({ url: "http://localhost:8888/rkm/json-jc", dataType: "json", success: function(data) { console.log(data); $('li.jcarousel-item-1', context).html( '<img src="' + data.nodes['0'].node.vignette + '">' ); } }); It works fine in FF and the object returned is OK => see 'FF_console' attached. But... it doesn't work in Chrome, Safari and Opera, without throwing errors. The
Issue Whit Infinite loop in Array
Hi, Can you please take a look at following jquery Code and let me know how I can stop infinitive looping inside the program: $(document).ready(function() { var comp = new Array("AAPL","MSFT","XRTX&"); var t = setInterval(function(){getPrice();},2000); function getPrice() { for (var i=0;i<comp.length;i++){ $.getJSON('https://finance.google.com/finance/info?client=ig&q='+comp[i]+'&callback=?', function(response){ var stockInfo = response[0];
big problem with AJAX ! jQuery doesn't execute on div loaded with ajax !
I have a page being generated with PHP, it includes a DIV who's content gets swapped with ajax. the new content contains the following function call PHP echo'd inside the parent DIV. In this div I have two slider on the homepage.(index) The sliders works when the content of the page is loaded directly, but not when it's been swapped there with ajax, while jquery scripts are already stored in the "head". What I'm trying to do is load an external html file and have the Javascript that is embedded execute.
Very ...very ..strange problem with "hover event" inside scrolled table section ???
Hi ...all fantastic fellow jQuery experimenters out there ! I'm trying out the "hover" shortcut event-binder for the "mouseenter"/"mouseleave" events ..... as a solution for some highlighting functionality I need in a app-project of mine . The problem I come to face .... occurs as following : The "hover"-events which becomes fired/triggered as the core-pointer moving in over individual "indication markers", living as img-tags (.png) inside of an table-structure wrapped by a y-overflow scroll,
Bring back the old jQuery UI website
I used to think the old jQuery UI website was a bit clunky but now it's just useless... what happened to the great API documentation with all the code samples in it? Now it's just miles and miles of text with no working examples, and the examples that are there are very basic and show little of the complex functionality that can be achieved with the plethora of options in the API. I also find that I'm having to open more than one tab as the APIs are no longer on the examples pages.
Next Page