It sounds like the pageA is using javascript to create the link you click to get to pageB (which is why you have to fill the form out first before submitting in order to get a EventId). You need to emulate the javascript behavior somehow .. make
for the link to pageB and get the url, and edit it to make sure it has the right EventId in the query string and then
Beyond that, can't really recommend anything else withouth seeing the source of the page in question (pageA).