A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Sending variables to javascript functions from flash?

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    17
    Anyone know if its possible to send variable data to javascript functions from flash. I would like to make it so when a user clicks a button it sends data to a javascript function which in turn redirects the browser to a new location. The code for the javascript function kinda looks like this:
    Code:
    <script language="javascript">
    function SC_submitForm(n) {
    switch(n)
    {
    
    case 'search':
    window.location =
    "/SCcgi-bin/SoftCart.exe/scstore/scstore.html?L+scstore+%%SoftCart.sessionID%%";
    break;
    
    case 'products':
    window.location =
    "/SCcgi-bin/SoftCart.exe/scstore/shophome.html?L+scstore+%%SoftCart.sessionID%%";
    break;
    ...
    Basically i need it to switch on a variable and go to the correct location. Unfortunately i can't use 'getURL' in flash because i need the sessionid produced by the shopping cart software.
    Thanks for any help!


  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    323
    this will call your function

    getURL("JavaScript:SC_submitForm('search')")

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    17
    Perfect! Thats exactly what i needed to know... thanks for all the help

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