javascript

How to show a child window full-screen mode?

I'm opening a child window through the parent window, and I want the child window to be displayed in full-screen mode. ...

Javascript Syntax Error

var dayNumberCell = doc.createElement('td'); dayNumberCell.className = 'days_link'; dayNumberCell.setAttribute('onclick', function(scope) { var bindScope = function() { scope.changeDate(this, this.id); ...

Variable classname in javascript

Hello, Is there a way to make a variable classname in javascript. In php the next is allowed: $classname = "klasse"; $class = new $classname(); Tom ...

Getting a javascript error in a c# .net WebBrowser component

Hello, I'm having a problem with some of our users getting a javascript error popup when accessing our online store via our software. The software uses a standard WebBrowser control and the users getting the error include those with IE versions 6,7 and 8 and .net 2 and 3.5. The error does not appear when they access the store directly t...

Highlighting whole street with some maps API

Hello, Is there any way to highlight/display on Google/Bing/(any other map provider) Maps whole street (from the beginning of the street to the end of)? I know the existence of Polyline in Google Maps API, but it's just connecting two latitude points, and there is no way of making it automatic so I could display any street in some city...

token_get_all whitespaces behaviour

I don't know if someone can help me, but i'll ask anyway. I'm creating a function like the php token_get_all written in javascript. This function should "tokenize" a given php code, but i have some problems with whitespaces. Executing the token_get_all function in php i see that only some whitespaces are considered tokens, the other one...

What is the best way to read and unzip files in mobile browsers?

I want to read and unzip files in mobile browsers on iPhone and Android, what is the best possible solution. Is there a java script way, I don't want a round trip to server. I need the minimal dependency, so flash is ruled out, any other options? ...

Copy Current Webpage Into a New Window

I need to be able to copy the current webpage into a new popup window for a print preview. There is a grid on the page with children, so if they expand one of the rows to see the child rows, I need to show this in the new window. Is this possible? I currently have the popup window open up the same page, but all none of the rows are ex...

JavaScript to submit form plus a value from map area?

Hi, I'm trying to create a simple search function where a user selects an option from a drop down and clicks on a map to see results for those 2 parameters I have this php at the top of my doc: <?php if ((isset($_POST["MM_search"])) && ($_POST["MM_search"] == "yes")){ $lang = $_POST['lang']; $salerent = $_POST['salerent']; $zone = ...

dynamically add a name anchor tag within dynamic content page

I have a page that lists over 100 items and I need to dynamically add a name="" tags to the beginning of each new section of items that starts with the next alphabet. For example: <a name="a"></a> <h1>Amazon River</h1> <h1>Arrow Heads</h1> <a name="b"></a> <h1>Bear Claws</h1> <h1>Bee Traps</h1> <h1>Dodge Ball</h1> <a name="f"></a>...

How to draw a polyBezier or polyCurve using Canvas HTML

I'm trying to draw a curve through multiple points (more than 3) . I tried to draw those points using available lineTo(), bezierCurveTo(). Could anyone help me solve this ? May be there is some workaround to draw this using arc() function ? ...

Clearing filters in a grid

Hi , I am working on clearing filters in the grid. grid.filters.clearFilters() will clear the filters on page refresh i.e it will uncheck the checkbox and all the records are displayed but the text in the textbox is not cleared How can i clear the texbox value when i hit page refresh. ...

user controls in asp.net prefixing string to child controls causing problem to refer them in javascript

I have user control in which there are text boxes no i am using the AJAX to populate the child controls dynamically however asp.net appending some string to child controls causing problems to write the JavaScript code. Though i have tried getElementLike('key') which iterate elements and get the right one for me but this is really ineffi...

Javascript: Change scrollable element handle size in scrollbar

Is it possible to programatically access a Div's scrollbar handle and change its size? --Edit: Is there a mootools plugin for something like this? I'm trying to implement a lazy pagination mechanism, where a div's content will be updated onscroll, but I'd like the handle on the scrollbar to show the final size. Meaning, if there will...

keyup() bug in Firefox and Chrome ?

$('input').keyup(function(e){ var k = e.keyCode ? e.keyCode : e.which; console.log(k); }); . <input type="text" name="" autocomplete="off"/> Why keyup fires twice but only after second strike for special keys (arrows, space, backspace etc) ? - Are any solutions to fix this issue? - the autocomplete it's t...

Remove css class from element with javascript ( no Jquery)

Could anyone let me know how to remove a class on a element using javascript only? Please do not give me the answer with jquery as I can't use it, and I dont know anything about it. Thanks. ...

ajax memory leak

I am experiencing a slow memory leak in both IE and Firefox using a combination of ASP.NET AJAX and jQuery. My scenario is very similar to the one described here : http://stackoverflow.com/questions/276087/preventing-ajax-memory-leaks except using jquery and asp.net AJAX, not protyotype: I have a webpage displaying data in an UpdatePane...

I want to implement fire-and-forget request for in img src in JavaScript

I'm trying to implement fire-and-forget on an img src=... call from a web page, and am looking for the most solid method. Why? In most Web tracking systems like Omniture or Coremetrics, there is a request for an img src which also happens to carry all the data for the tracking system to record. Like any other image request, the page tri...

How can I disable an <option> in a <select> based on its value in JavaScript?

I have a <select> with a number of <option>s. Each has a unique value. I need to disable an <option> with a given defined value (not innerhtml). Anyone have an idea how? ...

Javascript Large String storing in code vs. storing in a dom object (such as a <pre> , <div>)

I have a large javascript string. var s = '...............'; // this is about 32000 characters long. if you wonder: that bit of javascript is autogenerated. Does anybody know if it is better to store it outside of the javascript For instance in a dom object in the html page and then retrieve it (e.g. var s = document.getElementById(...