0

I'm working on an application that has many links. They all open in the same window, until today. All of a sudden, in all browsers I'm testing in, 3 links in an iframe or object (I've tried both) start opening in a new window. I can't seem to stop this.

An object example follows. The dolnks program generates 3 simple links like the one following the object example and these links open in a new window.

<OBJECT ID='fixed' DATA='dolnks.cgi?str=$params' TARGET='dynamic' NORESIZE></OBJECT>

darea.cgi?str=$dogstr

Can someone help me understand this and how to get these links to open in the same window. All links that now open in the same window or should be opening in the same window are from the same domain.

I now have to close the link instead of using the back button.

Thanks, craigt

craigt
  • 19
  • 4

1 Answers1

1

I imagine it's because of your TARGET attribute, although it's not using one of the special target values:

target

Where to display the linked URL, as the name for a browsing context (a tab, window, or ). The following keywords have special meanings for where to load the URL:

  • _self: the current browsing context. (Default)
  • _blank: usually a new tab, but users can configure browsers to open a new window instead.
  • _parent: the parent browsing context of the current one. If no parent, behaves as _self.
  • _top: the topmost browsing context (the "highest" context that’s an ancestor of the current one). If no ancestors, behaves as _self.

From the MDN Docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes

Note though that the docs for object do not list a target attribute, so that behavior is apparently undefined, and probably varies depending on the browser, and the plugin displaying the object.

Check to see if it's the items with a target attribute (case does not matter) that are working "wrong", and see if removing that attribute fixes it. If that's not it, next check to see if there are javascript being loaded. Try turning javascript off (hopefully the relevant links are not generated with javascript) and see if that fixes the behavior. If turning javascript off is too heavy handed, you can use the javascript console to see what listeners are attached to the links.

Garrett Motzner
  • 3,021
  • 1
  • 13
  • 30