Can I create script tag by jQuery?
I want to create a script tag by jQuery. I use the following code: $("<body>").append("<script></script>"); It doesn't work. What will you do to acheive it? ...
I want to create a script tag by jQuery. I use the following code: $("<body>").append("<script></script>"); It doesn't work. What will you do to acheive it? ...
Ok Hi Help help help I am having a major problem with setTimeout it is not working and i did everything not working I am developping a chat system so i need to send and recieve messages (i test it by opening 2 browser windows) Here is the code i changed many times I hope any one can help me javascript $(document).ready(function() ...
I test the code in IE7, FF, Chrome, Safari and this problem occurs in Firefox only. I have checked that the problem only occurs in FF 3.5.x, but not FF 3.0.x. I want to make an image animation which has 10 images in total. Currently, I use the following code to do it: for (var i=1;i<=10;i++){ img[i] = new Image(); img[i].src ...
Google has this fine new Google Maps API v3 which is a "Javascript API". Is there any possibility to invoke this API from a Windows Forms application written in Visual C# .net 3.5? EDIT: The goal is to convert addresses to lat/long format using the Google Maps Geocoder. EDIT 2: I'd like to use v3 of the API as it doesn't require an AP...
I need to find a regular expression that would be able to work around an issue I am having. Query: barfly london Should match: Camden Barfly, 49 Chalk Farm Road, London, NW1 8AN I've tried many, many regex's for this, but none have worked so far. I am considering that maybe I will need to split the search into two separate qu...
Is it possible to intercept when the browser does a XHR? Regardless of JavaScript libraries used? Like setTimeout(function() { // jQuery XHT $('#container').load('foo.html'); }, 5000); When the jQuery.load fires, I want to intercept this and add an url parameter to the request. Thanks in advance for tips and info. Best regards ...
[Sorry for long question but it is necessary to explain the problem] I am working on a learning website and it is supposed to show a list of messages to user if there are any. Something like this: When user presses close button, that message must be marked "read" and should not be shown next time. Following code is used to generate t...
Hi, This code is based on prototype and returns all the input elements that are inside span tags that have .myClass as the class attribute so I can iterate each one. What will be the syntax for JQuery? $$('span.myClass input').each(function(element) {alert(element)}); ...
I've been looking into a way of passing the client ip as well as the userid and password from a JAAS login page to the JAAS login module implementation in my web code. JAAS only allows the user id and password to be passed to the login module. My idea is to have a java script code to append the ip address to the user id and then call t...
What is the most impressive "rich internet application" - which is usually Javascript/Flash/Silverlight - that you have experienced? I find Google maps is like Javascript/Flash voodoo and more specifically Google Streeview wins hands down. But I'm interested to know others. ...
This question ( http://stackoverflow.com/questions/1199467/weird-browser-ajax-error-extra-junk-appears-at-the-end-of-javascript-files-in ) set me thinking ... I know what happens when I dynamically update the DOM on a web, page. At least, there's a tree of nodes representing the document and I can modify it. But where does a browser put...
Does anyone know how I can write a Javacript function which returns true if the browser's Javascript engine has been idle for a certain amount of time? I am happy to use mootools / jQuery etc if easier, with a slight preference for mootools. EDIT: My actual problem: I'm making a call to a 3rd party's API. The call returns immediatel...
I have been toying around with the idea of enabling an html and javascript file to read MS Access database records. I understand that the database will have to sit on the client for the html/JS file to read it. However, after some successful tests, I notice that just the front-end of the Access database has to be available on the clien...
I have two JSON objects in Javascript, identical except for the numerical values. It looks like this: var data = { "eth0":{"Tx":"4136675","Rx":"13232319"}, "eth1":{"Tx":"4","Rx":"0"}, "lo":{"Tx":"471290","Rx":"471290"} } var old = { "eth0":{"Tx":"4136575","Rx":"13232219"}, "eth1":{"Tx":"4","Rx":"0"}, "lo":{"Tx":"471290","Rx...
I have a solution for my question, but I'm trying to get better at regex especially in javascript. I just wanted to bring this to the community to see if I could write this in a better way. So, I get a datetime string that comes from .net and I need to extract the date from it. Currently what I have is: var time = "2009-07-05T00:00:00...
Hi guys, Basically, I'd like to have an input that when blur'd, will check the input to make sure it's in the format... [24hour] : [minutes] So for example 13:00, or 15:30. So I guess I have to split it up into three parts, check the first bit is between 0 and 24, then check it has the semi-colon, then check it has a number between 0...
I need to display an imagemap with about 70 areas in it. The area of the imagemap the mouse cursor is currently at is supposed to be highlighted in a certain color. Is this possible and if yes, how? ...
I am populating a select box from jquery $.post(); The option values returned from the post have one option with " selected='selected' " but rather than setting the control to this option the last option in the string is selected and displayed. The last option has it's selected property set to true but firebug shows the selected text a...
if I have a hostname as: http://sample.somedomain.com and in Javascript I do window.location.hostname would I get "somedomain.com" or "sample.somedomain.com" ? If not, how would I be able to get sample.somedomain.com? ...
I am developing my website using jQuery. For the Private Messaging feature, what I had right now is showing a ModalBox(dialog box). So, whenever user wanna check message, they will be displayed with a dialog box with the inbox shown. Now, inside that ModalBox, I have a "Compose" section where users can send message. My question is, when ...