Bryce:

Excellent !

I went and read myself an HTML book over the weekend - "a truly dangerous thing" This HTML stuff is actually quite straight-forward. I can see now how to "minimize" the HTML using certain browser assumptions and defaults (ie Tables <tr><td> blah blah ).

And - I think we've got ourselves a way to embed HTML into our scripts without all the 'stuff'+'blahblah' crap.

Check it out. I don't think it causes KiX any trouble, but ???

Plus - I added some radio buttons.

I especially liked the way you subroutined the HTML...

code:

break on


$false = 0
$true = -1


$ie = olecreateobject("internetexplorer.application")
if $ie = 0 exit endif


; Set properties and display form ...


$nul = oleputproperty($ie, "addressbar","s","$false")
$nul = oleputproperty($ie, "menubar", "s", "$false")
$nul = oleputproperty($ie, "toolbar", "s", "$false")
$nul = oleputproperty($ie, "statusbar", "s", "$false")
$nul = oleputproperty($ie, "resizable", "s", "$false")
$nul = oleputproperty($ie, "top", "s", "100")
$nul = oleputproperty($ie, "left", "s", "200")
$nul = oleputproperty($ie, "height", "s", "300")
$nul = oleputproperty($ie, "width", "s", "350")
$nul = olecallfunc($ie, "navigate", "s", "about:blank")


while olegetproperty($ie, "busy") <> "0" and @error = 0 loop


; Get a handle to the open document ...


$doc = val("&" + olegetproperty($ie, "document"))


gosub htmlsurvey


$nul = olecallfunc($doc, "write", "s", "$html")


$nul = oleputproperty($ie, "visible", "s", "$true")


while olegetproperty($ie, "busy") <> "0" and @error = 0 loop


while setfocus("SURVEY") <> 0 loop


; Get a handle to the form controls ...


$oStatus = val("&" + olecallfunc($doc,"getElementById","s","status"))
$oName = val("&" + olecallfunc($doc,"getElementById","s","name"))
$oSex = val("&" + olecallfunc($doc, "getElementById","s","sex"))
$oIncome = val("&" + olecallfunc($doc, "getElementById","s","income"))


; Start message loop ...


while @error = 0


; Get the valueof the status control ...


$mStatus = olegetproperty ( $oStatus, "value" )


select


case $mStatus = "1"


?
?"Name = " olegetproperty ( $oName, "value" )
?"Sex = " olegetproperty ( $oSex, "value" )
?"Income = " olegetproperty ( $oIncome, "value" )


$nul = oleputproperty($oStatus,"value","s","0")


case $mStatus = "2"


goto finish


endselect


loop


:finish


; Object cleanup ...

$nul = olecallfunc ( $doc, "close" )
$nul = olereleaseobject ( $doc )
$nul = olecallfunc ( $ie, "quit" )
$nul = olereleaseobject ( $ie )


$nul = setconsole ( "show" )
$nul = setconsole ( "foreground" )


exit


;----------
:htmlsurvey
;----------


$html = '

<html>

<head>
<style>
<!---body {
background-color: powderblue; color: black;
font-family: courier; font-size: 10pt; margin: 3px
input.tbox { border: lpx black solid;}
td { font: 10pt tahoma; }
}
--->
</style>
</head>

<title>

SURVEY

</title>

<body scroll=no>

<form name=survey>

<input type=hidden id=status name=status value=0>
<input type=hidden id=sex name=sex value=1>

<b><h2 align=center>KIXTART SURVEY</h2></b>

<pre>

Name: <input type=text id=name name=name size=32 maxlength=80 value="%username%">
Sex: <input type=radio name=sx onclick="survey.sex.value=1"> Male
<input type=radio name=sx onclick="survey.sex.value=2"> Female
Income: <select id=income name=income size=1>
<option value=1>Under $25,000
<option value=2>$25,001 to $50,000
<option value=3>50,001 and higher
</select>
</pre>

<br>
<hr>
<table align=center>
<input id=submit type=button value="Submit" onclick="survey.status.value=1">
<input id=close type=button value="Close" onclick="survey.status.value=2">
</table>

<hr>

</form>

</body>
</html>
'

return


Shawn.

sh*t - I gotta go back to double-spacing my scripts !


[This message has been edited by Shawn (edited 11 September 2000).]