The code is below but basically I have two global variables, then I have a function and then a function within that, I am simply trying to update these global variables from within the nested function so i can then go on and use them in another function! this sounds like quite a straight forward request to me, but maybe it can not be done? When I do an alert on the variables (after I have apparently updated their values) I get 'undefined'!
Code JavaScript: var resultLatB; var resultLngB; function getLatLngFromTown(town, callbackFunction) { var localSearchB = new GlocalSearch(); localSearchB.setSearchCompleteCallback(null, function() { if (localSearchB.results[0]){ resultLatB = localSearchB.results[0].lat; resultLngB = localSearchB.results[0].lng; pointA = resultLatB; pointB = resultLngB;
I have a function which has a nested function in it. I need some variables in the first function to be available in the nested function. How am I supposed to declare a global variable in jquery?
Cycle will handle variable timeouts, and it will handle nested slideshows, but I can't find any code for variable timeouts within nested slideshows. I've tried cobbling together a fix, but it didn't work (don't ask me to explain...it's embarrassing).
how to mate the script for variable timeouts with the code for nested slideshows?
I am attempting to use the return value from a nested ajax function as the value for a variable in its parent. However, despite being able to successfully assign the variable within the nested function, it reverts back to its original value after the child function has terminated. Below is the code:
I'm wondering, I've looked at several examples of this, but none seem to work. I can get POST functions to work (posting data to a certain URL is no problem). However, I can't get the source code of a page. Here's the function I've got so far:
Code:
I'm wanting to use this to use certain settings in the script on my web site that I have stored on another page. The usage is like this:
Code:
And then googlesource should be populated with the source code of [url]. Just an example. why the above function is not working? I've tried messing around with all kinds of request headers and everything.
I have the below code to block the view source but its not working for me. <html> <head> <script language="javascript"> function onKeyDown() { // current pressed key var pressedKey = String.fromCharCode(event.keyCode).toLowerCase(); if (event.ctrlKey && (pressedKey == "c" || pressedKey == "v")) { // disable key press processing event.returnValue = false; } } // onKeyDown </script> </head> <body> <DIV align=center> .....
I create an iframe in script and load it with this code.
[Code]...
This should force the loading of the savepages.php file. In that file I do an echo to verify that it is called.
[Code]...
The objective is to call that php function. The javascript function is called. I don't know if the element is actually created. Unlike php javascript doesn't put anything in the source for us to verify. I don't have ajax. How can I make the javascript function call create an element that loads the php file and causes the code in that php file to execute.
I got some code that loads divs from other web pages into a particular div in my main page. In other words, I click on a button, and this tells jquery to load afragment of a particular page into my main page. For instance if I have 5 web pages onrock stars, I could have 5 buttons, and each button could load one rockstar's biography into a div on the main page (and replace whatever was there before). This works, and I do see the content that it loaded. But when I do 'view source' in IE, I do not see that content (the bio of the rock star). Another clue that this content is not really there, is when I try and run some code on that content. The content (from those external pages) have divs with specific names, and I try and make them into collapsible panels by running the following short function:
I want to do exactly as mentioned on the title. You can consider this like surfing pages in traffic exchangers or PTCs. The functionality is exactly like those, though it is not for those.
This is what I have now.
Code HTML4Strict:
Currently, it shows "Page has been loaded" before even showing the "Please wait" part.
When the tabs are initialized by this code:$( "#tabs" ).tabs(); , it displays the tabs in a way that I don't like. I want to trace into the actual 'tabs' function when this is called so I can see why it is doing what it is doing. I have not been able to find where this code is sitting.
i don't know so much about jquery so just i use them with indication from their web site. so my problem is how can i use multiple source of jquery without one source stop the other,and that what i need:
recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source."
this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before?
I'm attempting to make a simple hover image gallery with a static large image which swaps with a thumb on hover. However, on hover what happens is the new image comes up as the large image and if I then hover over another thumb it replaces that thumb with the original bigpic image source.
I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content.
Below is as far as I tried to get on my own,
var as,ae; as = document.getElementsByTagName("img"); for (var i = 0; i < as.length; i++) { ae = as[i]; ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail"); } })();
I'm trying to make a web page with tabs which you can navigate between without the page reloading. I have one set of tabs working great, but when I add nested tabs there is a problem with the 'visibility' not being inherited and some parts stay visible in the sub-tabs. Sorry if this is unclear.
Here's how I have it layed out: I have a <span> for each content section of a tab. Then I have do the same thing for the content of each inner tab. When a tab is pressed some javascript code goes through and makes all content sections hidden and the content section for the tab that was pressed visible. If I select a tab and then select an inner tab it looks like is should, but when I try and select a different tab for the outer tabs the content for the inner section doesn't go away. I've found that this is because visibility is not inherited. My question is if anyone has a solution for this problem. I'm sure there is somebody that knows of some javascript trickery to do this.
This code uses a nested IF statement to put a pack of cards into an array of records. But for some reason the cards arn't going in.. like.. at all? I've put a document.write piece of code at end to display the card in the first slot and [object Object] appears? Code:
I'm a greenhorn in SVG and javascripting but I'm learning by doing. So, here my current problem question :
I have a svg document embedded in another svg document. I whant, through functions in an external javascript file, manipulate objects in either the child svg document or the parent document. How do I get access to elements of the other document ?
Example : I have a document "A" containing X/Y - Axis and included another svg document "B" with the graphs.
I whant now, as soon as the mouse cursor is over a graph in document "B" the belonging lable which is located in the parent svg document "A" to change color or size.
Or I whant the graph in "B" to start blinking as soon as the mouse is over the lable in "A".
I don't know how cross document borders.
Can anyone give me a short exapmle to get me going?
i have a nested loop in Javascript and i have a break statement in inner loop. As break statement takes control come out of inner loop. I want to come out of both loops if break statement reaches in inner loop. is there any way to do that ??
Our application has a main window (call it window_1) which opens a popup to display application data (call it window_2). This popup in turn opens a 3rd popup with additional application data (call it window_3). This 3rd popup window should reload window_1 when it loads without reloading window_2.