Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: object expected error

  1. #1
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default object expected error

    hi

    i m using this script

    Code:
    <script language="javascript" type="text/javascript">
    window.top.window.stopUpload(<?php echo $result; ?>);
    </script>
    i get error "object expected".

    I get this error only in IE7. I dont get any error in Firefox or opera.

    what does this mean. how to solve

    vineet

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try this:
    Code:
    <script language="javascript" type="text/javascript">
    window.top.window.stopUpload("<?php echo $result; ?>");
    </script>
    BTW: Provide a link to your site.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Object

    Quote Originally Posted by Nile View Post
    Try this:
    Code:
    <script language="javascript" type="text/javascript">
    window.top.window.stopUpload("<?php echo $result; ?>");
    </script>
    BTW: Provide a link to your site.

    hi nile

    i m working offline. its not online.

    but ur code also gave me same error

    This is what other code i have on my page
    Code:
    function startUpload(){
         document.getElementById('f1_upload_process').style.visibility = 'visible';
          document.getElementById('f1_upload_form').style.visibility = 'hidden';
          return true;
    }
    
    function stopUpload(success){
          var result = '';
          if (success == 1){
             result = '<span class="msg">The file was uploaded successfully!</span>';
          }
          else {
             result = '<span class="emsg">There was an error. Plz upload GIF or JPG image only!</span>';
          }
          document.getElementById('f1_upload_process').style.visibility = 'hidden';
          document.getElementById('f1_upload_form').innerHTML = result;
    	  document.getElementById('f1_upload_form').style.visibility = 'visible';      
          return true;   
    }
    vineet

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Can you post all your code please...
    Jeremy | jfein.net

  5. #5
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default object

    Quote Originally Posted by Nile View Post
    Can you post all your code please...

    hi nile

    the error is in javascript and i have posted the whole javascript

    vineet

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    What does "window.top.window.stopUpload" do? I've never seen this before.
    Jeremy | jfein.net

  7. #7
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default object

    Quote Originally Posted by Nile View Post
    What does "window.top.window.stopUpload" do? I've never seen this before.
    hi nile

    i dont know much.

    i have also copied it from net for showing the fake loading mesage while my file is uploading.

    The problem is only with IE7.

    NO PROBLEM WITH Firefox or opera.

    vineet

  8. #8
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try deleting:
    Code:
    window.top.window.
    Jeremy | jfein.net

  9. #9
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default object

    Quote Originally Posted by Nile View Post
    Try deleting:
    Code:
    window.top.window.

    i myself have already tried it many times. it also gives the same error.

    vineet

  10. #10
    Join Date
    Jun 2008
    Posts
    121
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default object

    hi nile

    do you any script that allow us to hide the javascript error even if there is error.

    can we hide javascript error from not showing in status bar

    vineet

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •