Ok before i start i better hold my hand up and say i am total useless at javascript. So if this question turns out to have a very easy answer (which i think it might) then i do apologise. I have tried to look for the best solution to my question but i am not even sure what i am looking for.. so here goes..

I have a small text input area where people can enter a postcode, with this i have two submit buttons, each do different things when clicked. Take a look..

HTML Code:
Postcode: <input type="text" id="postcode" size="10" /><br />
	<input type="submit" value="Place Marker" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, placeMarkerAtPoint)" /><br />
	<input type="submit" value="Center Map" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, setCenterToPoint)" />
Ok, now what i want to do is basically do away with all this. So what i intend to do is put the postcode in myself with php echo. And hide it away. So the top line will now look like this...

HTML Code:
Postcode: <input type="hidden" id="postcode" value="<?php echo $postcode; ?>" />
Now, this is where i need help. What i would like to make happen is submit both on the javascript onclick functions as a user enters the page, therefore send the postcode (which has been automatically put in when the user entered the page) automatically over to the external javascript file i have.

So basically when a user enters the page the postcode will be in place and both javascript functions will be activated automatically.

I hope i made this clear. i am a total fool at Javascript.

thanks for any replies or help this may attract.

Thanks