<input type=submit name=search value=Search onclick="changeTarget()">And this JavaScript:
function changeTarget() { if (document.getElementById('format').value == 'new_window') { document.getElementById('mainForm').target = '_blank'; // Not sure of the significance of using either or both of the following 2 lines, but that’s not my main problem. document.getElementById('destination').value = 'original_window'; document.getElementById('original_window').selected = true; } else { document.getElementById('mainForm').target = '_self'; } }When I run the above code and do a Search with a Destination of “New Window”, a new window is opened (that's good), and the Destination option gets set back to “Original Window” in the original window (that's good), but presumably because of the latter, the “destination” HTTP parameters get passed with a value of “original_window”, presumably because the Destination was reverted before the new window was created.
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE