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

129
Views
Dynamically change URL through event listener

I have an web app that is basically a wiki. When the content is being shown in a parent window there is a menu bar that I am rendering through server-side code.

What I want to do is sometimes use an IFRAME for this content... but when content is generated in the IFRAME I don't want the menu bar to be generated.

I have been adding a simple "&frame=true" parameter to the URL when initially targeting the IFRAME .src (my server-side code reads this param and doesn't generated the menu bar), but my problem is that when navigating hyperlinks within the IFRAME that this "&frame=true" param is lost obviously... and subsequent pages will have the menu bar again.

What I would like to do is to intercept the hyperlink click (let's assume it's all my domain) using an event handler, and if the parent is the IFRAME, add the "&frame=true" parameter to the URL and then fire the hyperlink and page load normally.

I could dynamically regex the of HTML of pages being shown in the IFRAME and add "&frame=true" to ensure subsequent hyperlink clicks don't generate this menu... but looking for a more elegant and less computational approach.

about 4 years ago · Juan Pablo Isaza
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!