Reputation: 933
I have a struts time picker in my parent page like
<sx:datetimepicker id="value1" name="value1" label="Format (dd-MMM-yyyy)"
displayFormat="dd-MMM-yyyy" value="" />
<sx:datetimepicker id="value2" name="value2" label="Format (dd-MMM-yyyy)"
displayFormat="dd-MMM-yyyy" value="" />
and on submit i am calling a pop up window on submit as
<s:submit value="submit" name="submit" onClick="JavaScript:Popup();"/>
<script type="text/javascript">
function Popup() {
var value1= document.getElementById('value1').value;
var newUrl = 'jsp/popup.jsp?value1='+value1;
popupWindow = window
.open(newUrl,'popUpWindow','height=500,width=670,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no,addressbar=no')}
</script>
and in the pop up window i am trying to get the value as
<p>${param.value1}</p>
But i am not getting value1 in the pop up window. i am getting value as undefined
Any idea?
Upvotes: 0
Views: 793
Reputation: 1146
and how exactly are passing the data? I think you are getting nothing because you are sending nothing. You could simply do this:
Upvotes: 1