Home > Archive > dBASE Web Applications > April 2005 > IE activx and save as









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author IE activx and save as
Trivun

2005-04-04, 8:03 pm

Hi,

I wish everybody happy new 2005.

i have played with IE activx, a little.

Does anybody knows how to save file with IE activex, like pdf, etc. instead of haveing file opend with IE.

Many thanks
Michael Nuwer [dBVIPS]

2005-04-04, 8:03 pm

Trivun wrote:
> Hi,
>
> I wish everybody happy new 2005.
>
> i have played with IE activx, a little.
>
> Does anybody knows how to save file with IE activex, like pdf, etc. instead of haveing file opend with IE.
>
> Many thanks


It's not clear to me whether you what the page displayed in the ActiveX
window and then have the page saved, or whether you want an alternative
to the ActiveX control. In either case the following sample form may be
helpful to you.

** END HEADER -- do not remove this line
//
// Generated on 01/01/05
//
parameter bModal
local f
f = new SaveDemoForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class SaveDemoForm of FORM
with (this)
height = 16.0
left = 25.5714
top = 0.8636
width = 60.1429
text = ""
endwith

this.ACTIVEX1 = new ACTIVEX(this)
with (this.ACTIVEX1)
height = 11.9091
left = 0.4286
top = 3.8182
width = 59.1429
classId = "{8856F961-340A-11D0-A96B-00C04FD705A2}"
endwith

this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1.0
left = 0.5714
top = 1.3636
width = 46.7143
value = "http://www.dbase.com/dBase_Knowledgebase.asp"
maxLength = 44
endwith

this.TEXTLABEL1 = new TEXTLABEL(this)
with (this.TEXTLABEL1)
height = 1.0
left = 0.5714
top = 0.3636
width = 12.0
text = "Address"
endwith

this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_O
NCLICK
height = 1.0909
left = 48.0
top = 1.3636
width = 8.2857
text = "Go"
endwith

this.PUSHBUTTON2 = new PUSHBUTTON(this)
with (this.PUSHBUTTON2)
onClick = class::PUSHBUTTON2_O
NCLICK
height = 1.0909
left = 41.0
top = 2.5455
width = 15.2857
text = "Save page"
endwith


function PUSHBUTTON1_onClick
if not empty(form.entryfield1.value)
form.activex1.nativeobject.navigate2(;
form.entryfield1.value)
endif
return

function PUSHBUTTON2_onClick
local cFilename, cURL, objHttp
cFileName = putFile("Save As","","htm")
cURL = form.entryfield1.value

if not empty(cURL) and not empty(cFileName)
objHttp = new OleAutoClient("Msxml2.XMLHTTP.4.0")
// objHttp = new OleAutoClient("Microsoft.XMLHTTP")
objHttp.open( "GET", cURL , false )
objHttp.Send()

oFile = new file()
oFile.create(cFileName, "RW")
oFile.write( objHttp.responseText )
endif
return
endclass


--
Michael Nuwer
http://www.ChelseaData.ca/dLearn/
http://www.nuwermj.potsdam.edu/dSamples/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com