javascript

Process the file before uploading it

I got a form with SWFUpload. Files uploaded to the server are converted server-side (video being compressed, images being resized etc) Question is - can i delegate some of the functionality to client-side (like image resizing), to save some bandwidth for user. ...

Can Response.Redirect and OnBeforeUnload play nice together?

Does anyone know how to detect in a OnBeforeUnload event that the server side code sent a Response.Redirect? I want to prompt a user to keep them from moving away from a page before it's time, but when the server redirects I it shouldn't prompt the user. I'm working with legacy code that extensively uses Response.Redirect and I'm not i...

Javascript ShareThis Link Disappearing On Postback

Hi, I have a ShareThis (http://www.sharethis.com) link in the footer of my Masterpage. The code they provide generates the link via Javascript. My site is very simple so far (http://www.quotidianword.com), just a place to put your email. But when the email is entered, there is an AJAX postback and the link disappears! Is there any way to...

jQuery Ajax call very slow in IE, but instant in Firefox

I am performing a jQuery .ajax() call that returns a List<string> of IP addresses on a specified subnet. I use a [WebMethod] on an .aspx page to return the values. ASP.NET's built-in JSON serializer does the magic to return the actual JSON used in my Javascript. I have profiled the the server-side time, and it takes about 8 msec to po...

how to get parameter like mysite.com/myaction/#someanchor with php and javascript

For example I hide comments by default. So if I find #comments I will be know that I need to show them up. Is that possible to catch with php or javascript on page load? ...

javascript: history.go(1) required to preserve ASP sessions?

I've inherited a Classic ASP app, and the former author claims that: BODY onload="javascript: history.go(1);" is required to keep the site from "losing sessions" Has anyone heard of this quirk? I can't fathom it. ...

ASPX server-side function call after client-side user confirmation?

Maybe I'm searching with the wrong keywords, but I can't find a solution to this. I've got an ASPX page on which, within an <asp:Repeater> I want to insert a button (per item) that will: ask (JS "confirm") the user if they really want to proceed, then call a method on the page class passing in the ID (Guid) from that item. I can do ...

Closing an aspx page after redirect to a clickonce application

I have code in code behind portion of my aspx page. On a button click a function gets called so that a clickonce application loads. Originally I was doing all of this in javascript. The js set the window.location to the url of my clickonce application, and close through a timeout. This worked fine until I installed the application on ano...

Testing private functions in javascript

I'm using the module pattern in Javascript to separate my public interface from the private implementation. To simplify what I'm doing, my code generates a chart. The chart consists of multiple parts (axises, labels, plot, legend, etc.) My code looks like: var Graph = function() { var private_data; function draw_legend() { ... } f...

How to create a form in SharePoint that modifies query string

My request is simple. i want to put a form (a text field let's say) on a sharepoint page, with a submit button. when i submit. I want the URL to be reposted with the s="textfromtextfield" say i was on a url http://site/site.aspx?p=x clicking submit will take me to: http://site/site.aspx?p=x&amp;s="textfromtextfield" ...

how to make a DIV unfocusable?

I met a problem about HTML rendering. In dir="rtl" document of IE7, when JavaScript tries to set focus to a DIV element(with oElement.focus() method), the rendering turns to mess. The context is very complicated, so I suppose the easiest fix is to make the DIV unfocusable? Is there any way to make a DIV not be focused? ...

Do you have any download hit counter per user Module in joomla ?

In my project one download button is there . if user download button click then i will show count of download . is it possiable have any module for download hit counter ? ...

Not Throwing Errors in a JavaScript Library

On the front page for MooTools, it says: MooTools code respects strict standards and doesn't throw any warnings. I like MooTools, but having recently read The art of throwing JavaScript errors, I'm a bit confused as to why 'not throwing any warnings' is a feature. If a library doesn't tell you when there's an error (which may b...

Enter keyword in search box of any website using php script

Hi all I am a beginner and i was wondering can we write a code in PHP by which we can enter keyword in search box of any website and submit. so there will be 2 inputs to this php function: function enter_keyword($website_url, $keyword) { } function enter_keyword($website_url, $keyword) { } It will be a great help thanks in advance...

Pass multiple arrays to javascript via ajax

To pass an array from PHP to javascript via ajax, I am going to use json_encode, and recieve it on the javascript end. However, I will be returning multiple rows from my MySQL database, and need to return multiple JSON-formatted arrays. One way I thought of doing this was to string the JSON arrays together in php with some obscure charac...

How to display only one country or a specific area in Google maps using the api?

I am using Google Maps in a project and I want to display only a country map in my map window i.e. I want only the US to show on my map not Canda and Mexico and so on, cutting away the superflous information for the app I am building. I found some stuff where you can restrict the area covered with some javascript however this still giv...

Post MySQL Result Using Alax(Jquery).[SOLVED]

Hi all, Im afraid its another noob question...lol. Being relatively new to javascript/ajax/jquery..programming ingeneral... I am fumbling where blind men drive chariots, so please go easy:). I am wanting to post 3 values to the database, 2 of which are results of a mysql query(Im not sure if I am doing this right, so feel free to correc...

How to get selected text in textarea?

I'm trying to make my own WYSIWYG editor. Is there any way, how to get the text which has user selected in textarea? For example, if user selects some word and then clicks button, how do I find out which text was selected? I'm using jQuery. ...

Framework updates how long do you wait?

In a development team how long do you think you should wait to implement the latest stable version of Framework? I am asking about different Frameworks we are using Zend Framework, HTMLPurifier, jQuery and jQuery UI. After a release how long do you wait to update your framework(s)? ...

sending javascript date to vb.net date variable

I need to pass javascript date value to vb.net function. Method iam using now: convert javascript date to string store it in hiddenfield retrieve string from hidden field in server code and parse it using date.parse the trouble is that the Javascript dateformats toString() - Sat Apr 4 22:19:00 UTC+0530 2009 toDateString() - Sat Ap...