<script language="VBScript" runat="Server">
Response.Write("Hello from VB<br/>")
</script>
<script language="JavaScript" runat="Server">
Response.Write('Hello from JS<br/>');
</script>
and run it, I get the following output:
Quote:
Hello from JS
Hello from VB
As you can see, despite appearing later in the file, the JS is being executed before the VBS. How can I stop this happening? (I want to include a VBS file...)
VBScript that executes using the cscript.exe. It needs to download the home page for each domain that has subscribed to the Hacker Protector service and compare the number of bytes to the previous days and if there is a change, notify the contact person via email that there has been a change.
I am trying to embed JavaScript to an ASP page which will be executed on the server side and will send a HTTP request from the ASP Web server another remote server. Then I need to capture the remote server's response and save it as a string.
I have an asp page which I'm working on and its a mixture of VBscript and Javascript. What i am trying to do is pull data from a MySQL database using VBscript and the onchange event, then pass the information through to a javascript function.
At first i was able to do this writing the code into the page using VBscript and then use a javascript switch statement, But now i need to access this data dynamically on the fly. Can anyone help, or point me in the right direction of how to achive this?
I need to be able to access a value in a text field in my asp code. This needs to be done client-side, because reposting to the page would take way too long. I'm writing this page for one user so I can tell them what browser to use if need be. Code:
I am trying to implement a shopping cart type idea for my website, and am learning how to use a simple array to do this.
The array has 4 attributes per item, namely, ISBN, BookTitle, price, Quantity.
I have been practising creating and entering data into arrays etc. as i am not familiar with how arrays work within an ASP environment. Basically, i would like to know how to add to my existing array, and keep the existing data in the array as well!! Code:
I want to pull data from a number of tables, Categories, SubCategroies and then place into JavaScript drop downs and have the options in the second drop down change upon the selection from the 1st drop down. Is this possible.? How is it done..? Arrays..?
I am trying to call a javascript function from a vbscript function. The problem is it keeps saying variable not defined and it does not need to be defined. I need it to execute the javascript function when flagit = 6. Code:
<script language = "javascript"> function test1() { ------------ <%test()%> // fine and works well if there is no response.write() in test() as i know. } </script>
now the problem is that how can i call test1 within scriplets or within test().
Is it possible to assign javascript variables values to ASP?
e.g. How would I store the following JS variable as an ASP variable in VBScript?
<script type="text/javascript"> var intJavaScriptNumber = 25; </script>
The problem is I've got about 50 of these variables on a page, and they all need to be used in a simple equation which slows the browser down. If I could get them all into ASP then I could process this server side much more comfortably.
It's a simple validation page and was working fine until i made some changes to the next page.
A regular form that calls a javascript function, but suddenly i javascript function does not execute anymore. i tried calling other functions but none of them works, but when i treid onSubmit("javascript:alert('some text')") it works fine.
I tried debugging it in dreamweaver and i get an regular expression missing error number 1005 on the last line of the javascript.. that is ....
Is there a way to count the number of times a while/wend loop executes. I'm using a while loop to display database records on a page, and I need to get a count of exactly how many loops occurred in a variable for use in a function.
I've got a mailing list script which loops through up to 20,000 database records, and fires a customised email out to each via the bulk mail queing function of JMail Pro (email component).
Never having tested this with anything other than 100 records, I'm very wary about executing the script in case it times out or starts to misfire.Is there anything anyone can recommend to make sure this process goes smoothly, perhaps even giving the user feedback whilst it's executing e.g. "sending messages 1-1000", "1001-2000" etc?
running w2k3/iis6 and trying to shorten the length of time that a simple 10 field ASP form takes to execute using CDOSYS. it takes about 50 seconds each time...and I've no idea why?
any pointers here lads? on other servers the exact same script does it's job in 3 seconds...but not this one?
How do I go about calling a server-side vbscript within a client-side javascript function? What I have is a page heavy on the javascript that has a number of functions, one of which is to begin a visual countdown with an onclick and also open an asp page containing the server-side vbscript, which initiates a wake-on-lan call. I had no idea how to call the vbscript within the javascript function, so this is why I opted for the vbscript asp page "pop-up" via window.open. Code:
Code like this ======================= Select case q Case "a" Dim arr(5) Case "b" Dim arr(2) end select ===================== returns an error saying variable arr redefined. Should it be like that or an I using Select incorrectly? Perhaps something similar to break needs to be used?
I'm having a customer submit an order. When they submit it, it posts to a page that processes the order and inserts into our database, while displaying a summary of their order. I have a javascript function that will cause a "confirm" box to show up if an order seems like it might be a duplicate. However, I can't seem to get the code to "wait" for the response from that box, which I guess makes some sense. Am I stuck with having an interim page or doing something with posts or is there an easy way to get the record to not insert until the user responds to the confirm box?
Im sure it exists but i am having some difficulty finding it. I need come code to take out any SPACES in a textbox when text is entered OR submitted. Example
i have a text box where people can enter there car registration.
To keep consistency thoughout my site, i want L736 VAF to be entered into the database as L736VAF.
so that when it is recalled via a search form, L736VAF wont be returned as "no record found" because some one has put a space init!
update some long commOn first page I display all the records from database (working well). Then first column has href which opens a popup (i am passing rownum from database to popup). I was hoping to run ASP code on load of the page so the comments which is already there for that row in the databse automatically comes in a textarea. And then you can edit and hit update. And this will update the database. Also I was thinking of using session variables for the rownum. But bcos I have href which opens a popup, I am not sure how i can set the session variable. I dont want to pass the "comments" itself to the next page bcos it can be really long comment and QueryString has some limitations.
I am making a dynmanic form that goes to a question depended on the answer. Is there a way that I can make it remember what the person selected (radio button) in the question so that I don't have to write something like,
"<input type = 'radio' name='Question3' value='Yes' checked <% if Question3 = "Yes" then response.write "SELECTED" end if%>>Yes<BR>" + ????
i have an asp page which shows a list of articles which are pulled from the database. I have a variable as below which defines number of records to show on each page
<%
numRows = 5 %>
Now i also have a drop down list from which you can choose 'display 5 records per page', display 10 records per page' and so on.What i want is when a new value is chosen from the list, the page refreshes and the ASP variable numRows is set to this new value.
I'd like to put some SQL values in my Javascript which is defined in de Head section If I put it in there like <%objrs=("field")%>, the script does not seem to run ?
I have a page that opens a javascript modal window and passes a variable. I then have that variable in Javascript. Is there anyway for me to get the value of that variable in asp. I am passing an id and want to check what the id is and open my recordset accordingly.