jian_xin85 Posted October 11, 2006 Share Posted October 11, 2006 i'm added javascript in html here the problem, under language i have 2 things i wan to add one is vbscript and the other is javascript how can i have them workin at the same time cos if for mi only one can work each time . pls help or refer mi to any useful web site thankz leo^^. Link to comment Share on other sites More sharing options...
jhecht Posted October 11, 2006 Share Posted October 11, 2006 You should NOT use vbscript. Its pointless and a basic rip off of javascript <script type="text/javascript" language="javascript">//Scripting code goes here for javascript</script><script type="text/vbscript" language="vbscript">VBcode goes here.</script> Link to comment Share on other sites More sharing options...
aspnetguy Posted October 11, 2006 Share Posted October 11, 2006 vbscript is nothing like javascript! vbscript is a stripped down version of Visual Basic (both created by MS). vbscript will only work in IE and should be avoided (server side scripting in ASP is a different story). Link to comment Share on other sites More sharing options...
jian_xin85 Posted October 12, 2006 Author Share Posted October 12, 2006 <html><head><HEAD><script LANGUAGE=VBScript>Dim objExcelSub Btn1_onclick() call OpenWorkbook("C:\Documents and Settings\IA0888\Desktop\idea 2\Quality System Assessment Database.xls")End SubSub OpenWorkbook(strLocation)Set objExcel = CreateObject("Excel.Application")objExcel.Visible = trueobjExcel.Workbooks.Open strLocationobjExcel.UserControl = trueEnd Sub</SCRIPT></head><body background="922.jpg" > <img src="ic2.gif"><INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Excel File"> <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><img src="ThreeMileIsland.gif" align="bottom"><a href="http://enterpriseportal/"><font color='#DC143C'>Enterprise Portal</a></body></html>thanks for the advice , i couldn't get it to work could u help mi again? Link to comment Share on other sites More sharing options...
jhecht Posted October 12, 2006 Share Posted October 12, 2006 Ur first issue is that you are using Vbscript ;pyour input type does not have quotes around the values<input type="button" name="Btn1" value="open Excel File"/>always use lowercase things...The link <a href="http://enterpriseportal/"> is not a website, it'll give u an error.and try<script languageE="VBScript"> Link to comment Share on other sites More sharing options...
jian_xin85 Posted October 12, 2006 Author Share Posted October 12, 2006 thanks it worked , but may i know where my problem lies why dun it work be4?? Link to comment Share on other sites More sharing options...
jhecht Posted October 13, 2006 Share Posted October 13, 2006 in order for things to be able to tell the difference between one thing and another, quotes need to be used. you didnt use quotes on your script language="" (even though you should really use <script type="text/vbscript">Thats y Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now