javascript

Resizing Images on Client Side

What is the best and quickest way to resize images on the client side using JavaScript? EDIT: Sorry, I meant the best way to display an image resized on the client side.. ...

Problem with Crystal Report in ASP.NET - ExportToHttpResponse

I am using the code to export pdf file from a popup. On button click function popupReport() { var url = 'Report.aspx'; window.open(url, 'winPopupReport', 'width=300,height=300,resizable=no,scrollbars=no,toolbar=no,directories=no,status=no,menubar=no,copyhistory=no'); return false; } and in Report.a...

IE8 causing FILE input entry to be blank via SendKeys

Application: HTA (therefore IE) This is an application that uses SendKeys to populate a FILE input field. Issue: File is never uploaded. Description: An offscreen form (invisible to user) uploads a file to the server. The file input is entered via SendKeys (javascript). Appears to be isolated to when IE8 is installed. Does anyo...

jQuery: how can I control a div's opacity when hovering over another div?

Hello everyone. I am currently working on my portfolio website which uses a very simple navigation. However what I want to do is have the drop shadow beneath the type become stronger (read: higher opacity/ darker) when the type is being hovered on. Right now my code looks as follows and does not generate any errors but simply does not ...

How can I make an inner div trigger a drag effect on an outer div using Jquery?

Hi, I want to use an inner div to drag around an outer div, for example: <div id="outerDiv" style="height:300px; width:200px;"> <div id="innerDiv" style="height:10px; width:200px;"></div> </div> If this is my code, assuming the proper JQuery plugins are attached to use draggable, etc... How can I make it so that when the user cl...

jquery problem with IE....works fine in firefox n chrome

I have a code which accept a query and uses yahoo websearch to return a suggestion.Its working fine in FF and Chrome . but in IE it gives no result. can any one help me on this?? Here is the code: $(document).ready(function() { $.ajax({ type: 'GET', url: "dummyapi.php", data: {query: "yaho"}, success: function(xml) { alert...

JQuery ForEach loop?

Hey, how can I say the following Foreach tag in my table, when someone clicks it I want to run a function so something like: ForEachTag.click ( function (e) { } ) ...

jQuery check if browser support position: fixed

Hello, How do I check if browser supports position:fixed using jQuery. I assume I have to use $.support I think, but how? Thank you for your time. ...

Show Additional Content Based on Selection

Is this also the Risk Address: <select name="InsuredSALicense2" id="InsuredSALicense2"> <option>Please Select</option> <option>Yes</option> <option>No</option> </select> If the answer here is "No" then a hidden drop down must be created. If No, Please give details: <textarea name="InsuredOther License2" id="InsuredOt...

How to open message(this) on pop window

<script type="text/javascript"> function openpopup(pop){ var pop1=window.open(this.pop , "", "width="+(screen.width-10)+", height="+(screen.height-10)+",hotkeys=no,scrollbars=yes"); } </script> <a href ='#' onClick="javascript:openpopup(showLongMessage.this)">Show More </a> IT gives the following error No route matches "/undefine...

Problems with dynamically loading external js files on a onload event

I'm trying to get lightbox2 working with my site, http://www.therussianfrostfarmers.com/ , however i seem to be having a problem with conflicting external js files. I'm not entirely sure i know where the problem is with this code, but i believe its got todo with how the onload events are called. the blog content on the homepage is loaded...

Ajax message

Want to display a "confirm" message in my asp.net appl, when the window closes, but when the Cancel button is pressed, the page closes, the event is not Canceled. I tried a different approach: I use; event.returnValue = "Message"; This approach works (when cancel is pressed, page does not close), but I get the "Message" that I specify p...

Why does YUI Uploader return all queued files after file select?

Not sure if you guys are familiar with YUI Uploader, but after you click "browse" and select a bunch of files, the callback event returns a list of all the files that are queued, not just the ones you just finished selecting. This poses a bit of a problem because now instead of just adding the selected files to the UI, you have to clear ...

Google maps showing a visitor’s location by grabbing their IP address ...

Hi there, I'm trying to replicate the following exemple : http://www.leigeber.com/2008/04/map-your-users-using-the-google-maps-api-and-php/ How to integrate this PHP source code with the following Java script (replacing lat/lgt with $latitude/$longitude above ??? Looks easy but I'm a bit lost in mixing PHP and Javascript together ! ...

Performance considerations of JSON vs. XML

I am using a webservice which provides a large result set either in XML or JSON format. Which format will be faster or better (perfomance based)? Also which language should I use to parse the XML/JSON? Should I use PHP or JavaScript? ...

Append a jQuery element to a string that contains html

I have a jQuery wrapped element which I would like to append to a html row. I can't wrap my head around this, since append() seemingly accepts strings but not existing jQuery elements (I might be mistaken here). I have a following setup: var row='<tr><td>data1</td><td>data2</td><td>'; var img=$('<img src="path/to/img.png"'); img.click(m...

Is there a way to access an Image's bitmap data using Javascript?

I am looking for a way to create a hash for an image displayed on an XHTML page using Javascript. ...

disable scroll bar on the div

I have a div. I want that user should not be able to scroll the page if the height is more than 350px. Also the scroll bar should be visible in disable mode in that case. I want to achieve this using javascript. Thanks ...

how to improve performance in jquery

Hi, I'm not a good programmer and I just started using jQuery. I need a table sorter that can expand and collapse rows. My code is below. I've spent lots of time trying to improve its execution time. In IE it takes lots of time. I'd appreciate your suggestions. $(document).ready(function() { $('table.sortable').each(function() { ...

Why this type of array wrapping does not work in jQuery?

Consider this: var i=$('<img src="/path/to/imgI.png"/>'); var j=$('<img src="/path/to/imgJ.png"/>'); $([i,j]).css('cursor','hand'); The cursor is not changed however and I don't know why.. When I do it separately, it works. Thanks. ...