SourceTec Software

It is currently Sat Apr 19, 2014 8:14 am

All times are UTC + 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Feb 29, 2008 11:58 pm 
Offline
Member

Joined: Fri Feb 29, 2008 11:38 pm
Posts: 1
I am using a javascript to reload a section of a page dynamically without reloading the entire page. It works fine, in that the page is included within the master page within a <div> container and the content updates dynamically every 5 seconds without reloading the entire page.

HOWEVER, the problem is that the DHTML menu I created with the dhtml menu generator will not work... it does not give an error, it just doesn't show up at all.

I tested the dhtmlmenu.php page by itself in a browser, and the menu displays fine... but when including it with the script on page "display.php" (see code below) it does not work.

http://www.server1012.net/mhanson/dhtmlmenu.php (Menu works fine)
http://www.server1012.net/mhanson/display.php (Menu doesn't work)

Can anyone shed some light on this problem? Is there something I can do to correct this?


The structure works like this.

dhtmlmenu.php (contains the DHTML menu)
http://www.server1012.net/mhanson/dhtmlmenu.php

display.php (contains the javascript which calls innerHTML to display "dhtmlmenu.php")
http://www.server1012.net/mhanson/display.php


dhtmlmenu.php
Code:
<html>
<head>
<script type="text/javascript" src="js/stmenu.js"></script>
</head>
<body>
<span>Please choose from the following menu </span>
<script type="text/javascript">
<!--
stm_bm(["menu4d8f",830,"","blank.gif",0,"","",0,0,0,0,50,1,0,0,"","",0,0,1,1,"default","hand",""],this);
stm_bp("p0",[0,4,0,0,0,4,0,16,100,"",-2,"",-2,90,0,0,"#999999","transparent","",3,0,0,"#E6FAB4 #788C32 #788C32 #E6FAB4"]);
stm_ai("p0i0",[0,"Home","","",-1,-1,0,"#","_self","","","","",0,0,0,"","",0,0,0,1,1,"#9cc2c9",0,"#9cc2c9",0,"","",3,3,1,1,"#BEE6F0 #64878C #64878C #BEE6F0","#64878C #BEE6F0 #BEE6F0 #64878C","#333366","#333366","bold 8pt Arial","bold 8pt Arial",0,0],80,20);
stm_aix("p0i1","p0i0",[0,"Products","","",-1,-1,0,"#","_self","","","","",0,0,0,"0604scroll2ldlalr.gif","0604scroll2ldlalr.gif",16,9],90,20);
stm_bp("p1",[1,4,0,0,0,4,0,0,100,"",-2,"",-2,58,0,0,"#999999","transparent","",3,0,0,"#000000"]);
stm_aix("p1i0","p0i0",[0,"Sothink DHTMLMenu","","",-1,-1,0,"#","_self","","","","",0,0,0,"","",0,0,0,0,1,"#e6e6e6",0,"#e6e6e6",0,"","",3,3,1,1,"#FFFFFF #A0A0A0 #A0A0A0 #FFFFFF","#A0A0A0 #FFFFFF #FFFFFF #A0A0A0","#4B4B4B","#000000","8pt Arial","8pt Arial"],120,20);
stm_aix("p1i1","p1i0",[],120,20);
stm_aix("p1i2","p1i0",[0,"Sothink DHTMLMenu","","",-1,-1,0,"#","_self","","","","",0,0,0,"","",0,0,0,0,1,"#e6e6e6",0,"#e6e6e6",0,"","",3,3,1,1,"#FFFFFF #A0A0A0 #A0A0A0 #FFFFFF","#FFFFFF #A0A0A0 #A0A0A0 #FFFFFF","#999999","#999999"],120,20);
stm_aix("p1i3","p1i0",[],120,0);
stm_aix("p1i4","p1i0",[],120,0);
stm_aix("p1i5","p1i0",[],120,0);
stm_ep();
stm_aix("p0i2","p0i0",[0,"Contact"],80,20);
stm_aix("p0i3","p0i1",[0,"Download"],90,20);
stm_bpx("p2","p1",[]);
stm_aix("p2i0","p1i0",[],120,20);
stm_aix("p2i1","p1i0",[],120,20);
stm_aix("p2i2","p1i0",[],120,20);
stm_ep();
stm_aix("p0i4","p0i0",[0,"Search"],80,20);
stm_aix("p0i5","p0i0",[0,"Sitemap"],80,20);
stm_ep();
stm_em();
//-->
</script>
</body>
</html>



display.php
Code:
<html>
<head>
</head>
<?

print "<body>";
print " <div id=\"show\"></div>



   <script type=\"text/javascript\" language=\"javascript\">

    if (window.XMLHttpRequest) {

     xmlHttp = new XMLHttpRequest();

    }else if(window.ActiveXObject){

     xmlHttp = new ActiveXObject(\"Microsoft.XMLHTTP\");

    }

    function callServer(url) {

     xmlHttp.open(\"GET\", url, true);

     xmlHttp.onreadystatechange = updatePage;

     xmlHttp.send(null);

    }

    function updatePage() {

     if (xmlHttp.readyState == 4) {

      var response = xmlHttp.responseText;

      document.getElementById(\"show\").innerHTML = response;

      setTimeout(\"callServer('dhtmlmenu.php')\",10000);

     }

    }

    callServer(\"dhtmlmenu.php\");

   </script>";
   
   ?>
   </body>
   </html>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 04, 2008 12:47 pm 
Offline
Support Team
Support Team

Joined: Thu Jan 04, 2007 8:07 pm
Posts: 987
Hi wscreate,

We have responded you via email, please have a check with your inbox.

Thanks a lot for your understanding and if you still have problem, please feel free to contact us.

:)

_________________
******
This forum is ONLY for user discussion.
Click here to Submit a Support Request for prompt professional assistance from Sothink Customer Service
******


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 04, 2009 7:45 pm 
Offline
Member

Joined: Wed Dec 02, 2009 8:35 pm
Posts: 2
Cindyrae wrote:
Hi wscreate,

We have responded you via email, please have a check with your inbox.

Thanks a lot for your understanding and if you still have problem, please feel free to contact us.

:)


I have the same problem using javascript to reload a section (<div></div>) of a page dynamically with ajax without reloading the entire page. The url called contains a DHTMLmenu and it's reload out of <div></div>. Could help me with this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 06, 2009 10:30 am 
Offline
Guru
User avatar

Joined: Mon May 10, 2004 3:53 am
Posts: 1752
Location: Rescue, CA, USA
I'm curious as to why you would use Ajax to load an external document that includes a DHTML Menu. I'm also curious as to why you would refresh that content every 5 seconds.

For those not familiar with Ajax (Asynchronous JavaScript and XML), it is used to create interactive web applications. Ajax can make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes so that the entire page does not have to be reloaded each time there is a change. There is an Ajax demo on my Web Design Tips & Tricks Site at: http://pittstop.com/tipstricks/ajax_demo.html

By the way, I know the Web Design Tips & Tricks Site is in desperate need of updating. Someday...

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 17, 2009 3:53 am 
Offline
Member

Joined: Wed Dec 02, 2009 8:35 pm
Posts: 2
I need help!

The problem is like this (http://www.sothink.com/phpBB2/viewtopic ... ea7463f510):

I have two page.
On the first page is a container (div) that is loaded through ajax with the contents of the second page.
The second page, which is called by ajax, contains a DHTML menu.

The problem is that the DHTML menu is loaded outside the container (div).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group