473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Converting Javascript code to Visual Basic

praclarush
I’ve tried a verity of different things but I can’t seem to find something that works so I thought I would Ask here, if This is the wrong place then Sorry If you could point me to the correct place the I would Post there. Now I have this JavaScript code that I want to get working in a VB.Net Client side application, could anyone here help me with translating it to something that might work in VB.Net? Thanks Nathan

Expand|Select|Wrap|Line Numbers
  1. function send_request() {
  2.  
  3.     if (window.XMLHttpRequest) { // Mozilla, Safari, ...
  4.             http_request = new XMLHttpRequest();
  5.     } else if (window.ActiveXObject) { // IE
  6.             http_request = new ActiveXObject("Microsoft.XMLHTTP");
  7.     }
  8.  
  9.     http_request.onreadystatechange = function(){
  10.         if (http_request.readyState == 4) {
  11.             document.getElementById("url_response").value = http_request.responseText;
  12.         }
  13.     };
  14.  
  15.     if (document.getElementById("url_type").value = "POST") {
  16.         http_request.open('POST', document.getElementById("url_dest").value, true);
  17.             http_request.send(document.getElementById("url_request").value);
  18.     } else {
  19.         http_request.open('GET', document.getElementById("url_dest.value").value, true);
  20.             http_request.send(null);
  21.     }
  22.  
  23. }
May 4 '09 #1
1 1544
Never Mind I managed to fixed
May 4 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Jay Kim | last post by:
Hi, We're implementing a Windows application using Visual Basic .NET. One of the key features we need to implement is that we should be able to get the accurate byte offset of user selected...
5
by: anoop | last post by:
Hello, I want to know how to draw a line using javascript in .aspx page of visual Basic .Net Project. Are there any functions, if they are what are the functions available and how to use them....
6
by: JimmyKoolPantz | last post by:
I have been given the task of converting a program from VFP (visual foxpro) to Visual Basic.net. My question is "Is it possible to generate a DBF file Dynamically(at runtime) using Visual...
6
by: John Bailo | last post by:
http://www.informationweek.com/software/showArticle.jhtml?articleID=196600515 Developers Embrace Java, Drop Visual Basic "Developers have abandoned Microsoft's Visual Basic in droves during...
1
by: michel abboud | last post by:
hello , i have a lot of software commercial packages made in cobol language but this ( cobol ) language is not used anymore thousands of programs will be rejected with my...
4
by: Chris Asaipillai | last post by:
Hi there My compay has a number of Visual Basic 6 applications which are front endeed onto either SQL Server or Microsoft Access databases. Now we are in process of planning to re-write these...
28
by: Randy Reimers | last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else to do) I wrote a set of programs "many" years ago, running in a type of basic, called "Thoroughbred Basic", a type of...
7
by: rmurgia | last post by:
When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.