passing parameters to iframe inside wordpress page

i wanted to move two inputs data to iframe in other page in the same site this is what i did

first in the home page i added a form and added this code


<input type="submit" class="wpcf7-form-control wpcf7-submit" value="submit"  onclick="createNewContract();return false;" >

function createNewContract() {

location.href = ' form/'+'?townId='+document.getElementById("townId").value+'&wasteAmount='+document.getElementById("wasteAmount").value;


Leave a Reply :)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s