how can i use a variable of one <script> in another <script> in javascript?
how can i use a variable of one in another in javascript? ...
how can i use a variable of one in another in javascript? ...
When ever I do onchange event, its going inside that function its validating, But focus is not comming I am using document.getElementById('controlid').focus(); I am using Mozilla Firefox and Google Crome, in both its not working. I don't want any IE. Can any one tell me what could me the reason. Thanks in advance Here's the code: var...
function now(){ return +new Date; } questions : what does the plus sign mean? when can you create a new object with a constructor function but without the following parentheses, such as new Date but not new Date() great thanks! ...
i'm new to object oriented javascript. i want to be a javascript guru. so i leant oo-related concepts in javascript, such as scoping, scope chain, execute context, colsure, anonymous function... but when i try to practice my javascript knowledge to read jquery source code. i still can't understand a lot of it. anyone can give me some sug...
I am running thickbox and jquery ui draggable both on the same page, and they are conflicting. Jquery UI Draggable allows me to drag and drop things from one place to another with this code: $(".droppable").droppable({ drop: function(ev, ui) { do stuff } }); Thickbox starts on a click event, with essentiall...
I'm trying to use document.getElementById().innerHTML in a JavaScript to change information in a webpage. On FireFox this works as described in the W3C documentation, however, the same method returns 'Unknown Error' in IE. The JavaScript looks like this: function Change_Info (ID, ROW, VALUE) { if (document.getElementById) { ...
How do you encode a javascript object/hash (pairs of properties and values) into a URL-encoded query string with YUI (2.7.0 or 3.0.0 Beta) ? I want to do the equivalent of Object.toQueryString() from Prototype: I need this to encode parameters for GET and POST requests with YAHOO.util.Connect. It turns out YAHOO.util.Connect has a set...
Do browsers (IE and Firefox) parse linked javascript files every time the page refreshes? They can cache the files, so I'm guessing they won't try to download them each time, but as each page is essentially separate, I expect them to tear down any old code and re-parse it. This is inefficient, although perfectly understandable, but I w...
Is there a jQuery way to perform iteration over an object's members, such as in: for (var member in obj) { ... } I just don't like this for sticking out from amongst my lovely jQuery notation! ...
I may be asking the impossible but let me set out my problem: I have a menu in a MasterPage which uses images and mouseover mouseout events for design purposes. On one of the menu options I need to display a set of sub menus options on the click of the parent menu item. The menu item itself also needs to navigate to a specified url. I...
I want to show a MS Word environment in an Iframe without all the toobars. The document that is being showed contains input fields. After these fields are filled in, the document must be printed. I have created the print button and want the (filled in) document printed when this button is clicked. I hope you understand want I want and h...
hi when I get a text from a textarea in html like this wase& ;#101;m the correct decode is waseem notice the newline , when I decode it I get wase&;#101;m the newline make errors here , Can I fix it ? I use javascript in the decoding process . I use this function in decoding function html_entity_decode(...
I am using resize event, but when scroller appear - it change window size, but event is not called. ...
Today I stumbled upon the possibility to access a DOM element in Javascript simply by its id e.g. like this: elementid.style.backgroundColor = "blue" I tested with a very short snippet if this works in IE, Firefox and Chrome - and it does. Here is the snippet I used: <html><head> <script> function highlight() { content.st...
Hello, We have a web application that gets its data from a certain database. The product writing to that database has been localized to RUSSIAN, thus its data, in particular the dates had been localized too. We encountered a problem where our DATES would not show on our application. We traced the problem to an invalid Date.parse() java...
I need to obtain the text from the system clipboard in HTML JavaScript, in a way that it works on all browsers. Some form of clipboard.swf is sometimes used on many sites to copy text into the system clipboard. How can I do the reverse, i.e. obtain the system clipboard's text in JavaScript via ActionScript code in a 1x1 swf file that I ...
To be specific, I'm talking about avoiding this type of code: <input type='text' id='title_33' class='title' onfocus='updateCharsLeft(33);' onkeypress='updateCharsLeft(33);' /> Here I would like to put the onfocus and onkeypress event handles separately, i.e in a .js file. Like this: $(document).ready(function() { $(".titl...
hi , using obj.innerHTML = "abcxyz <[email protected]>" getting ouput: abcxyz the rest part is getting ignored because of angle bracket(<>). so how to achieve the same. thanks in advace ...
I am using jquery to keep the focus on a text box when you click on a specific div. It works well in Internet Explorer but not in Firefox. Any suggestions? var clickedDiv = false; $('input').blur(function() { if (clickedDiv) { $('input').focus(); } }); $('div').mousedown(function() { clickedDiv = true; }) .mouseup(function() {...
how do i call the doSubmit() function from the conFirmUpload() when the confirm msg box is true? <script type="text/javascript"> function confirmUpload() { if (confirm("Are you sure want to upload '" + document.getElementById("txtWS").value + "' ?") == true) { return true; } else re...