# What is wrong with this javascript?

**URL:** <https://forum.kirupa.com/t/what-is-wrong-with-this-javascript/172264>\
**Category:** web dev\
**Created:** [December 12, 2005, 9:59pm UTC](https://forum.kirupa.com/t/what-is-wrong-with-this-javascript/172264 "2005-12-12T21:59:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![willdrury](https://avatars.discourse-cdn.com/v4/letter/w/5e9695/32.png) [@willdrury](https://forum.kirupa.com/u/willdrury)\
**Post date:** [December 12, 2005, 9:59pm UTC](https://forum.kirupa.com/t/what-is-wrong-with-this-javascript/172264/1 "2005-12-12T21:59:17Z")

</div>

[font=Verdana]I have several popups on my flash site, on these popups I want buttons which return you to the main movie at a certain frame. The buttons on the popups are also in flash movies. So far I have this actionscript on my button…

on(release){  
getURL(“javascript: window.opener.dosomething()”)  
}

and this code in the HTML of my main site…

\<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"\>](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd);  
\<html xmlns=“[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)” xml:lang=“en” lang=“en”\>  
\<head\>  
\<script language=“JavaScript”\>  
function dosomething() {  
if(window.document[‘liveoclothing’]){  
window.document[‘liveoclothing’].GotoFrame(658);  
}  
else if(navigator.appName.indexOf(“Microsoft Internet”)==-1){  
if (document.embeds && document.embeds[‘liveoclothing’]){  
document.embeds[‘liveoclothing’].GotoFrame(658);  
}  
}  
else if(navigator.appName.indexOf(“Microsoft Internet”)!=-1){  
document.getElementById(‘liveoclothing’).GotoFrame(658);  
}  
}  
\</script\>  
\<link rel=“shortcut icon” href=“favicon.ico” \>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /\>  
\<title\>LiVe ‘O’ cLoThInG.cOm\</title\>  
\<style type=“text/css”\>  
\<!–  
body {  
background-image: url();  
background-color: #000000;  
}  
–\>  
\</style\>\</head\>  
\<body\>  
\<!–url’s used in the movie–\>  
\<!–text used in the movie–\>

\<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0)” width=“700” height=“550” id=“liveoclothing”\>  
\<param name=“movie” value=“liveoclothing.swf” /\>  
\<param name=“quality” value=“high” /\>  
\<embed src=“liveoclothing.swf” quality=“high” pluginspage=“[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)” type=“application/x-shockwave-flash” name=“liveoclothing” swLiveConnect=“true” width=“700” height=“550”\>\</embed\>  
\</object\>  
\</body\>  
\</html\>

so far, nothing happens when the button is pressed.

Can anyone help?[/font]
