×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

HTML form into Director

HTML form into Director

HTML form into Director

(OP)
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("http://www.theurl.php", ["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="http://www.pc-i.co.uk/postcode_js.php">
</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="http://www.pc-i.co.uk" target="_blank" title="Business Solutions in Kent">PCI LTD</a> (make sure I have this link wherever I use this code!)

RE: HTML form into Director

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
www.materiaprima.co.uk

RE: HTML form into Director

(OP)
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

RE: HTML form into Director

(OP)
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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close