javascript

How to increase font size based on window width?

I am creating a web based app that will be displayed on a television and other large monitors. I am wanting a quick and easy way to increase the font size to fit the window size. The text is dynamic. Any help is greatly appreciated ;) ...

REGEX - matching ** on at least one line in a textarea

Hi everyone, I have a textarea in which I need to validate that at least one line contains ** at the beginning of it. Examples Line 1 Line 2 Line 3 INVALID Line 1 **Line 2 Line 3 VALID **Line 1 Line 2 **Line 3 VALID Is this possible using Regex? Thanks in advance, Marko ...

Help text for asp:FileUpload or input:file

Hi Guys, I would like to know whether this is possible with input:file URL: http://www.kryogenix.org/code/browser/labelify/ Regards, naveenj ...

HTML5 File API read as text and binary

I am currently working on the HTML5 File API, and I need to get binary file data. The FileReader's readAsText, and readAsDataURL methods work fine, but readAsBinaryString returns the same data as readAsText. I need binary data, but im getting a text string. Am I missing something? ...

Creating CSS/JavaScript tab panels -- with each nav item in the same div as its corresponding content

I need to create a set of CSS/JavaScript tab panels. However, most the examples I have seen put the navigation in a separate DIV from the content. For example: http://webfx.eae.net/dhtml/tabpane/tabpane.html http://www.stilbuero.de/jquery/tabs_3/ Is there an CSS tab example where each tab navigation item is in the same div as its corr...

Stack OverFlow in Plain Javascript

Hi, I am using simple windows.open function to open up a popup window. While teh same is working fine in another page. Basically there is a user control and that user control has simple table. In there I am using a link button where ONClientClick I am using windows.open('some.aspx'). But it is giving error like Stack OverFlow at line N...

Can I prevent #div anchoring on a page when using idTabs for jquery?

Hi, I am using the idTabs plugin for jQuery on my new site. However, when I try to select a specific tab via the url, say http://crnaz.com/a/about/#staff on page load or via tab navigation, the page anchors to the div #staff instead of page top. Is there a way to keep the page anchored to the top on url change? Here's the code (or you ...

How to get web content before visit that web page

hi, how to get description/content of web page for given URL. (Something like Google gives the short description of each resulting link). I want to do this in my jsp page. Thank in advance! ...

Regex won't find '\u2028' unicode characters.

We're having a lot of trouble tracking down the source of \u2028 (Line Separator) in user submitted data which causes the 'unterminated string literal' error in Firefox. As a result, we're looking at filtering it out before submitting it to the server (and then the database). After extensive googling and reading of other people's probl...

Defining variables in jQuery

Can someone explain the difference between using a $ when defining variables in jQuery and not. Does it have any impact on performance? var $someVar = $("a"); var someVar = $("a"); Also, what is the difference in calling variables with and without $(someVar) For example: $(someVar).html(); someVar.html(); ...

How to get external pages into div ?

Hi i tried for including external page in div in my home page but the problem is that external page is developed in ajax means that if we click any link inside that external it doesn't change URL . My problem is that when i included that page in my code using code on link. http://www.javascriptkit.com/script/script2/ajaxpagefetcher.s...

How do I test to see if I am sending a POST request correctly via Javascript?

Here's the particular situation: I'm using a bookmarklet to call a .js that sends a POST request to a PHP file on my server. Here's the POST request in the .js file: var snd = ("qu=" + encodeURIComponent(t) + "&dl=" + encodeURIComponent(dl) + "&dt=" + encodeURIComponent(dt)); xr = new XMLHttpRequest(); xr.open("POST", "http://quote...

include .html in a .html

Hello, I used the script <!--#include virtual="dontate.html" --> to include a .html file into another .html file, but for some reason does not show up. Any reason as to why? I will be using WAMP and LAMP. Thanks Jean ...

How to get clientID if textbox name is in string variable.

I have written below code to check for blank value in my textbox but its generating compilation Error, please provide me solution. my code in javascript: function checkTextboxNotFilled(txtbox) { var txtb = document.getElementById("<%= " + txtbox + ".ClientID %>"); if (GetFormattedString(txtb.value) == "") { ...

Why do people put code like "throw 1; <dont be evil>" and "for(;;);" in front of json responses?

Google returns json like this: throw 1; <dont be evil> { foo: bar} and Facebooks ajax has json like this: for(;;); {"error":0,"errorSummary": ""} Why do they put code that would stop execution and makes invalid json? How do they parse it if it's invalid and would crash if you tried to eval it? Do they just remove it from the strin...

JavaScript this from jQuery this

Is there a way to get JavaScript this from jQuery this? ...

Code works when i put javascript alert in between anywhere.

I have a function that runs on key tab press, it works fine when i put a javascipt alert in between the code, any kind of alert,if i remove the alert it stops working : my function //Function to set the tab feture for focus to work properly on fields with autosuggestion(location and name) function setFocusOnTab(name) { var focusEl...

Debugging of javascript in Textmate

How shall I do for jumping to definition of function of javascript in Textmate? Does Textmate support intergated debugging for javascript? ...

Adding value from one list to another depanding on button clicked

Hi I have two multi lists. In first multi list, i got all the attributes of table by using query then now by selecting one attribute from this list, when i click on "ADD" button i want that copy of this attribute should go into another list. What i have done is i added javascript onclick function for ADD button in that i got the select...

facebox close button on top right corner

Hi All, Hi I'm using facebox plugin to display iframe link. I want to change the style of my close button. I want to show it on Top can any one please help with CSS part. I want to make facebox draggable is it possible to do soo.. Thanks ...