I'm looking to return DATE ONLY for yesterday's date. No seconds, milliseconds. Formatted either yyyy/mm/dd or mm/dd/yyyy. VB does it so easily Date()-1 will return 03/27/2007 if today is 03/28/2007. Why so many hoops for javascript? Any ideas?
I have the following function to get the total qty:
function calttl() { var ttlqty ttlqty=0 for (i = 0; i <= document.qtymain.orderdetail.length-1; i++) { ttlqty = ttlqty + document.qtymain.qty.item(i).value }
}
The problem I have is the document.qtymain.qty.item(i).value I get look like a string, so the number I get for ttlqty is not add up the number but concatenate.
How do I convert the value I get to a number in javascript?
I've made a script for an intraweb, where I use VBScript aswel. (It's IE only)I need that VBScript to get some data from excel files... but then again, this data is passed to javascript where I use it in scripts.Everything works fine like this, when I pass the VB variable (shiftVB) to a javascript variable addthisvar:
Code JavaScript: var addthisvar = shiftVB; function dothisnow(addthisvar){
This example is much simplified as the original script.VBScript is making a value, passes this to Javascript, which puts that value into a div tag.Now, as you see in the VBScript, the value contains a call to a javascript function. It shows perfectly in HTML, but the call can't be made when clicking the link.Is it possible in VBscript to write dynamic hardcoded javascipt function that pass arguments?
How to get the Value from Drop Down list. Using Java Script? In the Drop down list , i want to get the selected value ? How do i get it using JavaScript ??
I altered it a little, just want to check i cut down newWin = open(theURL ,winName, features); not to include features and winName, I assume that these are NOT required attributes?
In a JSP, I try to pass a Java object to a javascript function, like this:
<% Test test = request.getSession().getAttribute("test"); //Test has a field of lasName, such as test.getLastName() will return "john" %> //This is for simplizing. In reality this js codes are in different file such as includeFile.js <script> var obj = <%= test%>; [Code]...
i try to post java script function from c# code. i success to make regular post data - like has regular html form pages but i have some troubles to post java script data. mybe i can figure this out with calling to function from address line - if it's possible?? some body have ide? there is away to call java script function from address line??
I have inherited some code and have sort of been going through a crash course with JS (typically I'm working in C/C++/Java/asm). The person before me used jQuery, which seems to be basically a convenience thing and for the most part I understand the applications they've used it in. However, one thing scares me. The primary JS file is prefaced with:
Code:
And I have no idea what that does. From what I can guess, it probably waits to define the rest of the code until the document has been entirely loaded, but when I wrap it around MY code it just breaks everything.
The user clicks on the delete icon, and gets a JavaScript client-side popup to confirm that he wants to delete. I am passing this client-side function a contactID.
Then, I want to send the result of this confirm (true|false) to a server-side VBScript function, along with the contactID. The VBScript function will then perform a delete in the database for the specified contactID.
I have seen many examples about sending stuff back and forth between JavaScript and VBScript, between server and client, but all the examples I see are just popping up generic alerts and such. I need to execute some JS on the client side, return a value, and send it to a VBScript function on the server side.
I have some pages with this VBScript code, which obviously does not work in Firefox. How can I convert this to Javascript in order for my web page to work in Firefox ? It basically fills a drop down with a list of dates that a user can select. Code:
Can I call a value from the database to javascript/vbscript. Let's say the database is called SQL="SELECT * from checkout".Can I validate that the SQL and the javascript/vbscript equals to each other and inside the javascript uses the response.redirect function to another asp page?
From inside a javascript function i need to execute a vbscript sub routine. You might be thinking why i can't do it in javascript. well i probably can but i am better at VBscript and it would be a lot easier.
I need some help converting this VBScript over to JavaScript so that the calculations will work properly in browsers other than IE.
You can take a look at Turn 2 Design Code: for a feel about what I'm trying to do, but basicly, I just need to calculate the cost of the selected items based on the selected quantity of that item.
The only thing I know about JavaScript is the small Pop-up scripts I've been able to litterally copy and paste to implement. So, please, dont just post code, post an explaination of whats going on and why so I can try to figure it out. Code:
Im using the onchange event for a dropdown list to change SQL statements based on the index of that dropdown chosen. For example I have a function like this for my onchange event of the drop down list.
<script type="text/javascript"> function listboxchange(index) declare connection ...
Not sure whether this should go in the JavaScript or VBScript/ASP section, but I'll try here anyway.
I have an ASP include file that contains both VBScript and JavaScript code. The VBScript processes some information and has an onChange event which calls a JavaScript function. Within this javascript function I want to access a recordset and retrieve a value using a variable from the javascript. Here's the code from the JavaScript section. Code:
Is there a way to achieve multithreading in JavaScript? I'm looking to fetch a page into a div while allowing the user to interact with another div. At some point the newly fetched page contents will be available to the div that the user is working in but I don't want to cause unnecessary blocking. I've thought of using frames (would prefer divs) plus timeouts and checking for when a load completes. Does anyone have an idea of how this could work?
A friend of mine has built as simple site for use on his company's intranet. It uses JavaScript to read comma-delimited information from a text file and displays it in tabular form.
When I looked at the source there is js like this:
function forwardClick() { if (sitelist.recordset.AbsolutePosition != sitelist.recordset.RecordCount) { sitelist.recordset.moveNext(); } else { alert("You are already at the last record in the database."); }}
wondering if there is a va_list equivalent in Javascript. Well, actually, I know that there is, but I don't know if its user... applicable. va_list in C/++ anyhow is a way of being able to pass in any number of arguments at the end of a function, I'll show an example:
So as you can see, the space is reserved at the end of the function declaration with the "..." syntax, and in the function body is expanded and processed. I could be way off here, but I think I'm on the right track.