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:
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 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:
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:
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 got two ASP pages. One is ASP email form (I'm using Persist ASP Email component). Another one has all file links in it. For example, when user click Outlook course hyperlink. It will pop up another window with outlook course PDF file. (All PDF files are already in the server).
What I am trying to do is: When user click the "Add Email" hyperlink, it will add that course name and filepath into ASP/VBScript Dictioanry Object. After the user finish and click "Attach to email" button. All the files will be attached in the email as an attachment.
Because I am not familar with VBScript. So, can Javascript add items to ASP Dictionary Object?
Can anyone redirect to any online tutorials, articles, code of how to upload a file using HTTP PUT method and JavaScript or VBScript to a server running Apache 2.0 that uses CGI + PERL.
How to create configuration entries in httpd.conf for supporting HTTP PUT method.
How to code with AJAX to post uploaded file content to the server using PUT method ?
Can I use javascript to create a menu. then insert the value to it? I mean.. If i got 1 page, and 1 textbox. can I pass in the value in the textbox to a vbscript Msgbox or Menu, then i change the value in Menu, maybe use combo box or listbox. then i select it and click ok, the value in my page can get it and chage the default value? Thank!
ps: I want a pop up "menu", not a pop up "window"... or maybe in Vb6 we calll a form
This javascript creates a table that has a header and side column that do not move while scrolling through the table. I need to convert this to vb script. Can anybody help, or do you have code in vb (asp) that would do the same thing?
I use the following script in order to show/hide a section, and at the same time to change a companion .gif with another:
function doExpand(paraNum,arrowNum){ if (paraNum.style.display=="none"){paraNum.style.display="";arrowNum.src="../../images/arrOn.gif"} else {paraNum.style.display="none";arrowNum.src="../../images/arrOff.gif"} }
and then in the body: <div id="reltpc"><a href="javascript:;" onClick="doExpand(xplan1,ico1)"><img id="ico1" src="../../images/arrOff.gif" alt="" width="10" height="9" border="0"> Show Info</a></div> <div id="xplan" style="display:none" onClick="doExpand(xplan,ico1)"> <p>text here</p> <p>some more text here</p> </div>
Furthermore, two more scripts are used in order to show/hide a section without the image:
function doSection (secNum){ if (secNum.style.display=="none"){secNum.style.display="block"} else{secNum.style.display="none"} }
function noSection (secNum){ if (secNum.style.display=="block"){secNum.style.display="none"} }
and then in the body: <div id="more"><a href="javascript:;" onClick="doSection(dtails1)">More Info</a></div> <div id="dtails1" style="display:none" onClick="noSection(dtails1)"> <p>text here</p> <p>some more text here</p> </div>
All three of them are working good in IE and Ffox, however the second claims to use "gelElementById" instead.
Well, how could it be done? Would you help me please, to get that conversion?
Anyone have any tips on a good site with a few pointers on how to convert javascript working on IE to work with NS and Safari. For example, this code doesn't work on Safari but on IE and I have no idea why:
I would like to create a program which converts some letters into different ones.
1) I want 2 text areas (input and output) + "convert" button
2) if I type in the input area the letters "ea" I would like it to be converted into "a", so that If I type "cambrea" and press "submit" the output text will have "cambra".
3) if I type "e " which is (e+space) I want it to be converted into " " which is "space" example: if I type the word "spine " it should be converted into "spin , note that there is a space after "spin ".
4) If I type any vowel before "o" it should render "o", example: gambuo becomes gambo. would this be possible? I'm not very familiar with Javascript even though I can modify it.
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.
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 ...
I am wondering if there is any way to write a VBScript macro for IE, just like the action that we can do in MS Excel (Tools -> Macro -> Visual Basic Editor).
Also, I believe we can automate actions to IE pages using VBScript, like when you right click a web page and choose "Export to Microsoft Excel". But I have no idea how to get it.
First of all, I'm sorry if I'm in the wrong group of discussion. I couldn't find discussion forum for vbscript. The problem I had is in vbscript coding.
The coding is as below: Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adUseClient = 3 strDNSServer = WScript.Arguments(0) strDomainName = WScript.Arguments(1)