javascript

JQuery BlockUI - How to unblock UI after file download?

Using ASP.Net, JQuery and BlockUI, I'm trying to unblock the UI after a download file dialog is shown. I block the UI when export button is clicked: <script type="text/javascript"> $(document).ready(function(){ $('#<%= BtnExport.ClientID%>').click(function(){ $.blockUI(); }); }); ...

How to bring focus to a window in jquery?

I am trying to bring focus to window using jquery. The window is popup initiated through a button click on the parent page. I have some ajax calls going on in the child window, so data is being updated. My issue is that if the user clicks on the parent window and hides the child behind it, i would like to bring that child window back ...

Creative ideas for display large amount of text on web page

I have a 2 column table in a database 1,000 rows long(All integer data). The display will allow for the user to delete a certain range of data from the table. What I am looking for is a creative way to display all the data so the user can get to different parts of it really fast. Maybe displaying different chunks at once, represent wit...

change one value in style attribute by JS?

I have a div defined with a style like this: <div id="div1" style="width:600;height:600;border:solid 1px"></div> How can I change the height of the div by Javascript with a function? <script type="text/javascript"> function changeHeight(height) { var node = dojo.byID("div1"); // change height? } <a href="javascript:changeHeight...

How to disable postback on an asp Button

I have an asp button. It's server-side so I can only show it for logged in users, but i want it to run a javascript function and it seems when it's runat="server" it always calls the postback event. I also have a regular button (<input...>) not running at server and it works fine... How can I make this button only run the javascript a...

Why is firebug telling me my JavaScript array is undefined?

Just started working on a basic grid analysis algorithm in JavaScript but I have come up against an error that is perplexing me. var max = 9; var testArray = new Array( ['7', '3', '9', '6', '4', '1', '5', '2', '8'], ['1', '8', '2', '7', '5', '3', '4', '6', '9'], ['9', '5', '7', '3', '8', '2', '1', '4', '6'], ['3', '1', '4', '9',...

Position iframe content above all content

I need to display an iframe when a user clicks on a link on header of page. How do I make sure the iframe is always on top of all content? CSS z-indexs don't work effectively in this case. ...

Why does document.getElementById('hyperlink_element_id') return the value of the hyperlink's href attribute?

I'm trying to grab the Web.UI.WebControls.HyperLink object itself via javascript so that I can modify its ImageUrl. Here I'm setting the hyperlink's NavigateUrl to the my javascript function call: lnkShowHide.NavigateUrl = String.Format( "javascript:ShowHideElement('{0}');", lnkShowHide.ClientID ) Here's my javascript function: ...

How to create screen scraping? "i want to know just the cycle"

I want to make a screen scraping exactly the same idea as this one http://www.vimeo.com/1626505 What i want know is how to do so? - When the user click on the bookmarklet, it will send to my server the URL then my server will get back to the client page with the scrapping javascript files which will load with the iframe load, the java sc...

Where is dojo.charting libary on AOL site?

I am testing dojo charting library. I prefer to use the library from AOL web page instead of installing dojo into my computer. I have the following codes: <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.2/dojo/dojo.xd.js"&gt; </script> <script type="text/javascript"> dojo.require("dojox.gfx"); dojo.require("do...

Markdown for .NET? How does SO render it on the fly?

I'm just getting into Markdown and think it's the bee's knees. I'm working in ASP.NET (MVC) and am wondering if there are any good .NET libraries for Markdown, and am also curious how SO renders it on the fly. It must be a JavaScript library. ...

HTML table with fixed headers and a fixed column?

Does anyone know a CSS/Javascript technique to display a long html table such that the column headers stay fixed on-screen and the first coloumn stay fixed and scroll with the data. I want to be able to scroll through the contents of the table, but to always be able to see the column headers at the top and the first column on the left. ...

add param value to all the object

hello i want to add param value to all the object in a page. like param name="wmode" value="transparent" to all the object. how can i do that ...

Auto-complete text field

How do I make an autocomplete text field like the one here at Stack Overflow for the Tags fields? I want to use it for my Rails app. ...

How to quickly clear a Javascript Object?

With a Javascript Array, I can reset it to an empty state with a single assignment: array.length = 0; This makes the Array "appear" empty and ready to reuse, and as far as I understand is a single "operation" - that is, constant time. Is there a similar way to clear a JS Object? I know I can iterate its fields deleting them: for (pr...

Loop through Json object

I have a JSON object like the following var p = { "p1": "value1", "p2": "value2", "p3": "value3" }; Now I want to loop through all p elements (p1,p2,p3...) and get their key and values. How can I do that? I can modify the Json object if necessary . My ultimate goal is to loop through some key value pa...

sIFR 3: Background Transparent?

hi, i'm working on using sIRF for the first time as a way to implement specific typography on a website. it's all working nicely but i have one problem, i want the background to be transparent. i've looked thru the sIRF wiki and im not sure if this is something that is possible.. does anyone know of a way to do this? i have a test pa...

TinyMCE: packaging all the files instead of dynamically loading them... possible?

I'm trying to get TinyMCE to work. I've tried it using the normal method of including tiny_mce.js and then using tinymce.init(...) and it works. I then tried tiny_mce.gzip.js + php compressor and it worked but it was really slow. Now I already package up my CSS and JS files into one of each with all my files concatenated together. In th...

can i write a java logic in a javascript code?

Hi i am newbie to j2ee application. Can you please advice whether i can write a java logic inside javascript and if yes how. I dont have liberty to make new class and redirect it there on click of button ...

Can I delete file from temporary internet files in javascript?

I have a page which needs to download an image file on onload event but, for all page calls! Now, it downloads the image in first call but in second call it gets from temporary and that is not the thing I want. I need to make some calculations for each load. So I want to delete the file that I download on each load from temporary or some...