Avatar billede onkelbo Nybegynder
27. december 2001 - 17:50 Der er 11 kommentarer og
1 løsning

Please help - Load variables problem

Okay - here\'s the deal:

I\'m trying to load some variables to a jsp-file from my Flash and I can\'t get it to work.
I works fine if i \"getURL\" but that\'s not what I want. I want to load the variables and use the response the jsp-file gives me and then use it in my Flash.

I\'m using the following command on a button which submit a \'form\' with 3 textfields.
All my variables and so forth have been checked again and again, so that\'s not where the problem is.

--------------------------
loadVariablesNum (\"http://anotherdomain.dk/notmyjspfile.jsp?var1=\"+vara+\"&var2=\"+varb+\"&var3=\"+varc+\"\", 0, \"POST\");
--------------------------

And now for the really strange part:

When I upload the the HTML and the SWF file to my server (of course I delete my temporary Internet files and then refresh) it doesn\'t work. Nothing gets shipped to the jsp-file and thus nothing gets submitted to the database.
BUT... - when I preview my Flash in the program (You know ctrl+Enter) it works..!?!?!?! Then I get the correct response...

AAaarrgghh.. - anybody who can tell me why?
Or have an idea?

Your help will be much appreciated!

Regards

Svar bare på dansk - kan godt læse det... ;-)
Avatar billede lingoman Nybegynder
27. december 2001 - 18:10 #1
Any variables you may have in the timeline is automatically appended to the URL when you use the \"POST\" method. the response must be urlencoded as well.
Avatar billede onkelbo Nybegynder
27. december 2001 - 18:16 #2
It is...

The thing is:

It works if I test it local.. - you know from Explorer, where I open the HTML-file, but when I upload it and type in the URL (http:// etc.) it doesn\'t..

Could it be a server problem?

Greetings

Avatar billede lingoman Nybegynder
27. december 2001 - 18:19 #3
I doubt it... but the real experts who can help won\'t be here until sometime tonight :(
Avatar billede lingoman Nybegynder
27. december 2001 - 18:57 #4
are both your .swf and the jsp files located at the same domain ? otherwise loadVariablesNum() does not work
Avatar billede onkelbo Nybegynder
27. december 2001 - 19:19 #5
They are not, but then please explain why it works fine when I open the html (and swf) file locally:
C:\\Documents and Settings\\Myname\\My Documents\\..etc.etc.\\flashthing.html and then submits the flash with \'LoadVariablesNum\' and here it works?!!? I get the correct answer from the jsp file which resides on another server.
Then I upload it to my own server (my ISP that is).. - here it doesn\'t...

Isn\'t that strange or am I just a nut?

Greetings...

Avatar billede lingoman Nybegynder
27. december 2001 - 19:30 #6
The Flashplayer is buildt to accept variables from the same domain as that hosting the *.swf issuing the loadVariables() command. This is for security reasons. When testing locally these restrictions no longer apply because the possibility of \"snooping\" in documents belonging to others is remote.
Avatar billede lingoman Nybegynder
27. december 2001 - 19:33 #7
If you upload your files to the same host your problems should disappear. Giv it a try :)
Avatar billede onkelbo Nybegynder
27. december 2001 - 19:40 #8
Thanks a million.

I\'ll try it tomorrow and if it works you\'ll get your points if you\'d like...


Kind regards


Avatar billede lingoman Nybegynder
27. december 2001 - 19:42 #9
OK, I\'ll post an answer now and keep my fingers crossed (c:
Avatar billede nikolajdu Nybegynder
28. december 2001 - 09:49 #10
Avatar billede onkelbo Nybegynder
28. december 2001 - 10:29 #11
Thanks - very helpful!
Avatar billede nikolajdu Nybegynder
28. december 2001 - 10:30 #12
:-)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester