/    Sign up×
Community /Pin to ProfileBookmark

call javascript func from vbscript

I am getting a type mismatch error when I try to call a javascript function from a vbscript function. It is possible to do this without getting an error? The error comes up and has the function as the type mismatch

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliDec 29.2003 — post your code as well as what you expect it do when its working properly.,it should typically work without any problem
Copy linkTweet thisAlerts:
@Phil_KarrasDec 29.2003 — vbscript probably won't call to JS directly, after all microsoft developed vbscript to get away from JavaScript since JS was not developed at MS.

On the other hand, you might be able to fool it. I do not know vbscript so I may or may not be able to help with that.

You might try calling a vbscript function that sets a timer value used in the standard html? Create a div with an ID? Find something you can do with VBscript that JS can either access (like a <div ID='test01'>) or read and you should be able to get around any problem of vbscript not being able to directly call a JS function.

Now in JS have a function that continually checks for the value or the presence of the div and then fires the needed function on that.

Hope that helps.
Copy linkTweet thisAlerts:
@kbrown2974authorDec 29.2003 — i think I am gonna just make it all vbscript ...thanks
Copy linkTweet thisAlerts:
@stoodderDec 29.2003 — hmmyea actually i think you can call a function, though ive nver worked with VBscipt(just starting) i do know asp and javascript a bit, i know in asp you can call a javascript funciton, i cant remmeber exactly how, but that might help your problem with vbscript, not to mention asp is alot like vbscript in a way.
Copy linkTweet thisAlerts:
@Khalid_AliDec 29.2003 — [i]Originally posted by Phil Karras [/i]

[B]vbscript probably won't call to JS directly, after all.......[/B][/QUOTE]


Please do not misslead a member seeking help.

Though I am not an MS developer,I know what I am talking about when I said in my post above that it can be done.As a matter of fact its as easy as it can be,I can provide the solituon,of course if the original poster is still interested..?
Copy linkTweet thisAlerts:
@Phil_KarrasDec 30.2003 — Sorry Dude I do the best I can, I told him I didn't know vbscript. Now, if you know better please don't tease us, just give the poor guy the solution.
Copy linkTweet thisAlerts:
@zachzachDec 30.2003 — i ran in 2 the same prob a long time ago

and its acually super super super simple

you dont even need 2 do anything

just the nsame of the function, then a ()

thenameofafunction()

i think...im kinda forgetting now cuz i just use js or vbs, not both
Copy linkTweet thisAlerts:
@Khalid_AliDec 30.2003 — [i]Originally posted by Phil Karras [/i]

[B]... Dude.....[/B][/QUOTE]

huh?

anyways [url=http://www.webapplikations.com/pages/html_js/document/VBScriptJSCommunication.html]here is the link that uses this functionality[/url]
×

Success!

Help @kbrown2974 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...