javascript - build a script to grab data from HTML Form and place it on -


i have short script pulls information site called rpr. wondering if can build page contains html form input field called "address" , when form submitted fills out "query" line automatically on next page?

<script type="text/javascript"> var rpravmwidgetoptions = { token : "0596733f-54fc-4c23-89c8-8b021a6e486c", query : "278 s 23rd st, philadelphia, pa 19103", cobrandcode : "btsusspaces", showrprlinks : true }  </script>     <script type="text/javascript" src="//www.narrpr.com/widgets/avm-widget/widget.ashx/script"></script>          

when submit form, address sent via post or get.

you can add hidden input :

<input type="hidden" id="my_address_post" value="<?php echo $_post['address']; ?>"> 

then in javascript value of input in variable , write variable name in "query" :)

var my_address = document.getelementbyid('my_address_post').value; 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -