Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2012, 10:46 PM
Authorized User
 
Join Date: Dec 2011
Posts: 18
Thanks: 1
Thanked 0 Times in 0 Posts
Default Page errors

Hello every1.
I m using ajax tab controls on a page and there are 3 tabs nested under one.thats the design and when i click on tabs i get the page/script errors (not sure what should i call these errors). this happens only on IE9 AND IE8. There are different errors on different pages but one common error is "Can't move focus to the control because it is invisible,not enabled,or of a type that does not accept the focus." and some errors says "DOM Is null or not a object". please help.
Thanks
 
Old February 12th, 2012, 02:07 PM
Authorized User
 
Join Date: Dec 2011
Posts: 18
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Imar, any idea about this page errors please help
 
Old February 15th, 2012, 02:21 PM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile

Hi there

invisible controls and some special controls does not got focus.

1-
<input type="text" style="visibility:hidden;" /> (style="visibility:hidden ;")

2-
<input type="text" style="display:none;" /> (style="display:none; ")

3-
<input type="button" disabled="disabled" value="disabled button" /> (disabled="disabled")

4-
<img src="someurl/a.jpg" /> (img tag itself)

all of above doesn't got focus and calling focus() method raises error.

Solutions:
1- check style of your tabs (or div's that tab's content is shown in)
2- check your controls visibility and accessibility (Enable=true)
__________________
happy every time, happy every where

Reza Baiat

Last edited by irProject; February 15th, 2012 at 02:36 PM..
 
Old February 15th, 2012, 02:32 PM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile my experience

I encountered this error when I wanted to set focus on an image (I'd used image as button of a dialog box). to solve this problem I placed the img into a div tag and then called focus() method over div:
HTML Code:
<div id="okButtonDiv" class="fit">
<img src="http://p2p.wrox.com/images/okButton.gif" alt="OK"/>
</div>

...
<script type="text/javascript">
var defaultBtn = <%= (defaultButton==DialogButton.OK? "okButtonDiv": "cancelButtonDiv") %>
document.getElementById(defaultBtn).focus();
</script>

to prevent of adding 'defaultBtn' variable to 'window' i used below script instead:

HTML Code:
<script type="text/javascript">
(function(){
    var defaultBtn = <%= (defaultButton==DialogButton.OK? "okButtonDiv": "cancelButtonDiv") %>
    document.getElementById(defaultBtn).focus();
})();
</script>
Smile over problems
__________________
happy every time, happy every where

Reza Baiat

Last edited by irProject; February 15th, 2012 at 02:40 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Couple Errors on AddEditArticles page pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 December 14th, 2007 04:01 AM
Page 154 Code Errors sosborne BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 August 14th, 2006 08:50 AM
blank page when errors occur harpua Beginning PHP 1 July 7th, 2005 03:36 PM
done, but with errors on page bubblez Classic ASP Databases 4 September 11th, 2003 03:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.