List X has the setting "Launch forms in a dialog? = NO" . Within listX this works perfect.
List Y has a lookup field to the ID of list X.
When click the hyperlink on the "ID:listX" field in the "allitems.aspx" of listY the dispform for list X appears in a modal dialog form.
Problem here is when they open another item from this dispform it apears in a modal form within the modal form. When a user then tries to open an attachment, a red error cross with the title "dialog" opens in the background modal form.
If you want to open a lookup field in a full page mode, you should edit the xslt view using SharePoint Designer.
By default, Lookup fields are formatted by SharePoint before even getting passed into the xsl, so that xsl:value-of will output a whole block of HTML, including the surrounding <a> tag to /_laytouts/listform.aspx. There have the raw value
available, in a form that looks like "id;#value", and that raw value can be found in the same row data xml as the formatted value, with a . appended to the attribute name. For example, if your lookup field is called "IDofListX", its formatted value is in the
attribute "@IDofListX", and the raw value in the attribute "@IDofListX."
You can delete the orginal "IDofListX" in the xslt and then drag IDofListX. to the view
To get just the raw value, you need to do two things - add a . to the name of the attribute, and strip off the id;# prefix. The following bit of xsl should do that: