Hi guys,
I have this piece of code in javascript:
var catId = $.getURLParam("category");
In my asp.net and c# code for "category" query string i use a public const:
public const string CATEGORY = "category";
so if i want to change the query string parameter to be "categoryTest" i only change this const and all the code is updated...
How do i unset an array in javascript?
i just want to empty it - so it has nothing in it keys or anything
...
Hi guys.
I'm working on this project and I have to open a new browser tab. Actually, I have to open a target="_blank" link without the link. I know is not right to interfere with the user preferences, but hey, this is the project requirements.
So, long story short, i have to replicate the target="_blank" behavior only with javascript.
...
Hi,
i'm loading, using the JQuery ajax() method, an external page with both html and javascript code:
<script type="text/javascript" src="myfile.js"></script>
<p>This is some HTML</p>
<script type="text/javascript">
alert("This is inline JS");
</script>
and setting the results into a div element, using the html() method.
While ...
this is my google-map code:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,min...
What is the proper refresh rate to balance quality and not crashing the server?
...
I am implementing CodeMirror (http://marijn.haverbeke.nl/codemirror/) on a page where document.domain needs to be declared (because of other IFRAMES on the page).
CodeMirror generates a dynamic IFRAME to provide syntax highlighted code editing. The problem is that IE throws up 'Access Denied' (other browsers are fine) at the following p...
How to find the parent of an ASP.NET TreeView node in JavaScript?
...
I use TiddlyWiki for work-notes. I already have pretty large wiki, but now I want to add math-support. As far as I understand what is written here, all I would have to do to use ASCIIMathML in my wiki would be including the script ASCIIMathML.js. Doesn't work (no effect at all). Then I found this plugin for TiddlyWiki, but when I import ...
I have the following task:
Input:
A 3D scene comprised of a set of cuboids. Could be broken down to a set of triangles.
A description of a camera: position, direction, focal length.
Output: 2D wire frame projection of the scene as a set of lines. Important: Hidden lines removal should have been applied.
Platform: Web app running on G...
I have HTML page with some HTML element with ID="logo". I need to create JS script (with no external libs calls) that will overwrite that html element with other HTML element like "<div id=logo> stuff inside </div>".
...
I run the following html snippet in IE8 and IE7 with non-English characters (we tried both Hebrew and Chinese), and the second link never works properly.
The displayed text in the alert box is mangled.
This occurs in IE8 and IE7, but not in firefox. It is not dependent on Windows's regional settings.
Here is the html snippet (html heade...
Hi,
I'm trying to extract data from one of my websites using Greasemonkey. Problem is, the script runs 6 times because apparently the page loads content from 6 different servers.
So if I put in an alert ("Hey"); the code runs 6 times and I get 6 alerts.
How can I wait for the entire page to load and then start playing with the DOM. A...
Hi,
I've a Java String with new lines(\n), say for example
String value = "This is a variable\n\nfrom\nJava";
Now I've to set this to a Javascript variable in a JSP file,
<script>var val = '<%= value %>';</script>
But because of the new lines in the above line, I'm getting javascript error "Unterminated String".
Please help me.
...
Hi all!
I have a page that is using jQuery tabs. Within one of my tabs I have a div that contains a form (initially hidden) that I want to use to add content to the tab. What I have works perfectly in Chrome, Firefox, and Safari. But, in IE 7 the tab will not refresh. The post works and the data gets added to the database, but it si...
I have an interactive flash app on my website - the app and the website are both under my control, so I can edit both of them (that is, this isn't a user-submitted content site, where I could maybe only control the game content, or just the website).
This is the flash app's embed code:
<object name="flashApp" classid="clsid:D27CDB6E-AE...
So, I am learning Javascript while playing white Google Calendar APIs and I just can't figure how this piece of code is working this way:
var entriesResult = [];
var data = new Date(2010,3,22,17,0,0);
var callback = function(result) {
var entries = result.feed.getEntries();
if (entries.length != 0) {
entriesRe...
I'm trying to implement a hook when text is edited in a bespin embedded instance. Ideally, I'd simply like to know when the instance has gained or lost focus to capture the user action.
...
Through JavaScript I am appending one query parameter to the page url and I am facing one strange behaiviour.
<div>
<a href="Default3.aspx?id=2">Click me</a>
</div>
$(function () {
window.location.href = window.location.href + "&q=" + "aa";
});
Now I am appending &q=aa in default3.aspx and in this page the &q=aa is getting a...
I want to add a slide show of pictures from one my photo albums from flick/picasa.Is it possible to fetch the images javascriptically on the page and then show them using jQuery(that i can do :) )
...