flexpaper - A JavaScript problem by a beginner -


good day, i've been searching google on lot of issues have , find answers here , i'm hoping give time answering stupid question. i'm beginner in javascript , happened creating personal site uses flexpaper viewer of files, , i'm wondrin' how can change url based on href users click on. here's flexpaper snippet:

        var swfversionstr = "10.0.0";         var xiswfurlstr = "playerproductinstall.swf";         var file = "1984.swf";         var flashvars = {                swffile : escape(file),               parameters here               };           var params = {              }         parameters , attributes here         swfobject.embedswf(             "flexpaperviewer.swf", "flashcontent",              "700", "550",             swfversionstr, xiswfurlstr,              flashvars, params, attributes);         swfobject.createcss("#flashcontent", "display:block;text-align:left;");` 

i'm planning put viewer on iframe or on side, , links on other side or frame.

<a href="books/google search apis.swf">google search apis</a> 

it should change variable file on code. i'm hoping me out.

try defining following javascript function (which named swapswf):

function swapswf(swfpath) {     swfobject.embedswf(swfpath, "flashcontent", "700", "550"); } 

and use in link proper javascript: prefix:

<a href="javascript:swapswf('books/google search apis.swf')">google search apis</a> 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -