Link to home
Start Free TrialLog in
Avatar of JackoPinto
JackoPintoFlag for Costa Rica

asked on

Change destination link of javascript

Hey guys.

The company that produces my digital publication gives me a thumbnail version with the page animation effect so that I can embed and use on my websites.

Is there anyway to change the LINK of this script, so that instead of people ending up in this this page (http://www.myvirtualpaper.com/doc/apuntesdigital/ApuntesDigitalII-1/2008120801/?lang=es) when they click on the animation they go here instead: (http://www.desarrollocristiano.com/site.asp?seccion=bole.apdi).?

I've tried a million things and I cant's force it go to to this other link. Total newbie here, please help!!!

Bellow is the original script I get to embed on my pages.
<script type="text/javascript" src="http://www.myvirtualpaper.com/doc/js/swfobject.js"></script>
<script type="text/javascript">
var vars = {urlContent:'http://www.myvirtualpaper.com/doc',urlLogo:'',gotopage:'-1',dnsPrefix:'www.myvirtualpaper.com',clientname:'apuntesdigital',publication:'ApuntesDigitalII-1',edition:'2008120801',sessionID:'-1',clientID:'',publicationGroupID:'97361',publicationID:'',mode:'flash',uniqID:'413718f732',lang:'en',numPagesDisplayed:'6',numPagesTotal:'84'};
var params = { scale:'noScale', salign:'tl', menu:'true', allowFullScreen:'true', wmode:'transparent'};
var attributes = { id:'core', name:'core' }; // give an id to the flash object
swfobject.embedSWF("http://www.myvirtualpaper.com/admin/flash/miniflipper.swf?21342344", "flashContent", "202", "172", "9.0.0", "http://www.myvirtualpaper.com/doc/js/expressInstall.swf", vars, params, attributes );
</script>
<script type="text/javascript">
function openFull(p,n) {
var r   = null;
r = window.open(p,n,'width='+screen.width+',height='+screen.height+',top='+0+',left='+0+','+'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no');
if(r!=null && window.focus) r.window.focus();
};
</script>
<div id="flashContent"></div>

Open in new window

Avatar of Dreammonkey
Dreammonkey
Flag of Belgium image

Hi JackoPinto,

I'm not 100% sure I fully understand the question, so please allow me to ask for more information.

First of all the script you posted is 99% javascript, it is a very commonly used script calles SWFObject , and it is best practice to embed .swf (flash content) in HTML pages. The last line in the snippet, is a div tag. This is HTML code. The div tag is what will get replaced by the javascript once it has successfully loaded the .swf file and has detected a desirable flash player version on the end-user's computer.

Having said all that, I wonder if your goal is to embed the flash content (hosted by myvirtualpaper.com ) onto your website (desarrollocristiano.com), then the answer is : yes , you can.
==>All you have to do is open up your index.html page (or any other page where you would like to embed) , search for the location between the <body> </body> tags were you want to place the flash content. This is the place where you embed (paste/copy) the div tag.
The rest of the script (in between the <script></script> tags), you have to copy/paste between the <head></head> tags of your index.html file.

Normally that should work.

If this is not the anwser to the question, then I guess you are going to have to rephrase it.

regards,

DM
Avatar of JackoPinto

ASKER

Thanks for your comments.

I guess I do need to rephrase my question.

Let me see if I can explain myself better.  

The code provided to my by VirtualPaper gives my the animation of a flipping magazine.   If I place the code provided into any of my pages ,which I have, the animation comes up and if I click on it it takes me to this page:  http://www.myvirtualpaper.com/doc/apuntesdigital/ApuntesDigitalII-1/2008120801/?lang=es

What I want to do is change this destination of the click. I mean, that if I click on this flipping image instead of ending up in the page I mentioned just now,  I end up in this page:   http://www.desarrollocristiano.com/site.asp?seccion=bole.apdi

In other words,  once I click on the animation I want to go here:   http://www.desarrollocristiano.com/site.asp?seccion=bole.apdi

Hope this clarifies things, please let me know.

Thanks
Ok with you now,

I tried copying the source code that embed's the big page turner and save it in an html file on my server, the movie starts loading but halts (for ever) at 15%.

There must be some sort of built in security to prevent people from 'hot linking' their swf' s ...

I'll post the code below, maybe someone else finds the weak chain ?

Regards,
DM

PS: if you pay them for this stuff, why can't you ask them for the swf just the same?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Apuntes Digital - Volumen II, Número 1 el misterio : Moravia, 0205</title>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<!-- Meta Tags-->
		<meta name="description" content="" >
  		<meta name="keywords" 		content=" el misterio">
 		<meta name="lang"		content="en">
		<meta name="city" 		content="Moravia">
		<meta name="state" 		content="">
		<meta name="country" 		content="Cr">
		<meta name="zipcode" 		content="02050">
		<meta name="robots" 		content="index,follow">
 
 
 
 
 
 
		<!--End Meta Tags-->		
		<link rel="stylesheet" type="text/css" href="http://www.myvirtualpaper.com/doc/css/flash.css">
		<script type="text/javascript" src="http://www.myvirtualpaper.com/doc/js/swfobject.js"></script>
		<script type="text/javascript" src="http://www.myvirtualpaper.com/doc/js/seo.include.js"></script> 
 
<script language="javascript">
document.domain = "www.myvirtualpaper.com";
 
 
function update(myPage) {
	if (top.top2) {top.top2.hybrid.switchPage(myPage);}
  	if (top.hybrid) {top.hybrid.switchPage(myPage);}
  	if (top.hybrid2) {top.hybrid2.switchPage(myPage);}
}
</script>
 
 
		
<script type="text/javascript">
	var vars = 
{urlLogo:"http://www.myvirtualpaper.com/client/apuntesdigital/ApuntesDigitalII-1/2008120801/_custom/logo.png",gotopage:"-1",dnsPrefix:"www.myvirtualpaper.com",clientname:"apuntesdigital",publication:"ApuntesDigitalII-1",edition:"2008120801",sessionID:"13979220",clientID:"67391",publicationGroupID:"97361",publicationID:"117721",mode:"flash",uniqID:"842dd976962ce",lang:"en",searchTerms:"", 
debug:""};
	var params = { scale:'noScale', salign:'tl', menu:'true', allowFullScreen:'true', wmode:'transparent'}; 
	var attributes = { id:'core', name:'core' }; // give an id to the flash object
	swfobject.embedSWF("http://www.myvirtualpaper.com/doc/app/flash/core.swf?1242596492", "flashContent", "100%", "100%", "9.0.0", "http://www.myvirtualpaper.com/doc/js/expressInstall.swf", vars, params, attributes );
</script>
	</head>
	<body>
		
		<div id="sliderContainer"></div>
		<div id="buttons"><div id="toggle"></div></div>
 
		<div id="flashContent">
						<img src="http://www.myvirtualpaper.com/doc/client/apuntesdigital/ApuntesDigitalII-1/2008120801/thumbnails/page1_v1.jpg"><br>
			<p><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="http://www.myvirtualpaper.com/doc/images/flash.gif" border="0"></a></p>
			<p>Volumen II ⬢ Número 1 <h2>Poderosa tentación La última de las grandes palabras Sublime gracia La danza del miedo</h2> LA REVISTA DE SIEMPRE A UN SOLO CLICK DE DISTANCIA ISSN 1659-3421 <h1>El misterio</h1> <h1>gracia</h1> <h1>de la</h1></p>
			<p></p>
			<p> el misterio<a href="2.html">2</a><a href="3.html">sumario</a><a href="4.html">argentina </a><a href="5.html">¡ordénala ya!</a><a href="6.html">debilitar al débil</a><a href="7.html">par</a><a href="8.html">deseos</a><a href="9.html">9</a><a href="10.html">la última de las</a><a href="11.html">11</a><a href="12.html">tema de portada</a><a href="13.html">ministre </a><a href="14.html">sublime gracia</a><a href="15.html">15</a><a href="16.html">￾￾￾￾￾￾￾￾￾￾￾￾￾￾￾￾ </a><a href="17.html">recursos</a><a href="18.html">visita</a><a href="19.html">19</a><a href="20.html">tema de portada</a><a href="21.html">21</a><a href="22.html">tema de portada</a><a href="23.html">recursos edifi cantes temas interesantes</a><a href="24.html">vida espiritual</a><a href="25.html">25</a><a href="26.html">poderosa</a><a href="27.html">27</a><a href="28.html">vida espiritual</a><a href="29.html">29</a><a href="30.html">vida espiritual</a><a href="31.html">a amar?</a><a href="32.html">dimensión horizontal</a><a href="33.html">33</a><a href="34.html">tema de portada</a><a href="35.html">la danza del</a><a href="36.html">tema de portada</a><a href="37.html">37</a><a href="38.html">«¡no toques al</a><a href="39.html">39</a><a href="40.html">posturas</a><a href="41.html">41</a><a href="42.html">publicidad</a><a href="43.html">43</a><a href="44.html">vivir la</a><a href="45.html">45</a><a href="46.html">¡fuente inagotable!</a><a href="47.html">47</a><a href="48.html">gracia frente al martirio</a><a href="49.html">49</a><a href="50.html">dios</a><a href="51.html">¿te cuesta dar? </a><a href="52.html">52</a><a href="53.html">6 9 12 14 17</a><a href="54.html">¿ser o no ser?</a><a href="55.html">libros inspir adores acerca de temas actuales</a><a href="56.html">¿estás reflejando</a><a href="57.html">el mundo de la moda ⠴¡y el mundo en general!⠴ nos empuja a llevar ropa ceñida, corta, transparente, insinuante... pero las hijas de dios no estamos llamadas a eso, sino a mostrar una belleza limpia.</a><a href="58.html">¿tiene tu piel un tono rosado o cobrizo? en el primer caso tus colores serán los fríos, mientras que en el segundo, los calientes.</a><a href="59.html">cien años de soledad</a><a href="60.html">es importante señalar que dios no castiga a los hijos por los pecados de los padres, excepto cuando ellos los perpetúan.</a><a href="61.html">61</a><a href="62.html">¿te cuesta</a><a href="63.html">63</a><a href="64.html">carácter</a><a href="65.html">65</a><a href="66.html">66</a><a href="67.html">diez </a><a href="68.html">68</a><a href="69.html">4 7 8 10 11 12 15</a><a href="70.html">cartas </a><a href="71.html">editorial</a><a href="72.html">2009: </a><a href="73.html">iniciativas que marcan la diferencia</a><a href="74.html">campaña ama a tu prójimo, </a><a href="75.html">oración </a><a href="76.html">un relato desde los ojos de la niñez </a><a href="77.html">77</a><a href="78.html">el show del tío abner </a><a href="79.html">abuso sexual infantil</a><a href="80.html">¡alto a la pérdida temprana de la inocencia!</a><a href="81.html">lejos de los propósitos de dios</a><a href="82.html">consejos</a><a href="83.html">v encuentro latinoamericano y caribeño</a><a href="84.html">84</a></p>
		</div>
 
<script language="javascript">
</script>
	</body>
 
</html>

Open in new window

That's true, I guess I could ask for it since I pay for it. I guess I thought this would be easier.

I'd still like to figure this out .

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Antonio Estrada
Antonio Estrada
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK thank you very much.
Just out of curiosity, did that work ?

DM