Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
vbscript ExecuteGlobal() doesn't work after onload
Logged in as: Guest
arrSession:exec spGetSession 2,2,1474
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[Scripting]
>>
WSH & Client Side VBScript
>> vbscript ExecuteGlobal() doesn't work after onload
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 >>
vbscript ExecuteGlobal() doesn't work after onload -
10/14/2004 5:35:24 PM
craftymind
Posts: 1
Score: 0
Joined: 10/14/2004
From:
Status:
offline
Does anyone know how i can create a dynamic function after an html page has loaded?
This ExecuteGlobal function works in this code
<html> <head> <script type="text/vbscript"> sub CreateVBListener(id) alert("CreateVBListener called: " & id) ExecuteGlobal("sub " & id & "_OnClick() call alert(""clicked"") end sub") end sub call CreateVBListener("thebutton") </script> </head> <body> <input id="thebutton" type="button" value="Hello" /> </body> </html>
But it doesn't work in this.
<html> <head> <script type="text/vbscript"> sub CreateVBListener(id) alert("CreateVBListener called: " & id) ExecuteGlobal("sub " & id & "_OnClick() call alert(""clicked"") end sub") end sub </script> </head> <body onload="CreateVBListener('thebutton')"> <input id="thebutton" type="button" value="Hello" /> </body> </html>
Post #: 1
Re: vbscript ExecuteGlobal() doesn't work after onload -
10/27/2004 8:09:50 AM
bobbob
Posts: 5
Score: 0
Joined: 10/27/2004
From:
Status:
offline
maybe I'm missing the point but just load it like this right below title and it's on load!!!!!
<SCRIPT LANGUAGE="VBScript" TYPE="text/VBScript"> Function myfunction(passvar) Document.Write "hello " & passvar End Function ExecuteGlobal myfunction("bob") </SCRIPT>
(in reply to
craftymind
)
Post #: 2
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
>> vbscript ExecuteGlobal() doesn't work after onload
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
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
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI