javascript

calling iframe function

Is there a way to call a javacript function that is inside an IFrame from the parent ? ...

Will this code work? Javascrpt/asp.net (Code not working)

<td class="style4"> <input type="text" ID="txtFirstName" runat="server" maxlength="50" class="DefaultTextbox" style="width:180px;" value="First Name" onfocus="if(this.value=='First Name') {this.value = '';document.getElementById('spanFirstName').visible=false;}" onblur="if(this.val...

Tracking Right click menu events?

Is there a way to track the right click menu when clicked over a textarea. I would like to know if the user selected cut,copy,paste,select all. Also, I can know when the menu is visible by detecting a right mouse click... But how can I know when it's closed? Thank you. ...

how to get css of a clicked div using jquery?

Can anybody know how to get border-color of a div using jquery. Jquery: $("#divcolor").click(function (){ alert("dsf"); var divcolor = $(this).css("border-color"); alert(divcolor); }); Html: <div id="divcolor" style="border:#333333 solid 1px;" > This is the target </div> In divcolor variable i am not getting anything. ...

Deleting a cookie in Javascript does not work consistently

I have the following code to set, get, and delete cookies: function set_cookie( name, value, expires, path, domain, secure ) { var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie...

Compressing CSS and JS without mod_gzip and mod_deflate

I would like to compress the CSS and JS files on my server to minimise load times, problem. My hosting is with Streamline.net (big mistake, never go there) who will not activate mod_gzip and mod_deflate due to security issues. Does anyone have another way to compress these types of files (and image files too if poss) without going the ...

ASP.Net - Javascript inside AJAX UpdatePanel

I am running into an issue with running javascript from an external javascript file inside of an UpdatePanel. I am trying to get a color picker working inside of a ListView. The ListView is inside of an UpdatePanel. I am using this color picker. Here is what I have narrowed it down to: If I use the color picker on a textbox outsid...

$.ajax not working properly on IE6

Basically, I have something like this: $.ajax({ type: "GET", url: "my_url", cache: true, success: function(data) { /* code here */ }, dataType: 'json' }); This code is working in all tested browsers (IE7/8, chrome, safari, firefox) but in IE6 the success function is no...

Anyway to bring up the 'Open / Save' dialogue for the user?

Not sure if the title makes sense sorry... basically I'm generating Word documents that I wanted to open automatically on the client's machine, but it seems this isn't possible, so instead of just presenting a list and having them manually click on each one, I was wondering if at the very least it could bring up the 'Would you like to sa...

Horizontal Reorderlist in Asp.Net/Javascript

Hello, I want a horizontal reorderlist similar to ajaxcontrol toolkit reorderlist, issue with this list is that it shows only vertical data but i need horizontal data like in datalist repeated direction as horizontal i want to reorder two items with each other. ...

Ajax Grid field grouping

I reasearch modern Ajax Grids capable of grouping rows by fields (into collapsible sections), in a manner similar to ExtJs Grid grouping. Important requirements to such a grid is not only grouping, but grouping (sorting) by multiple fields, e.g. by country and gender. Ideally user needs to be able to select fields to group by (sort by) d...

autogenerate jquery code

We all use and like that to handle click event for button we can just click it and write a handler with server code in C# or vb.net. But if we want to handle client event, javascript comes for help. And I wonder, how can we add designer ability to generate client handlers with javascript or some popular library like jquery. So how I s...

How to REALLY limit the available character for an input field using jQuery?

Hi, I just started adding JS-validation to a signup form and I want the username input field in a Twitter-style (using jQuery). That means that the input is limited to certain characters and other characters do not even appear. So far, I've got this: jQuery(document).ready(function() { jQuery('input#user_login').keyup(function() { ...

bizarre javascript arithmetic behavior (yup... to be expected)

ok, I'm writing a little code snippet to get the ISO date-format value for yesterday. code: var dateString = new Date(); var yesterday = dateString.getFullYear(); yesterday += "-"+dateString.getMonth()+1; yesterday += "-"+dateString.getDate()-1; The above code outputs 2009-111-23. It is clearly not treating dateString.getMonth(...

Javascript .split() a string for each number of characters

I have a variable that holds a number var simpleNumber = 012345678; I want to .split() this number and create an array that would be of each 3 numbers the array should look like this [012, 345, 678] var splitedArray = simpleNumber.toString().split(/*how do i split this?*/); it is part of a getRGB("ffffff") function, so i cant kn...

Addthis javascript button/widget adding space to top of webpage

If you view this page http://www.herkimer.edu/news/view/community_members_complete_jointly_offered_machine_operator_training_progra/ You'll notice a green bar (screen-shot: http://grab.by/1msh) at the very top. It has something to do w/ the addthis widget you'll see underneath the h1 title. If you reload the page a couple times, the ba...

If I have a CSS solution for all browsers except IE then what should be chosen for IE? CSS expression vs JavaScript vs jQuery with plugin?

If I have a CSS solution for all browsers except IE then what should be chosen for IE? CSS expression in IE conditional comments or JavaScript in IE conditional comments or jQuery + plugin in IE conditional comments Which will be less slow in rendering speed? ...

Total Queue Percentage with Jquery Uploadify

I am trying to calculate the total percentage of the queue in uploadify, The onProgress built-in function returns the following: onProgress percentage bytesLoaded allBytesLoaded speed At first I thought the 'percentage' would return the total percentage of the queue. However I later found out that it only returns the percentage o...

Generating dynamic content in Iframe IE 7

Is it possible to generate dynamic content inside Iframe? if yes , how ? I'm having some problems with IE, thank you UPDATE : I'm creating a modal window which plays video, but when I close it it remains playing in IE7 although its hidden but it firefox it stops playing as it should. So I just wanted to try with iframe, thinking maybe...

Need to autosave TinyMCE

Hello, I am looking for some help autosaving tinyMCE. I want to save the content within tiny into its respective textarea after content has been updated. So that when I make an ajax call the content is in the textarea ready to be posted. Currently I have this little bit of code but it only updates the text area when you press a butto...