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.
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>
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?
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...
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.
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...
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.
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.
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?
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:
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...
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!-->
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?
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?
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.
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?
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.
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:
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'); } }
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.