I simply want to input some from data into my javascript library. The form has the name "signup" and a link has on onclick property to call the "interface_signup()" function in javascript shown below. This is obviously a ridiculous way to do it, but my attempts to use "this" or better ways have not worked. What is the best way to pass this form data in so that I can send it to another fuction in the form of an object? Thanks in advance
var path="interface_login.php"
var key1 = document.signup.fname.name
var key2 = document.signup.lname.name
var key3 = document.signup.email.name
var key4 = document.signup.pass.name
var value1 = document.signup.fname.value
var value2 = document.signup.lname.value
var value3 = document.signup.email.value
var value4 = document.signup.pass.value
var param1 = {}
param1[key1] = value1
param1[key2] = value2
param1[key3] = value3
param1[key4] = value3
ajax_post_two(path, param1);