javascript

What javascript/jquery tree view plug-in is most used?

What javascript/jquery tree view plug-in is most used? ("Treeview" seems to come up often in searches.....) Thank You. ...

Have a div cling to top of screen if scrolled down past it

I have a div which, when my page is first loaded, is about 100px from the top (it holds some buttons etc. for the page). When a user scrolls past it, I would like the div to "follow" the user in that it attaches to the top of the screen. When the user returns to the top of the page, I want it back in its original position. Visualizati...

Is there a way to loop through all fields in a fieldset?

I would like to change the class for all the fields in a specific fieldset. Is there a way to loop through the fields in a fieldset? ...

getting QueryString by Javascript

Hi, How to extract QueryString from the URL in javascript? Thank You! ...

Figuring out if overflow:auto would have been triggered on a div

Hi folks, // Major edit, sorry in bed with back pain, screwed up post One of the ad agencies I code for had me set up an alternate scrolling solution because you know how designers hate things that just work but aren't beautiful. The scrolling solution is applied to divs with overflow:hidden and uses jQuery's scrollTo(). It's a set of...

Need help, stuck on "How to send text message using JavaScript to avoid post back"

This is what I have implemented, for further code, how to send the text of the text box to the server to store in variable or database without post back? It can be done by using Ajax and update plane, but I would like to implement it using a JavaScript script. <div id="CommentID" style=" width:30%; height:30%"> <asp:Button ID="Butto...

Javascript returns Nan in IE, FF ok

im very new to javascript, and writing this script to add up a shopping cart and print out subtotals and totals. it works in FF but not in IE. this function is called by onclick of one of three select options with a value of 0-25. it is in a js file called in the head. what it does is get the selected values as variables, parseint the...

Activating or Selecting a worksheet dynamically

Hello All, I'm dynamically creating a excel file using vbs and ExcelXML in javascript. Something like this. acdbCon.OpenConnection(); rs = acdbCon.GetRecordSet(GetQryABC(a,b,c)); workbookObj = new WorkbookXML("abc"); xmlBody.append(workbookObj.AddWorkbook().join("")); xmlBody.append(workbookObj.AddStyleSheet().join("")); abcObj = new a...

Problem removing a dynamic form field in jquery

I'm trying to remove a dynamic form field by click a button. It will also subtract whatever values it had from the total amount from my calculation. This is the code: function removeFormField(id) { var id = $(id).attr("name"); $('#target1').text($("#total" + id).map(function() { var currentValue = parseFloat(document.get...

jQuery: Stacking divs and cycling?

Is there any plugin out there that will let me place divs on top of one another and allow me to cycle through them? Something like this: -------------- DIV 2 | -------------- | DIV 1 | | | | | | | | ...

getting BR-separated text via DOM in JS/JQuery?

Hi all, I am writing a greasemonkey script that is parsing a page with the following general structure: <table> <tr><td><center> <b><a href="show.php?who=IDNumber">(Account Name)</a></b> (#IDNumber) <br> (Rank) <br> (Title) <p> <b>Statistics:</b> <br> <table> <tr><td>blah blah etc. </td></tr></table></center></table> I'm specifically...

Can I set how long a popup window has focus?

I have a side navigation bar and when you click the links it submits a form. The forms action opens another page ( target _blank). My problem is I have to open a popup window before this blank page opens and keep it open long enough for the user to read it or atleast see it first and close it if they wish. I created a function that opens...

Truncate text if it atempts to run into three lines

I have a small <p> about 140px wide aligned next to a picture. In total there is space for four lines of text. The first two lines are reserved for the title and there are two lines of other info. I want the title to be cut if it spans more than two lines else it will push the other info out of line with the bottom of the image. The on...

Making firefox refresh images faster

I have a thing I'm doing where I need a webpage to stream a series of images from the local client computer. I have a very simple run here: http://jsbin.com/idowi/34 The code is extremely simple setTimeout ( "refreshImage()", 100 ); function refreshImage(){ var date = new Date() var ticks = date.getTime() $('#image').attr('src',...

A simple secenario to implement JavaScript ASP.NET C#, question rephrased

I had asked this question before, but I got no correct answer. So, this is a simple thing: textbox.text='user typing'; Button: store the value to a variable and a database. Very simple, nothing to it. But there should be no post back, that is the page must not load again. Try Ajax? I tried it, but it is not working. I lost a lot o...

How to call a FileReference.browse() from JavaScript?

Hello, I am trying to call the browse() method of the FileReference class from JavaScript (a user clicks on a text that uses the ExternalInterface to call a method in Flash). Unfortunately, I receive an error that tells me it has to be a direct action of the user (like clicking a button). I have searched through Google and realized thi...

My javascript drop down navigation menu displays behind content in internet explorer 7

OK, so I'm working on a redesign and we've got most of our cross-browser CSS compatibility bugs worked out - except for a glaring one with ie7. The issue is that we are using a JavaScript for a navigational menu drop down. In all browsers except the noted culprit everything functions as expected. However, in IE7 I'm getting the drop d...

How can I create and call a javascript function on a dynamically loaded user control?

when i try to call a javascript function in a dynamically loaded user control, it cannot find the function specified. I have a user control for organizationDetails.ascx. In there, I am using modal popup extender to get some information from the user and then i verify the address through google and suggests the proper format. I am trying ...

javascript date.utc problem

I'm trying to compare 2 dates using javascript. 1 at the end of the month and 1 at the beginning. I need to compare these 2 dates in seconds so I'm using the Date.UTC javascript function. Here's the code: var d = Date.UTC(2010,5,31,23,59,59); document.write(d); var d2 = Date.UTC(2010,6,1,12,20,11); document.write(d2); The output fo...

Doubt about a particular pattern of Javascript class definition

Recently i saw the following code that creates a class in javascript: var Model.Foo = function(){ // private stuff var a, b; // public properties this.attr1 = ''; this.attr2 = ''; if(typeof Model.Foo._init === 'undefined'){ Model.Foo.prototype = { func1 : function(){ //...}, func2 : function(){ //... }, ...