0

When I use my below JS FIDDLE, I get error as

Obout.Interface.OboutTextBox' is null or not an object in IE.

I don't know what is the issue here

I get error at line no 308 which is

Obout.Interface.OboutTextBox.prototype.applyCrossBrowserFixes = function (){}

Here is my Fiddle

Please suggest what is wrong

Nad
  • 4,605
  • 11
  • 71
  • 160
  • you can't reproduce the issue in jsfiddle. so reproduce the issue at-least in a live site and give the link. If you can't reproduce , then i am sorry i can't help. – J Santosh Oct 07 '15 at 08:20
  • @JSantosh: we are working on localhost, how would i be able to make it live ? – Nad Oct 07 '15 at 08:23
  • @JSantosh: can you tell me what exactly do you want. so i can give or mail you the respective files – Nad Oct 07 '15 at 08:24
  • that was resolved by putting the script in the head tag. Now i m facing issue of `Line: 308 Error: 'Obout.Interface.OboutTextBox' is null or not an object` with this jsfiddle http://jsfiddle.net/norlihazmeyGhazali/de2nh862/ – Nad Oct 07 '15 at 09:27
  • ohk, then ask new question by tagging `oboutgrid` which helps people to find the question easily. i didn't work with `oboutgrid`. – J Santosh Oct 07 '15 at 09:30
  • can i tag here. because this is related to the same js file issue – Nad Oct 07 '15 at 09:31
  • try it . and update question title – J Santosh Oct 07 '15 at 09:36
  • @JSantosh: updated the question – Nad Oct 07 '15 at 09:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/91584/discussion-between-nadeem-and-j-santosh). – Nad Oct 07 '15 at 10:05

1 Answers1

4

Ensure those function is not wrapped around by document ready. Place it only inside <script></script> :

Not like this :

<script>
// or $(document).ready(function(){
$(function(){
  function navigateThroughCells(sender, key, forced) { .... }
});
</script>

But like this :

<script>
  function navigateThroughCells(sender, key, forced) { .... }
</script>
Norlihazmey Ghazali
  • 9,000
  • 1
  • 23
  • 40
  • i have called that function in **a separate JS file** – Nad Oct 07 '15 at 06:48
  • @nadeem load the js file in head tag and try – J Santosh Oct 07 '15 at 06:49
  • @nadeem : Where you put that? – Norlihazmey Ghazali Oct 07 '15 at 06:52
  • @JSantosh: loaded the file in head tag, but still getting the same error – Nad Oct 07 '15 at 06:52
  • @NorlihazmeyGhazali: I tried adding that in head tag. have a look http://jsfiddle.net/g5tbemoy/ – Nad Oct 07 '15 at 06:52
  • @NorlihazmeyGhazali: Resolved that issue, but now it is giving me error as `oboutGrid is not defined` at line no 4 of JS function – Nad Oct 07 '15 at 06:56
  • Alright, if you talking about code in jsfiddle, `oboutGrid` does't have class function. Which all prototype created without references. Same goes to `Obout`. Did you created already those function? – Norlihazmey Ghazali Oct 07 '15 at 06:58
  • @NorlihazmeyGhazali: So what should I do in to make it work properly ? – Nad Oct 07 '15 at 06:59
  • getting error as `Line: 308 Error: 'Obout.Interface.OboutTextBox' is null or not an object` – Nad Oct 07 '15 at 07:03
  • @nadeem reproduce the issue in fiddle , that's the last option i got to help you . – J Santosh Oct 07 '15 at 07:04
  • Seems like your code lack of relevant function. Most of them rely on other function to run with. Where you got this snippet? – Norlihazmey Ghazali Oct 07 '15 at 07:08
  • @NorlihazmeyGhazali: I downloaded it from obout gridview, from here https://www.obout.com/grid/commands/aspnet_commands_excel_style_full.aspx – Nad Oct 07 '15 at 07:30
  • @JSantosh: can you help me with this issue, also i have added one js fiddle in the comment. One more thing i am getting this error in `IE` – Nad Oct 07 '15 at 07:38
  • @NorlihazmeyGhazali: any suggestions on this?? please sir as i am clueless what to do now – Nad Oct 07 '15 at 08:25
  • Can't help mate since i do not have completed code and can't to play with `asp.net` things. – Norlihazmey Ghazali Oct 07 '15 at 08:35
  • @NorlihazmeyGhazali: atleast can we try to resolve this issue. See what I want is. if i click on any cell and edit it, it should allow me to do so. For this if you have any other option. let me know – Nad Oct 07 '15 at 08:42
  • With normal html markup and some js code should fine. If done editing, what to do? – Norlihazmey Ghazali Oct 07 '15 at 08:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/91572/discussion-between-nadeem-and-norlihazmey-ghazali). – Nad Oct 07 '15 at 09:04