javascript

AsyncFileUpload has logic error in AjaxControlToolkit, when component in a different tab, so not displayed

I am using the Nov version of the AjaxControlToolkit, and I found a logic error, but I am trying to figure out the best way to fix this, by Saturday, so that the program will work on IE. This problem only has an error on IE, it works on Firefox3.5. I have a AsyncFileUpload component on a tab that appears to not be visible when this fun...

Rails: In-place editor but no postback?

I'm using Prototype in my Rails project to do in-place editing (via Ajax.InPlaceEditor) of a form. However, I don't want it to immediately post back and do the update - the form itself is pretty complicated and the user may decide to abandon their changes. Only now they can't, because the form has invisibly (to them) updated the database...

Replacing dhtml element without using innerHTML

This seems like it should be easy. I have a html snippet that I wish to locate and modify in place via javascript. But not just the innerHTML; I want to replace the entire element. Example: <div class="content"> <div class="item"> <img src="images/pic1.jpg" /> <a class="clicker" onclick="javascript:doSomethingUseful...

javascript and image maps question

I confess, I'm a javascript noob. Part one of my current task is I'm trying to get a .png file to be replaced with another .png when the user mouses over the upper left corner of the first .png. When he mouses off, the .png needs to revert back to the initial .png file. I'm trying to use an image map and java script to accomplish th...

How to check whole website for certain conditions in rendered source of every page , automatically?

Like I want to check on Every page <h3> tag must come after <h2> otherwise page should be marked. like if any page has PDF then Some particular text <p>Download Adobe reader from here</p> should be at bottom of every page is this condition is not matched then page should be marked. I want to make different type of conditions to check ...

How to Split strings in Mozilla Jetpack

Well , i have tried Split("?") and Split('?') both give the same error ( link.split is not a function) , so i assume that there is a way to be able to split in jetpack but not using this Split ? maybe jQuery ? hope someone can help in this issue. Got it , it is a href Split , so yeah as jordan said , it was not a string . so i used x...

SOAP Prototype Ajax SOAPAction Header question

So I am trying to make a request and pass in a SOAP object, the problem is that it comes back fine (onSuccess) but the responseXML is not there. I used Fiddler and HTTP Client (OSX version of fiddler) and input the same requests, boom, both back with the correct response. With prototype, not so much. I tried in the header and in the p...

Problems with javascript/php image positioning system

Hi everyone! I am working on a project which involves moving products around a virtual living room, I have the following function <a href="javascript:void(0)" onclick="sendxandy( <? echo $_SESSION['numberOfProducts']; ?> )">Save Positions of Products</a> and then the function is as follows: ` function sendxandy(productAmount) { ...

What does the jQuery() function in jQuery do?

In this video there is a snippet of code that goes something like this: if (jQuery) {jQuery(function() { // ... })} I've never seen the jQuery() function before (then again, I'm not a savvy jQuery user), what does it do? Does it ship by default with jQuery or is it specific to IxEdit? Since the usual $(window).load() snippet is mi...

how to loop on hrefs ?

so , what i need is to get some links from the following code. I managed to reach the href of the first one by using var link=doc.querySelector('#courses_menu > ul > li:nth-child(2) a'); Now I need all these href's ! by a loop maybe ? here is the source i need to work on. <ul class="tools-menu-ul"> <li class="tools-menu-back"...

Redeclaring function parameters as variables?

I can't seem to find an answer for this anywhere on the 'Net... Is there any reason, advantage, or disadvantage to redeclaring function parameters as local variables? Example: function(param1, param2) { var param1, param2; ...etc... } Seems extremely redundant to me, but maybe I'm missing something...? Thanks, Brian ...

MooTools JSON request

Trying to get a very simple request working with MooTools Request.JSON. After having no success building it from scratch, I took an example from somewhere and slowly pared it down to the bare, bare minimum, then put it back into my own page. The only things changed are the url and element ID, but to no avail. Any help, ideas, will be gr...

Keyboard Shortcuts in Google Chrome / Chromium Extensions

I've created a basic extension for Google Chrome to change the behavior of which tab is selected when you close a tab so that the selected tab is the last one you had selected instead of just the one before the tab you closed. I want to add keyboard shortcuts, and I've found a way to do that using jquery and jquery hotkeys, but the prob...

Pull twitter profile image

Is there a quick way to pull twitter profile image in PHP or Javascript? I need to get the url of the FULL image (not avatar size). Thanks. Any code sample is good. ...

Catch a pdf hyperlink click from an iframe

I'm loading pdf's into an iframe on my web page by setting the src of the iframe to the path of the pdf document. This works as I'd like for viewing the pdf. The problem is that some of the pdf's have hyperlinks in them to external websites which, when clicked, load the external website in my iframe. So my question is: is it possible t...

jQuery .load (or $.ajax) to get and set page title?

So far... $('#container').load(hash + ' #page','', function() { $('#container').fadeIn('fast'); document.title = $('#title').load(hash + ' #title').text(); }); ...doesn't work. Is there a better/correct way to do this? FYI: - I've added the ID #title the tag (all pages/it's a PHP template). The container is .fade(ed...

Java script Gallery - how to show a next image with an arrow - shiftImg(1)

//html file Image slideshow </script>   Loading image. Please wait 1     ...

why isn't my eval turning the json string into an object

When I execute the eval function it doesn't turn my json response into a object it just breaks my code. I've tried parsing with prototype.js and JSON2.js to no avail some please explain what I am doing wrong here? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <tit...

How does phpmyadmin open a small window both in firefox and IE?

When you edit a datetime column via its datepickup,a window pops up instead of a new tab. How to do it? I tried window.open(..) but it just opens a new tab. ...

Converting a javascript nav bar to use ajax?

Hi folks, I may be in over my head, here but I'm in my dev folder so no harm :-D OK. I'd like to start converting over these four tabbed navigation buttons to open content with ajax insted. Without worrying about the content that will open, how do I alter this nav bar to work with ajax? Currently, the navigation section is this: e...