Trying to open a doc on the web with a fixed width and height

I have some code in a column , what I want to do is to have the documents from the
view open in a fixed size window on the web…
how can I accomplish this… everything I tried did not work,

“{<A HREF="/”+db+“/WebView/”+@Text(@DocumentUniqueID)+“?OpenDocument&L=” + CCD +
“&" target="_new">” +PouDF + “]”;

thanks for any clues you can give me.
paul

Subject: Trying to open a doc on the web with a fixed width and height

To get a fixed-size window, you need to use the window.open method in JavaScript. In order to keep the view (and the web page) small, use a JavaScript function in the view template’s JS header (or in a JavaScript library referenced on the template) to do most of the work:

function popDoc(unid) {

var loc = window.location.href;

loc = loc.substring(0, loc.indexOf(“.nsf”) + 4) + “/viewname/”;

var newWin = window.open(loc + unid + “?OpenDocument”, “”, “status=no, toolbar=no, location=no, menubar=no, height=500, width=500”);

}

For accessibility reasons, you should leave the href as is in the link, but remove the target attribute add the attribute:

“onclick="popDoc('” + @Text(@DocumentUniqueID) + “');return false;”

That way users who are running JavaScript will get a fixed-size pop-up window, but those who can’t run JS will get the document opened anyway. (New windows are bad for accessibility, so if you have visually impaired users or users who have difficulty with fine motor control, opening the document in the same window will improve their ability to use the application.)

Subject: RE: Trying to open a doc on the web with a fixed width and height

Roger… I don’t know where to put this code…

“onclick="popDoc('” + @Text(@DocumentUniqueID) + “');return false;”

you don’t mean in the view column right?

paul

Subject: RE: Trying to open a doc on the web with a fixed width and height

Yes, that goes in the <a …> tag in the view column, right after the href= stuff.