473,513 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help, New to Flash and Javascript

I have the following code I am calling from a flash file. Everything
works fine except that the string it returns for the file location
does not include the slashes. It is returning
G:SwaneyDownloadsReadme.txt instead of G:\Swaney\Downloads\Readme.txt.
Is it something in my code that is causing this, or how flash is
interpreting the variable?

<!--
function browse()
{
document.forms.upload.file.click()
while(document.forms.upload.file == "")
{
setTimeout(100)
}
idio_controller()
}

function submitIt(){
document.upload.submit()
}

function idio_controller() {
var obj=parent.main.uploadflash;
if (obj) eval('obj.SetVariable("filename",
"'+document.forms.upload.file.value+'")');
}
//-->
Jul 20 '05 #1
1 1344


Eric wrote:
I have the following code I am calling from a flash file. Everything
works fine except that the string it returns for the file location
does not include the slashes. It is returning
G:SwaneyDownloadsReadme.txt instead of G:\Swaney\Downloads\Readme.txt.
Is it something in my code that is causing this, or how flash is
interpreting the variable?

<!--
function browse()
{
document.forms.upload.file.click()
while(document.forms.upload.file == "")
{
setTimeout(100)
}
idio_controller()
}

function submitIt(){
document.upload.submit()
}

function idio_controller() {
var obj=parent.main.uploadflash;
if (obj) eval('obj.SetVariable("filename",
"'+document.forms.upload.file.value+'")');


Throw out the eval, use
if (obj && obj.SetVariable) {
obj.SetVariable("filename", document.forms.upload.file.value);
}
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3147
by: Astra | last post by:
Hi All I have a Javascript to detect whether a client's browser has flash installed, but as so many people are putting me off relying on Javascript, could you please let me know if you know how...
2
1881
by: kevin | last post by:
hi there I am struggling with javascript. Can you please help me I've managed to get the get URL in flash to open a html that has the function that opens the Feedback form I want. I Couldn't...
4
1975
by: kevin | last post by:
meta refresh tag is failing , it is supposed to go to the entry1.htm site which is the flash swf file but it doesn't check code please http://members.optusnet.com.au/~kevindauth/ thanks...
5
2964
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
18
12637
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
4
1348
by: Irfan Akram | last post by:
Hi People, I need to add flash buttons to ASP.NET page. Problem is I have added them, but I am not able to link events with those buttons, as with normal ASP.NET buttons. I am sure there is a...
3
2748
by: loredana | last post by:
Hi, I have a javascript automatically created by adobe captivate 2 to generate an html file that integrates the desired my.swf file and the skin for the flash player (my_skin.swf). The script...
5
3680
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
5
5932
by: ASP.NET explorer | last post by:
I have been asked to create some simple animation using Adobe Flash player in ASP.NET(C#) web application. While I am fairly well versed with ASP.NET C#, I absolutely have NO IDEA about how to...
8
38420
by: camphor | last post by:
I uploaded index.html, index.swf, the Scripts folder with 'AC_RunActiveContent.js' in it to http://www.paulineng.co.uk, it takes a long time to load & once it has loaded and I right-click, it says...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.