A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Javascript link

  1. #1
    FK Teletubbie Crew !
    Join Date
    Jul 2000
    Location
    California
    Posts
    73
    if i wanted to correlate this code<script language="javaScript">
    <!--
    function isLeelouCompliant()
    {
    answer=false;
    version=Math.round(parseFloat(navigator.appVersion ) * 1000);
    if (navigator.appName.substring(0,9) == "Microsoft")
    {
    if(version>=4000) answer=true;
    }
    if (navigator.appName.substring(0,8) == "Netscape")
    {
    if ((navigator.appVersion.indexOf("Win")> 0) && (version>=4060))
    answer=true;
    else
    if ((navigator.appVersion.indexOf("Linux")> 0) && (version>=4060))
    answer=true;
    else
    if ((navigator.appVersion.indexOf("SunOS")> 0) && (version>=4060))
    answer=true;
    else
    if ((navigator.appVersion.indexOf("Mac")> 0) && (version>=5000))
    answer=true;
    }
    // other one with plug-in (ie opera+plug_in)
    plugins=navigator.plugins;
    if (plugins!=null)
    {
    for(i=0;i!=plugins.length;i++)
    if((plugins[i].name.indexOf("Java Plug-in")>=0) && (plugins[i].name.indexOf("1.0")<0))
    answer=true;
    }
    return answer;
    }

    function openViewlet(htmlFile,htmlWidth,htmlHeight)
    {
    str = 'resizable=0,toolbar=0,menubar=0,';
    str = str +
    'scrollbars=0,status=0,location=0,directory=0,widt h=350,height=200';
    if(!isLeelouCompliant())
    {
    open("http://www.qarbon.com/warning/index.html",'Leelou',str);
    }
    else
    {
    if(document.all)
    {
    htmlWidth+=5;
    htmlHeight+=10;
    }
    window.open(htmlFile,'Leelou','width='+htmlWidth+' ,height='+htmlHeight+',top=10,left=20');
    }
    }
    // -->
    </script>

    into a link would i just insert it like i woul a normal link but add that whole entire thing or is there a special way of doing it.
    Peace Out
    Jon


  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    148
    When I use flash to talk with HTML pages using variables and Javascript, I just use the get url command with the javascript command in it like this
    "JavaScript:movetotal(\"" add total1.totalCost add "\")"
    movetotal would be your functions name.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center