I am trying to take the value of an outputfield in a query string but not sure how. What I have works for an inputField but not outputField. Any ideas?
VisualForce Page
<apex:page standardController="Account" extensions="Items">
<apex:outputPanel layout="block" style="overflow:auto;width:500;height:180px">
<apex:form onsubmit="openWindowPopup(); return false;" styleClass="formId">
<apex:pageblock id="table">
<script>
var openWindowPopup = function(){
var number = document.getElementsByClassName("number")[0].value;
window.open('https://www.form.com?numId='+number);
}
</script>
<apex:pageblocktable id="pageBlockId" value="{!AssetLines}" var="lines">
<apex:column >
<apex:commandbutton value="Generate" reRender="table" />
</apex:column>
<apex:column headerValue="Numbers" >
<apex:outputField var="Num" value="{!lines.Number__c}" styleClass="number"/>
</apex:column>
</apex:pageblocktable>
</apex:pageblock>
</apex:form>
</apex:outputPanel>