Wrong window opens up on URL click

RadhaKrishnaKiJaya
RadhaKrishnaKiJaya used Ask the Experts™
on
Hello Experts,
I have a Onclick event attached to button which should open a window (on Javascript), which is working just fine.  But, when I click on another URL same window opens up, which is not related to the URL at all.  Any idea what could be going on?  Please try to help.  Thank you in advance.

Note:  Due to company's restrictions I will not be able to post the code here.

Thank you!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi Radha,

Without looking at the code it is really difficult to guess what is going on. You can always remove sensitive information and then post the code here.

Regards,
Chinmay.
Jeffrey Dake Senior Director of Technologyy

Commented:
100% guess, but you could have the target window names being the same. This could be causing your link to open in the same window that was opened previously
just a guess, your are using global variable in JS file and storing the url in it. The variable is also being used in other area of as well without properly resetting the value.
Chinmay, Jeffrey and Omer for your support.  The other window was getting loaded because, it was included in the of Java Script.  Thank you all again for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial