Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Dont know if java

    Don't know if this should be java php flash or another language basically i've written a sample of what i want in flash and BASIC language (and written what i dont know how to do) but I can't get it to work in flash (tried the php flash) I want to have a user input text in a text field like "2008-6-30_today" ($file below) i then want that to create 5 xml files with that name each a different name in front and extension at end like "/video/2008-6-30_today.xml" inside that file i have xml script i'm putting in in which that same file name will locate other files.

    Code:
    ----display page-----
    Name: [input field called $file]
    submit button [hit]
    ---hit state----
    on (release) {
    create file ("video/$file.xml");
    create file ("photo/$file.xml");
    create file ("text/$file.xml");
    create file ("podcast/$file.xml");
    create file ("speech/$file.xml");
    in "video/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "photo/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "text/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "podcast/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "speech/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    }
    on(keyPress "<Enter>") {
    create file ("video/$file.xml");
    create file ("photo/$file.xml");
    create file ("text/$file.xml");
    create file ("podcast/$file.xml");
    create file ("speech/$file.xml");
    in "video/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "photo/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "text/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "podcast/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    in "speech/$file.xml" write "yadayadayada xml scripts and such" $file "dont want anyspaces between them yadayadayada" $file "more xml etc."
    }
    Thanks for your help
    Last edited by WA; 06-30-2008 at 09:49 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,919
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    This is the JavaScript forum. Java and Javascript are entirely different programming languages, in spite of the confusingly similar names.

    JavaScript is purely a client-side language, and has no capability to read from or write to a file (except a cookie), access a database or the client's operating system. And for security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin.

    You need a server-side language, or possibly AJAX.

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    this doesnt have to be online though is there any other way i could do it cause i dont know ajax


  •  

    Posting Permissions

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