¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Web Connect Question


 

Einar:

Currently I have approximately 2 approaches:

1. Just a hyperlink to another form. When clicked, the next form fills in the current screen. It's that scenario that I'd like a new browser window to open.

2. My second approach I open a separate window, but most of it's control features don't appear. Here's the code:

Within my PRG that generates the screen that contains the button to jump to a different URL:
Basically, I want the user to click a button and be taken to "CodeEdit.TIS" in a separate browser window. Currently it takes them there in a different browser window, but the resultant window is missing some of the standard navigation features, etc.

***within a PRG:

lobtn18=NEWOBJECT("PDwebButtonToFULLWindowURL","pcdwc.prg")
lobtn18.cvalue="Codes EDIT"
lobtn18.cwinfunction="ViewLogPopup()"
lobtn18.cwinName="ViewPop"
lobtn18.lReadOnly=.f.
lobtn18.cwinURL="CodesEdit.TIS"

lobtn18.renderjava()
***

And - within my "PCDWC.prg":

DEFINE CLASS PDwebButtonToFULLWindowURL AS PDwebControl

** this is similar/same as PDwebButtonToPopupURL - except trying for a full-blown separate window
** coordinates of the resulting window
nwinLeft=5
nwinTop=5
nwinWidth=700
nwinHeight=350
** name of called popup function
cwinFunction=""
cwinClick=""
cwinUrlVars=""
** URL to call
cwinURL=""
cwinURLoFormCall=""
** retain reference to the java object created at top of calling page routine
cwinName="POPUP"

FUNCTION Render
RETURN THIS.RenderButton()
ENDFUNC

FUNCTION RenderJava

response.writeln([<SCRIPT LANGUAGE="JavaScript">])
response.writeln([<!--])
response.writeln([ function ]+this.cwinFunction+[{])
** I feel like some setting here needs to be set to give standard browser navigation ability
response.writeln([ var windowprops="location=yes,scrollbars=yes,menubars=yes,toolbars=yes,resizable=yes,controlbox=yes,controls=yes,left=]+;
TRANSFORM(this.nwinleft)+[,top=]+TRANSFORM(this.nwintop)+;
[,width=]+TRANSFORM(this.nwinwidth)+[,height=]+TRANSFORM(this.nwinheight)+[";])
response.writeln([var URL ="]+this.cwinURL+["]+this.cWinUrlVars+[;])

response.writeln(this.cwinName+[=window.open(URL,"MenuPopup",windowprops)])
response.writeln(this.cwinName+[.focus()])

response.writeln([}])
response.writeln([-->])
response.writeln([ </SCRIPT>])

ENDFUNC



FUNCTION RenderButton


** define the button on the page
IF empty(this.cwinclick)
this.cwinclick=this.cwinfunction
ENDIF

RETURN ;
[<input type=button value="]+this.cvalue+["] +;
[ onClick="]+this.cwinclick+["]+;
IIF(THIS.lReadOnly,[ DISABLED>],[>])

ENDFUNC

ENDDEFINE

peter d.



Please post the code that currently opens the browser window.

Einar




-----Original Message-----
From: Foxprotalk@... [mailto:Foxprotalk@...]
Sent: Friday, May 14, 2004 8:58 AM
To: madfox_vfp@...
Subject: [madfox_vfp] Web Connect Question

What's the code/setting required so that a browser form will open in a
new, separate, full-functioning browser window?

I have a WC app that opens separate windows - but they aren't full
browser windows.

Peter d.




Yahoo! Groups Links









------------------------ Yahoo! Groups Sponsor ---------------------~-->
<FONT COLOR="#000099">Yahoo! Domains - Claim yours for only $14.70
</FONT><A href="><B>Click Here!</B></A>
------------------------------------------------------------
---------~->


Yahoo! Groups Links


Join [email protected] to automatically receive all group messages.