0

Hi I am new in Javascript. Actually I am using window.open() function.when i am click on link then it open new window and load all data but when i submit form then I am not able to get data from there. But It's working fine in Mozilla can someone help me. I am using code

<a href="JavaScript:viewTalentDetails(<%=objTimesheet.getUsrId()%>,
'<%=objTimeDetailData.getStartDate()%>','<%=objTimeDetailData.getEndDate()%>')"> test</a>

JS

function viewTalentDetails(usrid, stDt, endDt){ 
  var prjid = document.getElementById("hdnPjId").value;
  var prjname = document.getElementById("hdnPrjName").value;
  newwindow=window.open("TalentDetailForTimesheet.action?hdnUsrid="+usrid+"&hdnstDt="+stDt+"&hdnendDt="+endDt+"&hdnPjId="+prjid+"&hdnPrjName="+prjname,"Talent Detail","menubar=no, height=600, width=800,resizable=yes,toolbar=no, scrollbars=yes");
}
1
  • Opening windows is not ideal for a number of reasons, one of which is being able to extract data from it. If you're used to writing windows applications, browser windows don't work in the same way. The more accepted way is to open a "fake" window on the same page. If you wanted it physically in a separate page, there are ways to include other pages in jsp. Commented Feb 24, 2016 at 8:30

1 Answer 1

0

if you only have troubles with checkbox try read this: Get checkbox value on form submit and store in a variable using jQuery

if you want to know what data are you sending to server: use developer tools (in google chrome [ctrl] + [shift] + i), select network tab, submit your form, select the row, select headers tab, go down and see Form data, verify your form sent complete data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.