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!

HTML form into Director

Status
Not open for further replies.

retrodans

Programmer
Dec 13, 2005
15
GB
I have a basic form from an HTML page, and want it to run in director, sending 2 postcodes, and receiving back the miles! How do I get a form to work, I assume its kindof like
DistanceID = getnettext(" ["postcode_a": PostcodeTo, "postcode_b": PostcodeFrom])
This should send the information to it, but how to I receive the variable miles back?
Cheers
Dan

/////////

<script language="javascript" type="text/javascript" src="</script>

<script language="javascript" type="text/javascript">
if(postcode_a != ""){
document.write(postcode_a + " is approx. " + miles + " miles away from " + postcode_b + "<hr/>");
}
</script>

<!-- This is the basic form needed to sumbit the data to PCI //-->
<form name="zip_lookup" id="zip_lookup" method="get">
Postcode A : <input type="text" name="post_a" id="post_a" /> <br/>
Postcode B : <input type="text" name="post_b" id="post_b" /> <br/>
<input type="submit" value="Lookup Distance" />
</form>

<!-- Required Link //-->
Script Provided by: <a href=" target="_blank" title="Business Solutions in Kent">PCI LTD</a> (make sure I have this link wherever I use this code!)
 
I'm afraid this is not really a Director issue. If you want to use the PHP in the way you're trying, you have to modify the PHP first, as it is written to be used in the HTML.

However, you can use Director or Flash to capture the user input and display the result without modifying the PHP script. If you want to do that then you have to send the query to the HTML (not PHP), then send the result to DCR/SWF by using SW-vars/FlashVars.

Kenneth Kawamoto
 
Sending and receiving to the HTML sounds perfect, I guess it uses the same get net text to send the info (except to the HTML instead) so will try this, but could not find any info on SW-vars anywhere? Is it javascript I assume? $swvars how it's written?
Cheers for your help with this!
Dan Duke
 
Cool, well it sends a static variable to me in IE, doesn't seem to work in firefox. But more importantly, I cant see how I am going to get the variables from director to the HTML, getnettext can send variables, but how can I get it to put them in the form boxes, and click go?
Thanks so much for your advice!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top