Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2004
    Location
    france
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    document.getElementById not working with opera

    I am using

    Code:
     
    
      function showDiv(divId)
    {
    	document.getElementById(divId).style.display = 'block';
    	
    }
    it works fin for mozilla and internet explorer but not with opera

    what does opera wants ?


    thank you

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Which version of Opera are you talking about. Opera added DOM support with verion 7.0, so anything earlier than that won't handle it. Any recent Opera version will, though.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Jul 2004
    Location
    france
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i am using Opera 7.54


    Code:
      function showDiv(divId)
    {
    	document.getElementById(divId).style.display = 'block';
    	
    }
      function hideDiv(divId)
    {
    	document.getElementById(divId).style.display = 'none';
    }
    
    ..........................................................................
    
    <div class="popups" id="divId1" style="display:none;">
    <a href="#" onclick="hideDiv('divId1')">close</a>
    </div>

  • #4
    New Coder
    Join Date
    Jul 2004
    Location
    france
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ypu are right I am sorry

    it works with normal html
    but the function is embedded in an object (flash) tag


    Code:
       
    
    <param name="flashVars" value="url=index.htm&divId1=divId1&divId2=divId2" />
    <embed flashVars="url=index.htm&divId1=divId1&divId2=divId2" .....

    then opera does read it .. strange because the links are working
    i can get index.htm
    Last edited by quentin; 03-15-2005 at 12:39 AM.


  •  

    Posting Permissions

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