I am having trouble figuring out how to use the JQuery delegate function to do what I require. Basically, I need to allow users to add Panels (i.e. divs) to a form dynamically by selecting a button. Then when a user clicks a button within a given Panel, I want to be able to to something to that Panel (like change the color in this exam...
is this javascript function (checkValidity) correct?
function checkTextBox(textBox)
{
if (!checkValidity(textBox.getValue()))
displayError("Error title", "Error message", textBox);
textBox.focus();
}
function checkValidity(e)
{
var email;
email = "/^[^@]+@[^@]+.[a-z]{2,}$/i";
if (!e.match(email)){
...
Is there a way to convert it into object form? So that each field of the result can be accessed results[i].field
where i is the number of records in the mysql result..
This is my JSON String
http://pastebin.com/Cky1va3K
...
I am on the stage where I need to make my website cross-browser compatible.
I need tips on how to get started.
I have developed my website on firefox, so it works great with firefox.
I guess I have to download a couple of versions of all major browsers now, right?
Then just test each browser one by one?
Should I do this before uploadi...
I have a page that fires several xmlHttp requests (synchronous, plain-vanilla javascript, I'd love to be using jquery thanks for mentioning that).
I'm hiding/showing a div with a loading image based on starting/stopping the related javascript functions (at times I have a series of 3 xmlhttp request spawning functions nested).
div = doc...
Until all browsers support the onhashchange event what is the best workaround for this?
Is there something for this in jQuery? or as a plug-in?
...
Hi, I'm creating a chat widget that will be dropped into CommunityServer. The widget works great, but I just discovered that if I drop two of these widgets onto the same page, only one of them works! And I'm quite certain the reason is because the chat window is defined in ASP, and now there are two instances of the chat window, with t...
I am having an issue with a slider (implemented using Prototype) and IE7. Upon the slider value change I update a with the value such as "420,000".
Now on all browsers other than IE7 this is display correctly. But on IE7 it is displayed as "420.000" ..
my question is how did the "," become "."
the page has UTF-8 meta tag.
Any help?...
Hi, i am detecting images on my webpage with javascript document.images function which returns an rray of images. Is there any way to get the mime type of the image from this since i am not using any extension names on images which are loading?
...
Which software is recommended?
I know of Adobe Browser Lab only, and it seems pretty new... Is there any better SW out there?
Thanks
PS: I have a classifieds website (PHP, MySql, Solr, js) developed on local computer using virtual server etc... Now I need to test it on different browsers. It is developed only with Firefox, so it works...
I have two divs i need to perform toggling between two divs
while doing this some of the divs in my main div are displaying even if i use hide() function this happens only in ie7
function initMakeAPost()
{
$('questionheaderid').hide(); //hiding the questions section
$('MP_questionofday_txtboxid').hide();//hiding the questi...
Perhaps my brain is fried, but I'm writing a plugin that created an tweaks an element, but also creates an object that i'd like access to. So the plugin looks like this
(function ($) {
$.fn.myPlugin = function () {
return this.each(function () {
// do some stuff to the element...
this.objectInstance = new use...
I need to fire a one time only custom event that functions like the domready event, in that if new events are added after the event has occurred they are fired immediately.
This is for some code that cannot execute until certain data and resources are initialized, so I want to do something like this:
// I am including a script (loadRes...
Is there a way to replace inside the DOM of a page using the replace() in javascript
In the source code I want to replace:
<div class="topbar">Bookmark Us</div>
to
<div class="topbar"><span class="larger-font">Bookmark Us</span></div>
When a Google Chrome extenstion is on the matched website of a URL and it will do the above.
Any...
Hello,
I have been doing more client-side development, managing the UI on the client and submitting data to the server via web service calls. I'm not looking for implementation details, but was curious on developer preferences for displaying an operation in process and what to display when completed or even failed.
As a for instance, ...
This might not be possible but before I rewrite part of my application I wanted to ask...
I have a JavaScript app which creates a submit <input> and observes that input's click event using Prototype's Element#observe function. For a few particular pages on one particular site which uses this app, I need to apply some additional busines...
Newbie ajax question from this example:
How is xmlhttp.responseText assigned before xmlhttp.open() and xmlhttp.send() ? (If we need the data from demo_post.asp)
I understand it is in the onreadystatechange but if the javascript is read from top down I do not understand. Thanks, and go easy on me!
...
Hello
I am new to JS and AJAX, but I have to do my homework. I choose jQuery, so it little easy now.
I want to get a html via AJAX request, but in result it looks, ex:
<fieldset id=\"item4\" class=\"item\"><legend>Odno\u015bnik 4<\/legend>
I set response content-type to text/html. When I outputting result on server everything is ok....
Hi,
I have a multidimensional array, the primary array is an array of [publicationID][publication_name][ownderID][owner_name]. What I am trying to do is sort the array by owner name and then by publication_name. I know in JavaScript you have Array.sort(), into which you can put a custom function, in my case i have:
function mysortfunc...
Could you confirm I understand this correctly.
However, always use POST requests
when:
- A cached file is not an option (update a file or database on the
server)
Using POST, the file specified in xmlhttp.open("POST","ajax_test.asp",true);
will not be cached (sent to \Temporary Internet Files) ? It will stay on the server...