Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing variables help please!

Status
Not open for further replies.

kyle1

Technical User
Oct 27, 2000
18
US
ok I am trying to pass variables forma flash form to a Lotus Notes Domino form, I can get it ot call a javascript alert but it will not pass the variables anybody????

code in flash I think the set("Stmt".... is my problem

on (press) {
set ( "JavFlashfieldname", NAME );
set ("JavFlashfieldemail", EMAILADDRESS)
set("Stmt","javascript:update('" & NAME & "', '" & EMAILADDRESS & "')");
getURL(Stmt)
}

code in HTMl Head this is in domino so there are some syntax diffences but i don think the problem is here I think it is in the actionscript

&quot;<SCRIPT Language=\&quot;JavaScript\&quot;>&quot; + @NewLine +
&quot;<!--&quot; + @NewLine +
&quot;function update(JavFlashfieldname,JavFlashfieldemail)&quot; + @NewLine +
&quot;{&quot; + @NewLine +
&quot;document.forms[0].DomNamefield.value=JavFlashfieldname&quot; + @NewLine +
&quot;document.forms[0].DomEmailfield.value=JavFlashfieldemail&quot; + @NewLine +
&quot;//document.forms[0].submit()&quot; + @NewLine +
&quot;alert(\&quot;Hello\&quot;);&quot; + @NewLine +
&quot;}&quot; + @NewLine +
&quot;// -->&quot; + @NewLine +
&quot;</SCRIPT> &quot;
kyle
 
If you already have the variables NAME and EMAILADDRESS set by input fields in your SWF, all you should need is:

on (press) {
getURL(javascript:update(NAME, EMAILADDRESS);
}

That will send the 2 variables to the UPDATE function in your HTML, where their values will become JavFlashfieldname and JavFlashfieldemail. Make sure you test it in the browser, not with CONTROL > TEST MOVIE.
 
That is how I originally had intended for it to work but no luck thus far. Seems the problems is with the variables, cause I can use get url to use an alert in JS so I cant see why it cant execute the update function??? this is killing me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top