javascript - get two numbers from a string
Hi I have a string like: text-345-3535 The numbers can change. How can I get the two numbers from it and store that into two variables? ...
Hi I have a string like: text-345-3535 The numbers can change. How can I get the two numbers from it and store that into two variables? ...
I was wondering how to make it so that I could make a rule where a field is not equal to a value. Like I have a field called 'name' so I don't want 'name' = 'Your Name.' Does anybody have an idea of how to do this? thanks for any help. ...
I am using jQuery Uploadify plug-in. It works great for what I'm doing, but when I recently tested it with images over 2.5mb, it fails. The process completes, states that the file is 100% uplaoded, but the file never arrives in the uploaded folder. The log files say that the script can't find the file. I checked the PHP.ini file setti...
I use jquery-hotkeys: http://github.com/jeresig/jquery.hotkeys And this is my code: $(document).bind('keydown', 'ctrl+s', function(){$('#save').click()}); but I cannot disable the browser's default behavior. How do I disable it? ...
I'm trying to use .fadeIn() to make my navigational hover effects look a little more smooth on the transition. Except I'm getting what I can only describe as a double fade (in and out and back in again). I'm brand new to JS and the jQuery API so any help appreciated. I'm an old pro with CSS, so I still think in those terms. On this one...
I'm trying to send XML doc to server from client. But when server get a XML doc. It's always empty. Here is my jquery function. It's send XML to server: var str = '<?xml version="1.0" encoding="UTF-8"?><foo><bar>Hello World</bar></foo>'; var xmlData = strToXml(str); // convert string to xml console.log($.isXMLDoc(xmlData)); // r...
Hi want to get a date list between start date and end date. For example start date is 27-08-2010 and end date is 31-08-2010. So the date list is 27-08-2010,30-08-2010 and 31-08-2010. 29-08-2010 and 30-08-2010 will be ignore because it is in the weekend. I attach the picture for more clearer explanation. How to achieve this using javascri...
I am trying to embed a pdf into my webpage using an object that will fallback to an iframe which loads the pdf through an external rendering service for users that do not have acrobat installed. I am trying to do it like this: var container = document.createElement("div"); var object = document.createElement("object"); var iframe = doc...
I generate the jQuery cookie using this code: $.cookie('queueView', 'value', { path: '/' }); assuming that the path is set to the root, hence "/". When i go to a different page, and on a different folder level, the cookie is suddenly gone only to find out that it became unique to a particular web page in my site. What i would like to...
Hello Everybody, I have a website developed on Drupal. I use a module called collapsiblock (it is basicly a JQuery plugin) to achieve accordion like effect. It is working fine with me (although it is in Beta). But I want to modify it so that when the user clicks on one item of the accordion the other items will collapsed. In its curren...
In the below code ,the html loads up and will call group_map set python function.My question is that there is pagination enabled in the system so if a user in page 3 deletes a entry the page reloads and brings back to page 1.How to make the user stay on the same page after deleting an entry Datatable used is from http://www.datatables....
Hi. I have a strange problem on a web page. On this page, there were (.net ajax) accordion control and modal popup extender. For some reason modal popup installer would not work properly so I have replaced with jQuery modal. (using jQuery-ui). The problem is that after the jquery modal is open( or closed) Accordion control will not f...
I'm building a page of thumbnails with jQuery like this: ID=this.id; $('#thumbs').empty().html('<span class="title">'+$('#'+ID).html())+'</span><br />'; var i = 1; for (i=1;i<=count[ID];i++) { $('#thumbs').append('<img class="thumb" src="graphics/thumbs/'+ID+'/'+i+'.jpg" />'); } The idea being that the <span> would appea...
Hello everyone, I have a SESSION that looks like this: array(1) { [1]=> array(11) { ["aantal"]=> int(1) ["id"]=> string(2) "29" ["filmtitel"]=> string(16) "2_fast_2_furious" ["film_id"]=> string(1) "1" ["zaal_id"]=> string(1) "1" ["zaaltitel"]=> string(6) "zaal 1" ["tijdstip"]=> string(8) "17:30:00" ["stoeltjes"]=> array(3) { ...
I'm developing a mobile version of a website, unfortunately because of the archaic CMS in use it's not possible for me to alter or offer an alternative template for the pages - therefore I only have css and javascript (and maybe .htacess) at my disposal. I've looked around, and I think there may be a way to prevent images from loading u...
Hello, I am trying to do the classic category -> subcategory chained dropdowns (where selecting something in category, populates the subcategory). The code I have works in all browsers except IE (naturally). Here is the JS code I am using: $("body select#category").data_binding({ child: "select#company_subcategory_id", url: "s...
hi i want to insert div element in the root of my page hierarchy, so it must be opened after body tag and closed before body close tag, how can i do it in jquery? ...
Any sample code for chart with multiple bars using flot ?? similar to this example . The given patched files are not working for me. Anywhere I can download the latest files for multi bar graph. Update I am sure Flot is a very good library but plugins/add-ons are not available easily and the examples given on the website are very basi...
I have a anchor element on a page that i need to refresh every 5 seconds. It is only one anchor so i do not need a cycle plugin here. How can I refresh the element i want without reloading the page. Any plugins? ...
i have a form that contains 3 File inputs.i want to send it via jquery.i tried serialize function in jquery,but i realized that this function don't send file inputs! here is my form : <form id="submit_pics" action="#" > file 1 : <input name="file1" id="file1" type="file" /><br /> file 2 : <input name="file2" id="file2" type...