Make A WHOIS Search Via XMLHTTP

Feb 1, 2004

Save the following code as "WHOIS.hta". Then launch it(For Windows 9x+ & IE 5.5+).
And it's easy to convert it to asp. So it may works well on your web server, too.

<html>
<head>
<title>WHOIS WebService</title>
<!-- Edited by LeXRus http://LeXRus.blueidea.com/ -->
<meta http-equiv="Content-Type" content="application/hta; charset=utf-8">
<HTA:APPLICATION ID="oHTA" APPLICATIONNAME="WHOIS" BORDER="thick" BORDERSTYLE="normal" CAPTION="yes" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="yes" SHOWINTASKBAR="yes" SINGLEINSTANCE="no" SYSMENU="yes" VERSION="0.73B" WINDOWSTATE="normal"/>
<style>
body{background:buttonface;border-width:0px;overflow:auto;}
#domain{border:2px inset; font-size:11px;font-family:verdana;width:200px;text-align:center;}
#submit{border:2px outset;font-size:11px;font-family:verdana;font-weight:bolder;}
textarea{width:100%;height:350px;border:2px inset;font-size:11px;font-family:verdana;overflow:auto;}
div{font-size:11px;font-family:verdana;}
h1{font-size:24px;font-family:tahoma;vertical-align:middle;}
</style>
</head>

<body onload="window.resizeTo(600,500)" onresize="window.resizeTo(600,500)">
<div align="center">
<h1>WHOIS Search</h1>
<u>D</u>omain: <input type="text" id="domain" accesskey="d" value="blueidea.com"/>
&nbsp;<button id="submit" type="button" onclick="submitSearch()" accesskey="s"><u>S</u>ubmit</button>
</div>
<br/>
<div align="center"><textarea id="result"></textarea></div>
<script>
var
url='http://66.165.154.102/whois.asmx',
soapRequestStr='<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><GetWhoIS xmlns="http://www.webserviceX.NET"><HostName>blueidea.com</HostName></GetWhoIS></SOAP-ENV:Body></SOAP-ENV:Envelope>'

var
xmlhttp=new ActiveXObject('msxml2.xmlhttp')
xmlhttp.onreadystatechange=getReady
xmlhttp.open('POST',url,true)
xmlhttp.setRequestHeader('Referer',url)
xmlhttp.setRequestHeader('Content-Type','text/xml;charset=utf-8')
xmlhttp.setRequestHeader('SOAPAction','http://www.webserviceX.NET/GetWhoIS')
xmlhttp.setRequestHeader('Content-Length',soapRequestStr.length)

var
xmldoc=new ActiveXObject('msxml.domdocument')
xmldoc.loadXML(soapRequestStr)

function submitSearch(){
xmldoc.selectSingleNode('//HostName').text=domain.value
xmlhttp.abort()
xmlhttp.onreadystatechange=getReady
xmlhttp.open('POST',url,true)
xmlhttp.setRequestHeader('Referer',url)
xmlhttp.setRequestHeader('Content-Type','text/xml;charset=utf-8')
xmlhttp.setRequestHeader('SOAPAction','http://www.webserviceX.NET/GetWhoIS')
xmlhttp.setRequestHeader('Content-Length',soapRequestStr.length)
xmlhttp.send(xmldoc)
submit.disabled=true
submit.innerText='Searching...'
}

function getReady(){
if(xmlhttp.readyState==4){
result.value=xmlhttp.responseXML.selectSingleNode('//GetWhoISResult').text.replace(/[sS]+Network Solutions reserves the right to modify these terms at any time./,'')
submit.disabled=false
submit.innerText='Submit'
}
}
</script>
</body>
</html>

View 5 Replies


ADVERTISEMENT

How Can You Make One Search Form Have Many Choices?

Nov 29, 2006

MySpace and Yahoo! have search forms that when you click on the choice (ie web, images, audio) it uses javascript to change the form.

So basically, how can you dynamically change a search form that will give the choice to search different parts of my site?

Basically, it would have to be able to dynamically change the form method and action, and it would have to be able to change the input name.

For example in the front end it would look like this:

Search the {dropdown menu with forum, arcade, site, etc} for { query }

View 4 Replies View Related

How Can I Like Make A Browse Button To Search Your Computer

Apr 3, 2007

How can I like make a browse button to search your computer. and whatever file you choose goes on a textbox. then when you press the submit button it loads then after its done loading it puts the file on my website?

View 3 Replies View Related

AJAX :: Make A Search Case Insensitive?

Apr 19, 2011

I am working on a search function to call some data from an XML document. It works fine except for the fact that it's case sensitive.

What method do I need to use from the String object to make it case insensitive, so that a J is the same as j?

I was thinking of changing my text box string to all lower case using toLowerCase(). If I did this, then would I have to do the same thing in the info retrieved from the XML document? I want to make it so that Tom is the same as tom - I'm just wondering where I would have to apply these - to both the XML doc (being read for the output) as well as the text box string (the input).

Just wondering if I'm overthinking this, or on the right track with toLowerCase().

Also, in my search, to filter the results from only entering a few letters (not the entire element, I'm using the substr() method. It seems to work but I don't know if this affecting the case somehow...

View 1 Replies View Related

Make A Link To A Pdf And Bring Up A Search Pane In The Certain Pdf

Jan 26, 2010

search = "#search=%22" + search + "%22";
globalHTML="<html><head><title>" + formTitle + "</title></head>"+"<frameset><frame src='" + pdfURL + search + "'></frame>"+"</frameset></html>";

This works just fine as my javascript to make a link to a pdf and bring up a search pane in the certain pdf. My question is if anyone has tried to highlight search terms in a pdf just by clicking on the link. I can't seem to get that to happen.

View 2 Replies View Related

Make A Button Link Me To Website With A Designated Search By User?

Mar 14, 2010

I'm new to javascript and I have a button in an interface for an app. It's like drag and drop and i want this button to link you to a certain website searching for what the user types in the searchField1 box. The button is button16. Such as you type dogs into the text box and you click the google button among other search engines and it will redirect you to a google search doing a search for dogs. But how do I make this button search google and search for whats in searchField1. I would really appreciate the help. Im looking everywhere to learn this but just cant find it. If you could tell me how or send me a link to a tutorial code...

View 2 Replies View Related

Make A Search Function Work In A Listbox Full Of Onchange Tags?

Jun 20, 2011

I've got this listbox full of hundreds of employee names. Clicking on a name executes a function using onchange. Because of the length of the list I decided a search function would be really handy and I finally found one that works.

Now the search function, when you type in the input box, scrolls the list to the first matching entry. And that's good, that's what I wanted.

The problem comes in when you try to click on the name the search function found. Nothing happens ofcourse because the onchange tag in the list reacts to changes, not direct clicks.

code:

The list is populated by java but for testing I disabled the function that clears the "Loading" option and I set it to selected. That way the loading option is highlighted by default and the search function is free to highlight something else, then when I click on the search result it works like it's supposed to.

But keeping a highlighted option at the top of the list for that sole purpose isn't very elegant, especially since if you click on it the onchange function tries to execute and generates errors. The only solution I can think of is to use java to generate another option way at the bottom of the list that has the selected attribute but I don't quite know how to do that.

View 1 Replies View Related

Search Term To Stay In Search Field After Search?

Dec 10, 2010

I have a search field on the website, and when I type a word to search, it search good, but after preforming the search, the search term from search text field disappears and become the default 'Search' word.

How can I make search term stay in search field after preforming a search ? For example, when I type into the search field 'JavaScript' I want that term to stay in search field and after the search is done.

View 1 Replies View Related

Instant Search - Code - Show Result String On The Search Field

Dec 13, 2011

I found this for instant search :

demo : [url]

index.php

Now i just want to edit one thing, when you search for something, results are shown under the search field, when you click on each result, goes to a link.

I want when clicking on a result, not going to link, just show that result string on the search field. where should i edit in script?

View 3 Replies View Related

Smart Search Form & Browsers Saved Search Fields?

Aug 18, 2010

I have created a similar smart search like yellowpages:[URL]... Here is the problem I have with mine:

Lets say I search 'Attorneys' I start typing 'Att' ... then 'Attorneys' shows up in the smart search so I click on it and press enter. The next time I start typing 'Att' my browsers saved search field pops up over the websites smart search. Here is an image which might help explain the problem a bit more:

View 1 Replies View Related

JQuery :: Clearing Search Box With Click On Search Results?

Jul 13, 2011

how is clearing search box with click on search results?

jquery:
var strToMatch = $("#hotel").val();
$('.list_name p').each(function () {
if (this.innerHTML.indexOf(strToMatch) > -1) {

[Code]....

View 1 Replies View Related

Passing Search Queries To Google Custom Search?

May 23, 2011

I have chosen to use Google Custom Search with my website and was given the following code, my question is, how can i pass a search query from my homepage which has a standard form on there to the search page which holds this code?

I am given a search box within this code but would prefer to use my own on the homepage...

<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});

[Code]....

View 3 Replies View Related

Limit The Search Area And Not Search The Entire Page?

Aug 24, 2011

I have a javascript that allows me to search text on a page.What I want to do is to limit the search area and not search the entire page.

Here is an example page:

[URL]

View 1 Replies View Related

Using Single Search Box For Multiple Search Methods?

Dec 7, 2011

I have a website that I'm designing where I have the need to search multiple sites at specific times. By this I mean that In some cases, we would want to search only the internet using google, or only search the site that I've created (which currently uses the jse_search.js solution), or only our company's website.

I currently have four different search boxes that will search either the internet, the internal site, a separate internal site, or a third-party website, which all working fine. The problem is that the search boxes take up quite a bit of space, and the layout is becoming cumbersome. Is there a way in Javascript I could use a single search box and a drop-down list to select which method to use? The code I'm currently using is below. With the exception of the Google search function, I've modified some of the site names to general site names and paths to preserve the company's anonymity:

Code in the <head> tag:
<script language="JavaScript1.3" type="text/javascript" src="jse_form.js">
</script>
Code in the <body> tag:
<!--Begin Internal Site Search 1!-->

[Code]...

View 2 Replies View Related

Search Certain Websites Without Having To Use Specific Search Engines?

Aug 27, 2009

is it possible via Javascript to search certain websites with certain keywords without having to use specific search engines?

example search only the following:

1. www.yyy.com
2. www.aaa.com
3. www.zzz.com

for the keyword "Laminat" and open the sites accordingly.

View 8 Replies View Related

XMLHTTP, SSL, And IE

Feb 1, 2006

I'm trying to do use XMLHTTP to do a POST in the following JavaScript snippet.

var xml = new ActiveXObject('Microsoft.XMLHTTP');
xml.open("POST", "http://some/url/", false);
xml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xml.send("username=myusername&password=mypassword");
document.write(xml.responseText);

This works fine in Internet Explorer 6 SP2. However, I would like to use https, rather than http. When I change the URL to https and reload the page, I get an error: "The download of the specified resource has failed". As a test, I tried running the same code in Firefox (changing the first line to "var xml = new XMLHttpRequest()"), and this worked for both http and https perfectly, although using https causes a dialog box to pop up asking the user to accept the SSL certificate. Unfortunately, I really need this to work in IE.

I found a couple of discussions on Usenet about this, but none that seemed to give me a clear answer to this issue. Does anybody know what might be wrong or how I might fix it?

View 3 Replies View Related

Xmlhttp Response -- Non Xml?

Jul 23, 2005

Just playing around with xmlhttp at the moment. I was just wondering if
there is any reason (browser compatibility etc) the response data has to
be formatted in xml, or can I send csv or whatever else if the handler
is up for it?

View 2 Replies View Related

XMLHTTP Question

Jul 23, 2005

I've been looking into the possibility of using XMLHTTP for my
enterprise application but I still have a question.

When you send the request to the server, how does the server know how
to handle the request? (i.e. how do I specify what method to call in my
java servlet?)

I'd appreciate any help on this.....I've only got a vaey basic
knowledge of javascript and I am fluent in java.

View 5 Replies View Related

XmlHttp With Mozilla?

Jul 23, 2005

anyone have a code example of using xmlhttp with mozilla, if i use the
following code, the function is never called, but it does work in IE.

xmlhttp.
{

if (xmlhttp.readyState == 4)
{
var response = xmlhttp.responseText;
divResponse.innerHTML += "<p>" + response + "</p>";
}
}

View 3 Replies View Related

XmlHTTP 'Undefined'?

Feb 23, 2007

I've been working on a tutorial for AJAX and i keep getting this message and cannot locate the source problem. Anyone give me any pointers? Code:

View 2 Replies View Related

Loading Javascript With XMLHTTP...?

Jul 26, 2005

Using XMLHTTP and DOM I'm able to load new HTML page content.

I'd now like to load small snippets of javascript with the HTML markup
and have that <script> incorporated into the page. If any of the loaded
script exists outside a function definition (eg: a call to a function),
I'd like that code to be executed as soon as its added to the DOM.

Can anyone suggest the best way to do this? I've Googled but not found
anything comprehensive. Do I need to use the eval() method or is there
a better way?

View 10 Replies View Related

Security-glitch In IE Using XMLHttp?

Sep 7, 2005

It's a security setting "Access Data Sources across domains" you've
got lowered security for whatever zone you accessed the page in.

View 3 Replies View Related

Xmlhttp Response In Firefox

Apr 3, 2006

There is a problem with XMLHttpRequest and Firefox when the
function that makes the asynchrounous request is called from another window. The URL
of the window does not change to the next page in which i am displaying
the response.

wat does getAllResponseHeader() function do?

View 2 Replies View Related

Can't Send Cookies Using XMLHTTP

Aug 7, 2006

I'm writing a script to send posts to a web forum. I find that
MSXML2.XMLHTTP object could communicate with web server but I can't make
it send cookie which is needed for post authentication. I have searched
google and read some articles including: Code:

View 1 Replies View Related

Put Url Values Into Xmlhttp.open?

Mar 28, 2011

So, my url looks like index.php?id=2&name=test&place=14

There is a next link that uses an onClick= to call an ajax function. This ajax function runs this php script (bar_next.php) behind the scenes.

I need to put just the id value into the code below.

xmlhttp.open("GET","bar_next.php?id=URL VALUES GO HERE",false);

View 5 Replies View Related

Problems With Simple Xmlhttp

Apr 8, 2006

I've picked up a copy of "Foundations of Ajax" and was working through one of the initial examples and ran into a problem. xmlhttp.status always returns 0. I can run the following code and get the expected text returned from the server but only if I comment out the conditional that checks xmlhttp.status


<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
alert('ActiveX xmlhttp object instantiated');
}

else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
alert('Non-IE xmlhttp object instantiated');
}
}

function startRequest() {
alert('Start request fired');
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", "simpleresponse.txt", true);
xmlHttp.send(null);
}

function handleStateChange() {
if(xmlHttp.readyState == 4) { alert('ready state == 4');
// if(xmlHttp.status == 200) { alert('status == 200');
alert("xmlHttp.status = " + xmlHttp.status);
alert("The server replied with: " + xmlHttp.responseText);
// }
}
}
</script>

I don't understand how xmlhttp.responsetext can return the text in the file if xmlhttp.status returns 0. I'm running apache 2.055 on my local xp box. apache is a stock cfg except for vanilla changes I made to add php5.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved