Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Output Javascript from VBS

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,38992
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Output Javascript from VBS
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Output Javascript from VBS - 10/22/2006 3:05:33 AM   
  swiftoid


Posts: 31
Score: 0
Joined: 10/20/2006
Status: offline
Helllo. I'm writting a script in VBS which grabs a html file and outputs it after making a few changes to it. This is a hack to change the way all the files I have already written work.
I output it by using:
document.write (outpt)

My problem is that any javascript  on the page is producing an error. I'm not sure if it's that the javascript is being proccessed as Visual Basic or if it is not being run or if it something else entirely. Any help would be much appreciated.

Here's an example of the kind of file being outputted:


'Let's Just create a var with some content in it:      (this is normally fetched from a command prompt not from a var like this)
outpt = "<html><head></head><body>Please go back<script>alert('You have not logged in');</script></body></html>"
document.write (outpt)


_____________________________

Jamie Swift
<!---The Swiftanator---!>
www.swiftscripts.co.uk
 
 
Post #: 1
 
 RE: Output Javascript from VBS - 10/22/2006 6:13:50 AM   
  TNO


Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Could you give a little more detals on the problem? what does the program look like thats doing the work?

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to swiftoid)
 
 
Post #: 2
 
 RE: Output Javascript from VBS - 10/22/2006 6:48:58 AM   
  swiftoid


Posts: 31
Score: 0
Joined: 10/20/2006
Status: offline
The problem seems to have solved it'self now. I'm sure why but I tried changing lots of bits of code. I think it was somethink to do with the fact that when I had written the script tags I had just put <script>. When I changed it to <script type='text/javascript'> It all seemed to work fine. As I said, this could be the reason or it could be a change I made to the vb script which called it. Thanks anyway.

_____________________________

Jamie Swift
<!---The Swiftanator---!>
www.swiftscripts.co.uk

(in reply to TNO)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Output Javascript from VBS Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts