Solved

flash button + javascript

Posted on 2003-11-18
5
221 Views
Last Modified: 2010-04-03
i am very stuck whit a problem

it seems not to work for me if i set it on a server

in flash:
a simple button whit:
on (release) {
   getURL("javascript:test()");
}

and in asp:

<script>
function test()
{
  var l = ''+opener.document.location;
  if (l.indexOf('Action=Cancel')<0) {
  l += (l.indexOf('?')<0 ? '?' : '&') + 'Action=Cancel'
  };
  opener.document.location = l;
  window.close();
}
</script>
<% UID = request.querystring("UploadID") %>
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE>...</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<OBJECT classid=...
<PARAM NAME=...>
<EMBED>...</EMBED>
</OBJECT>
</BODY>
</HTML>
0
Comment
Question by:SniperVegeta
  • 2
5 Comments
 
LVL 23

Expert Comment

by:adilkhan
ID: 9771547
 > var l = ''+opener.document.location;
missing the Closing "

also try this

var l = eval(''opener.document.location")
0
 

Author Comment

by:SniperVegeta
ID: 9771635
it isnot duble quotes but 2x single

like space+shomething

the problem is wenn i do this it works yust fine:
Only wenn i do the flash thing whit it it will not work at me
only seen it worked on 1 pc ... even he doesnot know what the error is..

(u need to open this page via other window)

<script>
      function test()
      {
      var l = ''+opener.document.location;
      
      //Add Action=Cancel querystring parameter
      if (l.indexOf('Action=Cancel')<0) {
            l += (l.indexOf('?')<0 ? '?' : '&') + 'Action=Cancel'
      };

      //Set the new URL to opener (upload is cancelled)      
      opener.document.location = l;

      //Close this window.
      window.close();
      }
</script>
<Input Type=Button Value='Cancel upload' OnClick='test()'>
0
 

Author Comment

by:SniperVegeta
ID: 9787558
got it

i wass using 4 frames in flash...

and in frame 1 it readed the contend
and in frane 2 it showed the contend
and frame 3 redirected to frame 2
and in move 1 button onclick (the one in abouve question)

then

so every time it passed frame 2 it buffered the reading contend
and then i didnot got a resonse wenn i pressed the button

reaqding+reading+ect.ect.ect+finly response cancel or crash :(

i inserted more frames now for the reading and showing contend

now it works fine :)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12186221
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now