Hi,
I'm trying to assign a different number to different callback functions in jquery.
for (i=o;i<types.length;i++) {
$('#ajax'+types[i]+'Div').html('Loading...').load('searchAjax.php','new=u',function () { $(this).find('select').change( function() { AjaxDiv(i); } ) } );
}
Everytime I run this section of code, i is 5 for each c...
in my project site if i click on a link and the PDF opens in a new or parent window. Well I want a box to appear that prompts the user to download the file instead of opening it. Does anyone know of a simple JavaScript onClick event that will do this? In all browser default with default settings.
EDIT:
sorry my server was PHP based
...
I have several divs with content. Some of the context is wrapped with,
content <a name='SomeName'> cool content </a> more content
In Javascript how do I force the SomeName name to scroll into view for that DIV only. The catch is that there are many DIVs on the page with content.
I have the Div's object known. The Div can contain oth...
Hi all
I have some code in which I am creating an dijit.Dialog with an Ajax call(href property) to populate the contents.
I what to parse the returned content to dojo.connect a click event to the links in the returned content.
But when I do a dojo.query("a",this.current_popup.domNode) I get an empty array back
Does anybody know how c...
var fu1 = document.getElementById("FileUpload1");
how can i get the filename of fileupload control with id FileUpload1
...
Hi,
I'm trying to create a JavaScript hyperlink which links to a HTML anchor. The only thing is, I'm trying to create it in SharePoint within an .aspx page...
I have a hidden table, which I unhide with a JavaScript function, but the table is at the bottom of the page, so I added an anchor next to the table and tried to hyperlink to it....
I want to reset the value of a web page using JavaScript reset function. Which operation is the JavaScript performing first: the reset or a clear? And what is the difference in between the two?
Also, how can I retrieve a value using reset function?
...
Hi All,
I'm trying to create a custom pop-up window using JavaScript which can hold a form, and then use the contents of this form on the original page.
What I have is a large table split into several sections which hold text. Each section has a title and a body (Which are both table cells which unique IDs). I then use JavaScript to pu...
Hi,
Does anyone know of any vbscript / javascript implementations of a RTF to HTML converter?
I have seen some in VB / c#, but cannot find any reference to a scripted version. Before I start to write one - does anyone know of an existing open source project that deals with this?
Many thanks,
Franko
...
Is it possible to remove a dom element that has no parent other than the body tag? I know this would be easy with a framework like jquery, but I'm trying to stick to straight javascript.
Here's the code I've found to do it otherwise:
function removeElement(parentDiv, childDiv){
if (childDiv == parentDiv) {
alert("The parent div c...
For the life of me, I can't see what I'm missing. I had hard-coded the value for selectedIcon in the drawmenu function. It was working perfectly until I changed it to a parameter. I'm getting the following error:
Error: this.call is not a function
Source File:
http://localhost:9090/tests/jquery-1.3.2.min.js
Line: 19
...
Hi all,
I have an XML file, which can be viewed here,(click "Download File" on the page that the link takes you to, and it will open the XML in your default browser) of data concerning a series of music albums, which I would like to load into javascript into an array called "mymusic" in this form:
mymusic = [
{
title:,
artist:...
On my site, I have an ajax call to my server that checks if a certain logged in user has a new message from the database.This ajax script checks the database every certain seconds.And if he/she has a new message, I execute this javascript to create a "div" to display to the user.Here is the javascript:
function shownotice(b) {
divnoti...
I have strange error when calling WebService/C# from javascript.
The server method 'GetGoogleToken' failed.
No details, no stacktrace.
On server, I set breakpoint - everything works smoothly and I am returing string (what could be simpler?)
Also, method works fine when i call it using browser test environment.
Here is method:
[WebMe...
Hiya,
I'm digging around with jQuery for something work related, and I am trying to get a specific flow of events working which I can't seem to get my head around.
I understand how jQuery runs on the front end, functions are called or available to call from within the document.ready area, and have got some animation running on my front...
Hi, I am n00b at rails. The question is very simple, i want to know how can i make a javascript function call inside body tag on the onLoad event.
I'm asking this because in the views i can't find any body or head tag (It's like they are generated elsewhere).
Thanks
...
Hi
I am loading a simple txt file from the same server as the current web page using jQuery - this file will always include a plain number with no formatting - e.g. 123456
$(document).ready(function(){
var test;
$.getJSON('myfile.txt', function(data) {
test = data;
showAlert(); // this call will display actual value
...
I was reading a post by David Walsh on creating a sprite menu with MooTools. I am fairly new to MooTools, and I did not understand the way he opened his script. In particular, what is
(function($){
..
})(document.id)
Is it a type of JS closure?
Here is the full script if you don't want to follow the link:
(function($) {
window.a...
Hi All,
I have a simple (yet somehow convoluted) issue. Basically I'm adding items to make my web app more "desktop-like". For instance, right now I'm trying to get a page to dynamically load info into a DIV based on previously selected items. I'm currently using a cookie to handle saving the data, but I can't for the life of me get ...
I have a php file with a variable $total as one of its variable.
AS part of my project I have to print a table of results.
I call an external javascript whenever i display the table, something like this
echo "<script src='course.js' language='JavaScript'></script>";
echo "<table border='1'>";
echo "<tr>";
echo "<td><td>";
Each row o...