Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript -> Javascript 1

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
is there a way I can perform the same task here, only in JavaScript<br><br><FONT FACE=monospace><br>&lt;Script Language=&quot;VbScript&quot;&gt;<br>&lt;!--<br>&nbsp;sub Go(thePath)<br>&nbsp;&nbsp;DrvFrm.Path.value = thePath<br>&nbsp;&nbsp;DrvFrm.submit<br>&nbsp;end sub<br>--&gt;<br>&lt;/Script&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;Form name=&quot;DrvFrm&quot; action=&quot;default.asp&quot; method=&quot;post&quot;&gt;<br>&nbsp;&lt;input type=&quot;hidden&quot; name=&quot;Path&quot;&gt;<br>&lt;/Form&gt;<br></font> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Yes:<br><br>&lt;Script Language=&quot;JavaScript&quot;&gt;<br>&lt;!--<br>function Go(thePath)<br>{<br>&nbsp;&nbsp;DrvFrm.Path.value = thePath<br>&nbsp;&nbsp;DrvFrm.submit();<br>}<br>--&gt;<br>&lt;/Script&gt;<br><br><br>Don't miss out the brackets next to 'submit' otherwise it won't work. The form stays exactly the same, of course.<br><br>
 
also in a different forum , palblo(think I spelled it right) mentioned that all the paths will need to use double \\ now. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Yes, that is correct - strings in C(++) and Java(Script) need &quot;\\&quot; because the first '\' introduces an escape sequence. I did not think to mention this because I assumed you knew about C / Java strings.
 
I know C++ and such, but at the time I Was working heavily in VBscript(ASP) so it just didnt hit me that I was used a unterminated backslash. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Don't worry, when I have to go back to VB I keep putting trailing semicolons on lines!
 
yea I did that before, I just gotten so use to writing in VC++, VB, HTML, ASP, Javascript, VbScript, API, ActiveX within the same month, that I can sometimes naturally remeber how to work with each, but at times there are those things when I acidently put in something that belonged to another language, like semicolon, or no semicolon etc, but hey thanks for the help people. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
erm JTeagle (looked back, noticed you're the only one) you got a star btw. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top