Member_2_7971128
asked on
Addition to JavaScript to open results in new window
JavaScript code text file is attached.
Right now when clicked, or hit entered the results display on the same window. Would like the results to open in new window or tab.
Thanks!
JSCode.txt
Right now when clicked, or hit entered the results display on the same window. Would like the results to open in new window or tab.
Thanks!
JSCode.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes I tried window.open, didn't work.
Sorry can not use iframe, that is not a requirement. Will have to find another way.
Thanks.
Sorry can not use iframe, that is not a requirement. Will have to find another way.
Thanks.
Is there default behavior on your click element that needs preventDefault() called?
This question has been inactive fo more than 14 days, and will be closed for clean up, Points split for experts comments as a possible solution.
the code below may work for you -
Open in new window
I added the encodeURIComponent( ) to make sure the input text was correct for a "URL" string, which does not allow certain characters