Executing VB Via JavaScript
Aug 2, 2007
I am using an ASP.NET AJAX control (ValidatorCallout) that requires
client-side validation to work with a custom validator I added. This
is an example of some code that works:
<asp:CustomValidator ID="CV_PartNumberExists" runat="server"
ClientValidationFunction="CheckPrime"
ControlToValidate="PartNumberText" ErrorMessage="b><br />A Part
Number is required."></asp:CustomValidator>
<script language="JavaScript">
<!--
function CheckPrime(sender, args)
{
var iPrime = parseInt(args.Value);
var iSqrt = parseInt(Math.sqrt(iPrime));
for (var iLoop=2; iLoop<=iSqrt; iLoop++)
if (iPrime % iLoop == 0)
{
args.IsValid = false;
return;
}
args.IsValid = true;
}
This is code I borrowed from another site to test this method - and it
works. My problem is that I need the JS to execute a VB function in
my project and I don't know how to do that. I want to do something
like:
function CheckValue(sender, args)
{
var sPartnumber = String(args.Value);
if FindExistingPN(sPartNumber)
{
args.IsValid = false;
return;
}
args.IsValid = true;
}
....where FindExistingPN is a funciton in my VB class. I have seen
some other posts about this, but none of them really gave me any
sample code that I could run. As I mentioned earlier, my JS skills
are lacking, so I am unable to create this myself.
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
I'm trying to execute a bat file on the server in javascript. The javascript sits on the server as well. I'm currently using:
document.location.href='testme.bat'
However the only thing it does is just opens up the bat file and shows my bat code in the browser. How can I execute the batch file instead of opening it and viewing it in the browser?
View 5 Replies
View Related
Jul 23, 2005
For some god-forsaken reason (which I can't find out either) MSIE
stopped executing any JavaScripts. In any page which contains
JavaScript code, that code won't be executed. There are no error
messages, no warnings, nothing. It simply does'nt work. I'm pretty sure
this could be caused by some stupid installation of another program
that messed up some IE settings.
Security settings for IE are all lowered down. Everything is activated
(Scripts, ActiveX, automatic download of anything, anytime)... so we
ran out of ideas of what could be the problem. And yes, we have also
tried to reinstall IE.
The only clue we have is that a local Administrator user can change IT
security settings for himself and (go figure) things work fine! The
problem occurs with users that have limted access to the computer and I
am pretty sure this shouldn't happen. If you are wondering... yes...
the local administrator has already tried to change the settings for
limited user account..
View 20 Replies
View Related
Jul 23, 2005
I have a select dropdown and 5 text fields. based on the option
selected (which are the units - cm/mm/inches/ft/yard etc), i change
the values in the text fields using javascript to the corresponding
units.
my problem is that when the options are selected very quickly(for eg
using the keyboard's up/down keys) then quickly, the text field values
lose their connection with the select box and the values become
illegal.
I suspect that the javascript function is being called even before the
earlier execution has not terminated. I tried using a global variable and using it as a lock, but still no success.
View 1 Replies
View Related
Aug 31, 2005
Is there some way from preventing the JavaScript code in a document loaded into an iframe from executing? I don't have access to the pages being loaded into the i-frame so I can't modify then. They are being loaded from a server.
View 4 Replies
View Related
Nov 7, 2005
What I am trying to do is dynamically update an image and image map on
a page. I'd like the update to happen as quickly as possible and be
done without refreshing the page. The catch is that the image map uses
the wz_tooltip.js (http://www.walterzorn.com/tooltip/tooltip_e.htm)
library to display a JavaScript tooltip containing detailed information
about different areas of the image. So, when I pass the required
<script> tags via .innerHTML, the browser treats it as text and does
not interpret the JavaScript and execute the code.
My code looks something like this:
View 5 Replies
View Related
May 4, 2007
I have an application in the form of "*.exe" file and i need to
execute this and evaluate the returned values within Javascript.
Is this possible ?
View 4 Replies
View Related
Nov 14, 2007
Basically, I have a page that I load with 10 input fields. If users
have JS enabled I want to hide 5 of these fields so as to reduce
clutter. If the user needs these extra fields an "Add" button can be
used to display the hidden fields one by one.
Once the fields a filled in the user submits them for validation and
if there are any error They can "Go back" to make some changes. The
whole process works great in FF & Opera but IE lets me down because if
you use the Browser "Back" button the Javavscript gets executed even
though it should be loaded out of cache.
View 3 Replies
View Related
May 30, 2007
i'm using a little "ajax" loader script to dynamically load files into
different "div" tags on my main site. the code for this part looks
like:
View 13 Replies
View Related
May 30, 2011
i have this code:
if (($has_freechat1['confirmed'] == 1) && ($has_freechat2['confirmed'] == 1))
{
$was_clicked = 0;
[code]....
View 5 Replies
View Related
Nov 14, 2006
I have a perl script running on my server on a chosen port, and I want to be able to execute functions that this script provides from inside Javascript functions.
For example, I need to call ....
View 3 Replies
View Related
Oct 7, 2010
Having trouble executing external javascript functions. I have a select option list where a different function is executed depending on the value of the selected option. An internal function checks which option is selected and then calls the appropriate external function. The internal function works as far as checking the value of the option, but the external function(s) will not execute. This code is of this nature:
Code:
function DoWhat()
{
[code]....
View 2 Replies
View Related
Apr 27, 2009
I have a c program and I need to call method in the program from a javascript file. is it possible.Another question which I have is whether it is possible to import other js files in a js file (in order to segment code into differnt files not all in one file)
View 1 Replies
View Related
Dec 16, 2003
I need to execute a javascript function on a page on a site. The link of a button is javascript:executefunction(2). However, I need to execute the function javascript:executefunction(1). Is there a way to do this by typing it into the internet explorer address bar (like the view-source:address thing)? Or is there a program that can accomplish this? I need to do this to test how it would execute the command differently. I have no access to the server (it is not my server/site) and don't have to option of download all the files to my computer (too many external css and js files).
View 3 Replies
View Related
Feb 26, 2010
Can somebody explain the following code:
var dbg =
(
function(){
[code]....
View 5 Replies
View Related
Jul 5, 2010
i've been trying to make an animated fly/slide-out menu and am just trying to get the basic mechanics down. long story short i'm just starting with a simple mouseover/out setup to get things going.currently (as seen in the code below) i have a div which should simply move down 30px from its starting point on mouseover and return to its starting point on mouseout. this works perfectly the first time the mouse enters and leaves the div but nothing happens the next time the mouse enters the div unless the page is refreshed.
Code:
<html>
<head>
[code]....
View 1 Replies
View Related
Oct 20, 2005
I'm loading an XML file which has a processing instruction
(<xsl-stylesheet href="..."/>). I need a cross-browser solution which
will load the XML file and have it's XSL PI run and translate the XML
to genereate the desired output.
View 3 Replies
View Related
Nov 23, 2005
I want to execute server code invoked from inside Javascript code.
I will have my server code in a servlet, callable with a URL, but how
do I invoke the servlet from Javascript without reloading the page and
not opening any window? I mean, I don't want to display the HTML result
of this request.
View 8 Replies
View Related
Mar 7, 2006
I've got a function, which must do thinks in 3 steps.
1. Change the innerHTML of an element to show a message (Please wait
while ...)
2. Work with datas
3. Re-Change the innerHTML to show the result.
The work on datas may take a few seconds (working with XML, DOM and so
on) I did a cut and paste of an old post, but no one did any answer, so I
hope to give any help now.
View 3 Replies
View Related
Sep 16, 2006
I'm jusing prototype-1.4.0.js as framework.
I have a function to populate three listboxes. The items in the
listboxes are from a MYSQL database and are related. The items are
requested by a php page.
Most of the time everything works fine, but sometimes I end u with only
one or two listboxes.
I can't figure out what's going wrong here. I've tested in Firefox and
Internet Explorer, both the same problem.
Does anyone know why my code sometimes stops executing?
Could it be that i made too many requests in a short time so the next
request can't execute because the current has't finished?
Hope anyone has an idea of what's going wrong.
View 9 Replies
View Related
Nov 23, 2010
I'm using this script to replace text on a page loaded into another frame, called 'booker'. the script works when i use it on the same page, but i can't seem to get it to reference the other frame for some reason. it executed with 'body OnLoad' any ideas for what i'm doing wrong?
View 3 Replies
View Related
Nov 9, 2011
I set up a variable that should replace HTML code when run but it doesn't seem to be doing that...
Here it is:
Any idea why? (My console isn't showing any issues)
View 13 Replies
View Related
Nov 15, 2011
I'm trying to run this script on Firefox. I'm copying and pasting the whole thing in here just to be safe, but I'm mostly concerned with getting the findLegendary function to call catchPok(). The script executes fine, goes into the battle, but then...does nothing.It runs the catchPok function if I manually click and deselect the "Find Legendary" window option, so alternately, if somebody knows how to make the program automatically click the element at that point to stop repeating the function (maybe?) and it works, I'd be just as happy with that. My best guess is that the autoContinue function might be interfering somehow, since it runs that portion of the code with the manual findLegendary shutoff, but to be honest I'm pretty clueless.
What I want it to do is run the catch function through, catch the game pixel, and then go back to repeating. I don't care how this is accomplished as long as it can feasibly loop. The game rules allow botting, so this isn't against any site rules, either.
// ==UserScript==
// @name Pokemon Vortex Tool
// @namespace vortexrising.tk
[code]....
View 2 Replies
View Related
Aug 22, 2010
For 2 day ago, i have re-read and re-write my code in first i have very very broken code execution in web in second :, i re write the code and in previewer browser ( i use mozilla 3.6.8) its work off line, but when i have implanting in web page, its not work, in 3rd, with mr.airshow support i have rewrite and it work on web page (thanks mr. airshow) but still in my mind, again :
Question :
1. Why the 2nd code can not execution in web page ?
2. How the code must be to load in web page ? Any rules ?
Here are the code :
View 2 Replies
View Related
Dec 4, 2011
My age verification is not running. I believe I wrote the argument correctly, but no dice.
<script type="text/javascript">
function CheckForm()
{
[code]....
View 1 Replies
View Related
Jul 13, 2010
I'm running a method:
Code JavaScript:
execute: function() {
for (var i in TXZ.dEvent) {
[code]....
I want to execute all functions that evaluate to true but I can't seem to get the syntax to actually run the function correctly.
View 4 Replies
View Related