This topic is locked

Popup Window in View-As/Custom setting?

10/17/2010 6:59:22 PM
ASPRunnerPro General questions
J
jeffstev author

ASPRunnerPro, v6.3/6602
I'm using a View As - Custom type property for a link in a results page, and I want the link to open in a new window. Tried just about everything but not making progress. my usual window.open tricks don't seem to work.
The code I'm starting with is:
if Mid(strValue,1,2)="SO" then
strValue = "<a href='http://localhost:602//form.aspx?formName=PRSALESORDER&formmode=1&ufNo.="; & strValue & "'>" & strValue & "</a>"

Else

strValue = "<a href='http://localhost:602//form.aspx?formName=SALESQUOTE&formmode=1&ufNo.="; & strValue & "'>" & strValue & "</a>"
end if
The links work great, but I want them in a new window that I can control position and size on.

Thanks for any help!
Jeff

A
ann 10/22/2010

Jeff,
here is the correct code:

if Mid(strValue,1,2)="SO" then

strValue = "<a href=# onclick=""window.open('http://localhost:602//form.aspx?formName=PRSALESORDER&formmode=1&ufNo.="; & strValue & "');"">" & strValue & "</a>"

Else

strValue = "<a href=# onclick=""window.open('http://localhost:602//form.aspx?formName=SALESQUOTE&formmode=1&ufNo.="; & strValue & "');"">" & strValue & "</a>"

end if



More info:

http://www.w3schools.com/jsref/met_win_open.asp