Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
How to Override new tab when grid row is clicked using javascript

I Have a grid on first tab, when I click on first row , it opens new tab and first row details will be displayed , when I click on second row, already opened new tab should be overriden with second row details. How to do it using jQuery & JavaScript ?

Below is the code I am using currently and it is opening multiple new tabs instead of overriding.

window.open(_navUrl, '_blank','noreferrer',true);
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

window.open(_navUrl, '_blank','noreferrer',true);

Well, your noreferrer value should be a unique referer, for example "tab1", "tab2", "tab3", ...

Then you could refer to it when opening your new window.

about 4 years ago · Juan Pablo Isaza Report

0

The windowName parameter controls which window/tab is used.

https://developer.mozilla.org/en-US/docs/Web/API/Window/open

A DOMString specifying the name of the browsing context (window, or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowName.

...

To open a new window on every call of window.open(), use the special value _blank for windowName.

So by using _blank each time, you are explicitly saying: open a new window. Instead, use the same name each time, eg

window.open(_navUrl, 'gridtab','noreferrer',true);

then it will reuse the same window/tab.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!