PDA

View Full Version : Dynamic Ajax Content - problem loading slightly complex external page



jpmad4it
01-18-2008, 10:52 AM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem: I am having a problem loading the following external page into the dynamic content area. If I load a simple page, for example one of the external.htm files that come in the zip package, it works perfectly. But there must be something in the following code that is causing an error. The page is called vtour_mancs1.html and it is trying to load a quicktime movie:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Manchester Apartment V-Tour</title>
<script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<script type="text/javascript">
AC_AX_RunContent( 'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','width','640','height','495','codebase','http://www.apple.com/qtactivex/qtplugin.cab','src','http://www.my-site.com/flat1.mov','qtsrc','http://www.my-site.com/flat1.mov','autostart','True','loop','false','controller','true','pluginspage','http://www.apple.com/quicktime/','autoplay','true' ); //end AC code
</script>
<noscript>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="640" height="495" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="http://www.my-site.com/flat1.mov" />
<param name="qtsrc" value="http://www.my-site.com/flat1.mov" />
<param name="autoplay" value="true" />
<param name="loop" value="false" />
<param name="controller" value="true" />
<embed src="http://www.my-site.com/flat1.mov" qtsrc="http://www.my-site.com/flat1.mov" width="640" height="495" autostart="True" loop="False" controller="true" pluginspage="http://www.apple.com/quicktime/"> </embed>
</object>
</noscript>
</body>
</html>


If anyone can help or tell me if what I am trying to do is or is not possible, I'd really appreciate it!

Kind regards
Jonathan

EDIT: I have found that using just the following code in the external page works ok......is it OK to just use the <object> tag these days in our newer browsers?



<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="640" height="495" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="http://www.my-site.com/flat1.mov" />
<param name="qtsrc" value="http://www.my-site.com/flat1.mov" />
<param name="autoplay" value="true" />
<param name="loop" value="false" />
<param name="controller" value="true" />
<embed src="http://www.my-site.com/flat1.mov" qtsrc="http://www.my-site.com/flat1.mov" width="640" height="495" autostart="True" loop="False" controller="true" pluginspage="http://www.apple.com/quicktime/"> </embed>
</object>

codeexploiter
01-18-2008, 11:15 AM
Try a relative path instead of giving a path using http:// and I hope you have stored the movies correctly. I wonder what caused you to use <object> and <embed> together...

jpmad4it
01-18-2008, 11:20 AM
Try a relative path instead of giving a path using http:// and I hope you have stored the movies correctly. I wonder what caused you to use <object> and <embed> together...

Ah ok I will try that. Yes the movies are stored correctly. If you lose the <embed> part it will not work on firefox / netscape.

codeexploiter
01-18-2008, 11:24 AM
hmmm i think i missed that FF part..

jpmad4it
01-18-2008, 11:34 AM
Hmmm, no changing the paths didnt work either.

Its something to do with the script in the external page and probably these scripts that are called:


<script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>


The code below works fine if I remove the <script> section that uses AC_RunActiveContent.js and AC_ActiveX.js:



<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Manchester Apartment V-Tour</title>
</head>

<body>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="640" height="495" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="http://www.mysite.com/vtours/manchester/flat1.mov" />
<param name="qtsrc" value="http://www.mysite.com/vtours/manchester/flat1.mov" />
<param name="autoplay" value="true" />
<param name="loop" value="false" />
<param name="controller" value="true" />
<embed src="http://www.mysite.com/vtours/manchester/flat1.mov" qtsrc="http://www.mysite.com/vtours/manchester/flat1.mov" width="640" height="495" autostart="True" loop="False" controller="true" pluginspage="http://www.apple.com/quicktime/"> </embed>
</object>
</body>
</html>

codeexploiter
01-18-2008, 11:40 AM
I've done the embedding in my machine using the following code


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>An XHTML 1.0 Strict standard template</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">

</style>
<script type="text/javascript">

</script>
</head>

<body>
<div>
<object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="300" width="700">
<param name="src" value="mymovie.mov" >
<param name="autoplay" value="true" >
<param name="controller" value="true" >
<embed src="mymovie.mov" height="300" width="700" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" autoplay="true" controller="true"/>
</object>
</div>
</body>
</html>

codeexploiter
01-18-2008, 11:47 AM
I have tried to access your movie but doesn't work though I've accessed another quicktime movie from another site using my code which works correctly and I doubt that it is a problem of your movie files. Please have a look at them whether they work correctly or not.

jpmad4it
01-18-2008, 11:56 AM
I have tried to access your movie but doesn't work though I've accessed another quicktime movie from another site using my code which works correctly and I doubt that it is a problem of your movie files. Please have a look at them whether they work correctly or not.

you wont be able to access my movies as www.mysite.com is just a made up/random name....i didnt want to post my real URL.

The problem isn't with my movies, they work fine using a direct URL to them. Do you not agree the problem could be the other scripts that are being called? Maybe there are some shared varible names in the ACRunActiveContent.js and the script for the ajax content?