I’m developing a site where you can click on a thumbnail of a company logo, which pops up a window containing some additional information about that company. This popup window is devoid of features - no scrolling, resizing, buttons, etc. Trying to keep it small.
Within this popup window is a link to the company’s website. When clicked, I’d like to have one of two things happen. Either would do.
Either that popup window magically changes to a normal browser window - larger, scrollable, resizable, buttons, etc.
or…
When the link is clicked, that window closes and the company’s website is opened in a newly created fully-functioning browser window, so that the original web page stays available.
Is this possible?
Thanks in advance for any help. And fwiw… my javascript skills are rudimentary.
I’m sorry if I’m misunderstanding you, but the critical part to all of this is that the parent MUST NOT navigate anywhere else. That page MUST remain. I need a new browser window to open. NOT the parent.
Yeah, I generally copy/paste any javascripting I need. I fall way short if I have to come up with something on my own. So I depend on the kindness of strangers.
Instead, use traditional scripting events so that you can much more easily run some scripting.
Under a couple of the listings on the left are “Please see our ad” links that will generate a popup ad. I removed the resize restriction so that you can see what happens and view the code.
The problem is that you don’t actually have it on the popup page as script code.
That script that’s just below the <body> tag, move it to the end of the body, just before the </body> tag and put the rest of the script code in there as well.
Ultimately, you could move the script code out to a separate file and use the src attribute to load the script from there.