Hi all. I need some help please with some bits of code. It may be very obvious to you guys but it's not to me.
I need to get a value from a form field in my web page into a part of some javascript code. When the page loads, php will echo a value to the hidden form field below. Example it may echo the value: "8888888888888". How can I get this value to appear in the javascript code in place of "xxxxxxxxxxxxx" ?
I think it is something along the lines of "Document.Form.formname.fieldname.value."
But not sure.
Can anyone help please?
<form action="" method="post" name="form1">
<input name="value1" type="hidden" value="8888888888888">
</form>
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = xxxxxxxxxxxxx;
var google_conversion_language = "en_GB";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "YQ4tCI-jgfy6rytfug";
//-->
</script>
What do I write in in place of xxxxxxxxxxxxx to get the form value to show?
Thank you
Mike