473,748 Members | 2,611 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:SwaneyDownloa dsReadme.txt instead of G:\Swaney\Downl oads\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.cli ck()
while(document. forms.upload.fi le == "")
{
setTimeout(100)
}
idio_controller ()
}

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

function idio_controller () {
var obj=parent.main .uploadflash;
if (obj) eval('obj.SetVa riable("filenam e",
"'+document.for ms.upload.file. value+'")');
}
//-->
Jul 20 '05 #1
1 1360


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:SwaneyDownloa dsReadme.txt instead of G:\Swaney\Downl oads\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.cli ck()
while(document. forms.upload.fi le == "")
{
setTimeout(100)
}
idio_controller ()
}

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

function idio_controller () {
var obj=parent.main .uploadflash;
if (obj) eval('obj.SetVa riable("filenam e",
"'+document.for ms.upload.file. value+'")');


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

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
3155
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 to detect whether a browser has flash installed using ASP. Many thanks. Robbie
2
1901
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 get the feedback form to load directly from the flash because I had to use the function in dreamweaver that opens it with the specifications I wanted. That being just a simple box with no menus etc...
4
1994
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 kevin
5
3001
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 <<<<<<<<<<<<<<CODE>>>>>>>>>>>>>>>> <html>
18
12698
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 state, the HTML page URL would change from default.html to default.html#stateA. example: http://pearstudios.com/javascript/locationHashAndFlash.html This has worked perfectly within HTML and javascript alone, however, when connecting Flash and...
4
1359
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 way...... Will look forward for yiour earrly response...
3
2762
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 within the html page is this: <script type="text/javascript"> <!-- writeDocument('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"...
5
3695
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 for repeated html im using the external js, i mean the TOP, BOTTOM they are repeated in every page, so i include them as functions in the external js and call them. Why it doesn't work?
5
5949
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 say "Hello World" in a Flash enabled web page rendered via ASP.NET. Can any one let me get started? ---
8
38431
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 movie not loaded. Below is the html/flash file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta...
0
8995
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9332
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8252
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.