Results 1 to 7 of 7

Thread: Ajaxtabs is undefined, but only on certain IIS machines.

  1. #1
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajaxtabs is undefined, but only on certain IIS machines.

    Script Title: Ajax Tabs

    Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm

    Describe problem: Hi, I know this is not a problem with the script, but more how we have our IIS setup. When running our website on a windows 2000 sp4 IIS server the script runs fine. But when we try it on a xp pro IIS server I get the error -

    ddajaxtabs is undefined

    on this line -

    Code:
    var tabs=new ddajaxtabs("admintabs", "admincontainter")
    both sites have exactly the same files so that is not a problem, I'm guessing the problem is something IIS related but I've looked and looked and cannot see anything obvious.

    If someone could put me out of my misery on this one I'd be most grateful

    Regards

    Paul Clift

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I don't know ASP, but in general, the checklist for using any server side language to dynamically output client side JavaScripts is the same. As long as what gets output to the browser conforms to the syntax/ conventions of the client side script, as if you've manually added it to the page, it should work. Please post a link to the page on your site that contains the problematic script so we can check it out.

  3. #3
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.daventrybreakfastclub.co.uk/admin.asp

    Not sure if that link will help, as if you are not an admin it auto redirects back to home.asp


    That's the page source if I navigate there while logged in though, this is on a IIS server where its working.


    Code:
    <html>
    <head>
    <noscript>
    	<meta http-equiv="REFRESH" content="0;url=nojs.asp">
    </noscript>
    <title>Daventry Breakfast Club</title>
    	
    <link rel='stylesheet' href='css/styles.css' type='text/css' />
    
    <script type="text/javascript" src="js/ajaxtabs.js">
    
    /***********************************************
    * Ajax Tabs Content script v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    	
    <style type='text/css'>
    
    .tabcontentiframe{
    height: 775px !important;
    }
    	
    body
    {
    	background-image: url(images/extendABLEtophalf.gif);
    	background-repeat: no-repeat;
    }
    </style>
    	
    </head>
    	
    
    <body>
    
    
    <div id='header'>
    </div>
    	
    <div id='navstandard'>
    			  
    	
      <div class='nav1'><a href='home.asp'>&nbsp;</a></div>
    					
    				  
    			  
    	
      <div class='nav2'><a href='meetings.asp'>&nbsp;</a></div>
    					
    				  
    			  
    	
      <div class='nav3'><a href='news.asp?qyear=2008&qmonth='>&nbsp;</a></div>
    					
    				  
    			  
    	
      <div class='nav4'><a href='members.asp'>&nbsp;</a></div>
    					
    				  
    			  
    	
      <div class='nav5'><a href='daventry.asp'>&nbsp;</a></div>
    
    					
    	
      <div class='nav6'><a href='contact.asp'>&nbsp;</a></div>
    	<div class='nav7'><a href='admin.asp'>&nbsp;</a></div>
    	</div>
    		
    	<div id='contentstandard'>
    		  
    	<div id='contentheader' class='PageTitle'>
    	Admin<br>
        <span class="text"><a href="home.asp?action=logout">Logout</a></span> </div>
    
    	  
        <br><br><br>
    	<ul id="admintabs" class="shadetabs">
    	  
        <li><a href="adminTypes.asp?action=view" rel="#iframe">Miscellaneous</a></li>
    	  
        <li><a href="adminmembers.asp?AID=1" rel="#iframe">Members</a></li>
    	
    	<li><a href="adminNews.asp" rel="#iframe">News</a></li>
    
    	<li><a href="adminlocations.asp" rel="#iframe">Venues</a></li>
    
     	</ul>
    	
    	<div id="admincontainter" style="background-color:#FFFFFF; border:1px solid gray; width:600px; height:750px; margin-bottom: 1em; padding: 10px">
    	<p>Site Admin Page</p>
    	</div>
    	
    	<script type="text/javascript">
    	
    	var tabs=new ddajaxtabs("admintabs", "admincontainter")
    	tabs.setpersist(false)
    	tabs.setselectedClassTarget("linkparent") //"link" or "linkparent"
    	tabs.init()
    	
    	</script>	
    	</div>
    </body>
    </html>

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, since I'm redirected, it negates the link being useful. But looking at the source of what you posted, it's valid and should work. In fact, if I copy/paste it, then replace the pages you're loading (ie: adminNews.asp) with my own, clicking on the tabs loads them correctly...

  5. #5
    Join Date
    Feb 2006
    Posts
    236
    Thanks
    8
    Thanked 3 Times in 3 Posts

    Default

    Yes, there is a problem with your IIS - it's a security thing. Quoting from a text:
    HTML Code:
    In the case
    where you want the XMLHTTPRequest to retrieve data from a service running
    on your server you can bind your service to a particular port. Then also have
    your service serve up your html page. That way you can do an IFRAME on
    your main page which contacts your service to serve up an html page, with
    the XMLHTTPRequest object which contacts your service again on the same
    port to get the data your service is serving up.
    
    For example, http://localhost/ has <iframe
    src=”http://localhost:10102/?htmlpage”></iframe> which contacts your
    service that is binding on port 10102. The service then serves up whatever
    html page that you want. In the html page that is served up, a
    XMLHTTPRequest object contacts the server again an initiates an HTTP GET
    request to http://localhost:10102/?data. In this way you can bypass port
    restrictions and get the information that you need from another
    port.
    The link to this is: http://www.nathanm.com/ajax-bypassin...n-restriction/

  6. #6
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Paulus Cliftus View Post
    But when we try it on a xp pro IIS server I get the error -

    ddajaxtabs is undefined

    on this line -
    I have Windows 7 beta, ddajaxtabs is undefined happened as well through IIS http://localhost/

    I have tested same files under XP professional IIS, it works fine.
    It must be something about Windows 7, but I don't how to fix it.

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Kaoru, what happens when you run the script online, and not localhost?
    DD Admin

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
  •