$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>javascript - VB.net and WordPress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - VB.net and WordPress

matteradmin10PV0评论

I run a WordPress website that often has posts with some JavaScript, usually for various calculators. For example, I might use JavaScript to allow a visitor to convert inches to mm. That's a basic example; I have more complicated scripts that need to run.

This JavaScript approach does work for me. However, the problem is I'm not very good at JavaScript, nor have much experience with JavaScript IDEs.

But I do happen to have a lot of experience with VB and Visual Studio. I have ongoing projects with these and would greatly benefit if I could leverage this instead of spreading myself thinner.

So I'm wondering if anyone might know how I could use VB for my calculators on my WordPress website?

As I understand it, the problem is that VB doesn't run on an Apache Server. So I could put the calculators on a sub-domain on a different server. But I actually want the calculators directly within WordPress posts. Perhaps iframes is an option? Are there any other options I could consider?

I would appreciate any suggestions and info!

Thanks!

Sam

I run a WordPress website that often has posts with some JavaScript, usually for various calculators. For example, I might use JavaScript to allow a visitor to convert inches to mm. That's a basic example; I have more complicated scripts that need to run.

This JavaScript approach does work for me. However, the problem is I'm not very good at JavaScript, nor have much experience with JavaScript IDEs.

But I do happen to have a lot of experience with VB and Visual Studio. I have ongoing projects with these and would greatly benefit if I could leverage this instead of spreading myself thinner.

So I'm wondering if anyone might know how I could use VB for my calculators on my WordPress website?

As I understand it, the problem is that VB doesn't run on an Apache Server. So I could put the calculators on a sub-domain on a different server. But I actually want the calculators directly within WordPress posts. Perhaps iframes is an option? Are there any other options I could consider?

I would appreciate any suggestions and info!

Thanks!

Sam

Share Improve this question edited Jan 22, 2019 at 21:02 Kashif Rafique 2351 gold badge3 silver badges12 bronze badges asked Jan 22, 2019 at 15:03 MrSamuelMrSamuel 131 silver badge4 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 3

So I'm wondering if anyone might know how I could use VB for my calculators on my Wordpress website.

Directly? No, you can't run .Net in a browser, and the closest available is silverlight and activeX, both of which were discontinued.

As I understand it, the problem is that VB doesn't run on an Apache server. So I could put the calculators on a subdomain on a different server. But I actually want the calculators directly within Wordpress posts. Perhaps I-frames is an option? Are there any other options I could consider?

You'd need a Windows server to host the .Net code, but yes you could have a .Net frontend wrapped in an iframe, be it via a shortcode or OEmbed. But to be honest learning basic javascript sounds like a lot less effort.

How you would setup a .Net server for that though, is beyond the scope of this stack, as are generic javascript questions ( perhaps stackoverflow? )

JS has more in common with PHP than VB.Net does, and you needn't opt for the ES2016/React/Vue/etc, if all your doing is calculations then jQuery or raw JS will do the trick. As for IDE's, you don't need a JS specific IDE like you do with .Net, most popular code editors have JS tooling packages, be it Sublime Text, Coda, Atom, VS Code, etc. Language specific code editors are the exception these days, not the norm

I would also note that it might be tempting to directly embed codes for execution inside of post content. If this works it's because you're an admin and have the unfiltered_html capability, don't directly embed JS into a posts content, instead use OEmbed, or shortcodes instead as WP will try to strip out JS tags etc for security reasons

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far