Bug Tracker

Modify

Ticket #5738 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

var value = $(this).val() fails in IE

Reported by: transom Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

This code was failing on IE(7/8)

jQuery(document).ready(function($){

$('#zipcode').bind('blur', function(){

var zipcode = $(this).val(); alert(zipcode);

});

});

where #zipcode is an input text field in a form

but making this change solved the problem:

var zipcode = ; zipcode = $(this).val();

Change History

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

I can't repro this problem in IE8, if you still have the issue attach a complete test case.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.