javascript replace
hello, i want to replace month name by number in array, but my script doesnt work. for(i=0; i<a.length; i++) { arr = arr.replace(/Jan/g, "01"); } Can somebody help me please? ...
hello, i want to replace month name by number in array, but my script doesnt work. for(i=0; i<a.length; i++) { arr = arr.replace(/Jan/g, "01"); } Can somebody help me please? ...
Hello, I am have a table that shows the user suggestions that they have recieved on clicking read more some ajax is fired and in the database the suggestion is marked as read. Currently if the suggestion is new I show a closed envelope, if it is read I show an open envelope, however I can get it to reload the table when the user clicks...
Im having problems getting the results sorted by date in my search... In the API reference it says i have to use: videoSearch.setResultOrder(google.search.Search.ORDER_BY_DATE); But when using this, my script stops working... The code: function OnLoad() { // Create a search control searchControl = new google.search.SearchC...
Hi, just wodering if anyone has experience with Typeface.js ( http://typeface.neocracy.org ) and fixing issues of the font not being rendered in Internet Explorer ( 6, 7 and 8 ). The font renders in Firefox and Safari fine, hover nothing is displayed in the Explorers. The font is not installed locally so I know that the script is workin...
hi im itrying to debug javascript using vs2010 but i can't set breakpoints? how can i do this? thanks edit: ive used your tips, debugger etc... thanks guys. wow! i just noticed something, every time i try to call a function, no matter what function, in javascript, somehow jquery and ms ajax framework javascript captures it and checks ...
In IE7 and IE6 the form validation returns alert('Please fill the indicated fields.'); and no field is highlighted as invalid . <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="cont...
wow! i just noticed something, every time i try to call a function, no matter what function, in javascript, somehow jquery and ms ajax framework javascript captures it and checks if the document is ready (document.onready or other) and never returns the control back to the function im calling, or whatever it does, my function never ends ...
Prototype version var hash = new Hash(); hash.set("date_query", "test"); hash.set("date_search", "1"); Jquery? ...
I have used a groovy service on a timer in a grails app before by setting a timertask in the resources.groovy. I need to do something similar now, but can't get my head around how to do it. Basically I need a timer task again which will go off in the background and get some data and populate my database. but I also need a countdown ...
For some reason, this works: var oldText = $("#tayke li:eq(" + theIndex + ")" ).text(); But this doesn't: var tayke_li = "#tayke li:eq(" + theIndex + ")" var oldTest = $( tayke_li ).text(); Note: theIndex is an integer. ...
My application is a Live chat. I have a Div to wrap the messages, each message is a div, so, after a few messages my DOM looks like this : <div id = "divChatHistory"> <div id = "msg1> Message number one </div> <div id = "msg2> Message number two </div> <div id = "msg3> Message number three </div> // ... </div> Now a need t...
Hello, I want to add click event to jstree's asynchronous list items. The ideal result is: when i click the items in the jstree, the content of the item will be transfered to a sql query as a parameter, and then, the query is executed and display a result set in the same page or in another page. While I don't know how to implement it...
We have an application that we use an inline frame to submit data to a Notes server. A document.forms[0].submit(0) call is done in the frame, however, on Windows 7 IE8 machines, it results an object error. Our XP and Vista machines with IE8 work fine. Does Windows 7 work differently than XP and Vista even though they are all IE8? ...
Are there any scenarios where it is absolutely necessary to perform an explicit cast of a variable in JavaScript to a String In the following example it is not necessary: var n=1; var s = "Hello" + n; var s = "Hello"+String(n); //not necessary I've used a numeric value above, although this need not apply only to numerics. ...
Can we combine css and javascript into one ? I want to do this for sIFR. because sifr has .js and .css file and without js enabled no use of any file css or js. i want to combine all sIFR related file into one combined javascript file. so at end i will have only 2 file font.swf sifr3.js (which has all thing) Here is latest sIFR 3...
I have a web service which the customers use by inserting an external JavaScript (hosted on my servers). Recently, due to server outage - the external JavaScript became unavailable and my customers' websites came to a crawl as browser didn't load rest of the website until it loaded the JS (it goes into header of the websites). I am try...
On my application, a session is created whenever the user is logged in, and this session is updated on the db and session is saved on cookies as well (using perl) Now I modified the code to update the session using javascript. However when I log out then in again, the session found in the database is different from that found in the coo...
i have 2 windows: window A and window B. -window B was not opened by window A -window B's name is "windowB", that is window.name==="windowB" now i want window A to have the reference of window B. In gecko/firefox there is a trick to get the reference of window B: window.open('','windowB') which returns a reference of window B. but ...
I want to show the thumbnail image large when hover over it, similar to the one in http://www.freelayouts.com/websites/html-templates Plz help. Any help will be appreciated. ...
When I run the following JS I always get the confirm box popping up despite the list visibly having items. <asp:ListBox ID="list" runat="server" Width="135px" Rows="8" /> function CheckListEmpty() { if ($("#list").length == 0) { if (confirm("Are you sure?")) { //they clicked OK so save and close return true; } ...