Click to See Complete Forum and Search --> : javascript + vb script


lord__icon
04-25-2003, 06:24 PM
Just a quick question
is there any way to combined javascript with
vb script I currently have a colored spining sphere that
I would like to give the user the option to change the color
the sphere is done with vb script and my color changer is done in javascript
thanks

gil davis
04-25-2003, 06:38 PM
You cannot actually combine them into the same <SCRIPT> tag or same external file, unless you translate the code manually to do the same job. But then it would be one language or the other.

They can, however, exist in the same document, although IE is the only browser I know of that supports vbscript. And there is no reason that both scripts cannot operate on the same object (obviously not at the same exact time). Besides, I would expect that the color change would be an operator selected action of low repitition rather than a continuous effect.

lord__icon
04-25-2003, 06:52 PM
Ok since its posible what i am trying to do is change the value for line0004 SetFillColor with the example below of course it does not work so mabey i have the wrong statement
Example that did not work i keep getting that document.divregion.ovala1 is null

document.DivRegion.ovala1.line0004.value=(""+ colc.cc.value +""); I know the (""+colc.cc.value+"") part is correct

Example of the sphere the bolded line is the line that i want to be able to change the value of.

<DIV ID = DivRegion STYLE = "POSITION:ABSOLUTE; TOP:15%; LEFT:55%; WIDTH:450;HEIGHT:450">
<OBJECT ID=OVAlA1 STYLE="POSITION:ABSOLUTE;HEIGHT:350;WIDTH:350;LEFT:0;TOP:0" CLASSID="CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6">

<PARAM NAME="Line0001" VALUE="SetFillStyle(1)">
<PARAM NAME="Line0002" VALUE="SetLineStyle(1,2)">
<PARAM NAME="Line0003" VALUE="SetLineColor(0,0,0)">
<PARAM NAME="Line0004" VALUE="SetFillColor(255,0,0)">
<PARAM NAME="Line0005" VALUE="OVAL(-160,-160,320,320,0)">
</OBJECT>
</div>

thanks