0

I have below javascript function . I am trying to open a jsp in new window and pass some values from this function :

function editStudent(fname){
    alert("hi");
    var editWindow = window.open("studentEdit.jsp?fname="+fname, " ", "width=300,height=300");
    editWindow.focus();
}

Above javascript function will be called on button click. New window is opening but the parameter is returning 'null' in the studentEdit.jsp

putvande
  • 15,068
  • 3
  • 34
  • 50
ANITI
  • 21
  • 2
  • 7

1 Answers1

0

It sounds like you need:

<input type="text" name="fname" value="${param.fname}">

This might be helpful: https://stackoverflow.com/a/1890462/989516

Community
  • 1
  • 1
Kevin Collins
  • 1,453
  • 1
  • 10
  • 16