Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Thursday, November 29, 2012

Placeholder not cleared on focus to text field solution.

HTML 5 input field has not been cleared on focus to the text box. I faced this issue while developing blackberry applications. On focus to first time it will be cleared and second time placeholder has been considered as input string. So it is not been cleared. Actual Scenario: The placeholder is visible for the user and user has to delete in order to enter input string. Expected Scenario: Tapping on any input fields placeholder should be wiped out in order to enter user's input The same issue is also observed on IE 9. It happens due to older browsers JavaScript engines does not have the support to the placeholder. Look at the image here for the issue...
jQuery is having the fix for this issue. Here is the code to fix the placeholder issue with older browser.
 $('[placeholder]').focus(function() {  
  var input = $(this);  
  if (input.val() == input.attr('placeholder')) {  
   input.val('');  
   input.removeClass('placeholder');  
  }  
 }).blur(function() {  
  var input = $(this);  
  if (input.val() == '' || input.val() == input.attr('placeholder')) {  
   input.addClass('placeholder');  
   input.val(input.attr('placeholder'));  
  }  
 }).blur().parents('form').submit(function() {  
  $(this).find('[placeholder]').each(function() {  
   var input = $(this);  
   if (input.val() == input.attr('placeholder')) {  
    input.val('');  
   }  
  })  
 });  
Kknow more about the fix.

Monday, June 11, 2012

Cross Domain Ajax Request From Localhost

So many cases developer will struggle to identify the problem with browser when making cross domain ajax request. Here are some solutions and links to understand cross domain ajax request and problems with browser.

Solution to fix the cross domain ajax request issue in google crome is

1. Right click and click on properties of the google crome short cut from the desktop.
2. Add the below line at the end of the target path after crome.exe like below.
C:\Users\msubra02\AppData\Local\Google\Chrome\Application\chrome.exe --disable-web-security --allow-file-access-from-files --enable-file-cookies    

http://stackoverflow.com/questions/8679736/allowing-cross-domain-requests-in-safari-and-chrome-server-response-vs-command
http://stackoverflow.com/questions/6826282/how-to-allow-cross-domain-requests-in-safari
http://www.cypressnorth.com/blog/programming/cross-domain-ajax-request-with-json-response-for-iefirefoxchrome-safari-jquery/
http://www.html5rocks.com/en/tutorials/cors/
http://stackoverflow.com/questions/9314413/jquery-ajax-cross-domain-remote-server-does-not-work-in-ie8

Thursday, August 19, 2010

Clear internet activity history from your computer

To clear ur all internet activity history
go to RUN
Type inetcpl.cpl
then click ok
it will clear browsing history, cookies & offline data.