Search Box For Current Page
Sep 26, 2003I need to make a search box to enable the user to search for a text string on the current page. All the sources I've checked are concerned with searching the web, or tying into Google, etc.
View 1 RepliesI need to make a search box to enable the user to search for a text string on the current page. All the sources I've checked are concerned with searching the web, or tying into Google, etc.
View 1 RepliesI've been trying to get some Ajax functionality on my rails app and have been stuck on this issue for a couple days... (new to jQuery!). My app has a form on the top of my site that acts as a search. When a user submits the form, they are redirected to a "search_users" page.
Rather than redirecting to a "search_users" page, I want the "search_users" page to load in a div called "page" on current page.. I was able to do this with my sites navigation (so when a person clicks on "home" or "about" or "contact me", nothing refreshes except a div called "pages") but not for the search form.
[Code]...
I'm trying to create two bookmarklets:
1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.
I have a page built in Sharepoint. I need to create a little search box within that page so people can search for names on that same page. It's a page with a lot of text, hence why the search feature is needed.
I can only use an XML editor.
I have a project to do for a kind of business directory and while I already have it designed I'm stuck on one aspect of it. As it stands, you select a category and then get the results in a nice little invisible table with colored rows. Now, I can create any table I want through the use of a hidden Javascript function that contains the information (No, I'm not worried about updates) and then creates the table.
The problem I have is this. If someone changes the category or puts in a partial name or full name, how can I delete the currently displayed results and then show only the results for the new search? And how can I do this consistently? The problem I have almost sounds like a problem that should be solved using PHP but it doesn't sound so complicated that it couldn't be done in javascript either.
I'm using this jQuery tabs library that uses this simple set up...
<!-- the tabs -->
<ul class="tabs">
<li><a href="#">Tab 1</a></li>
<li><a href="#">Tab 2</a></li>
<li><a href="#">Tab 3</a></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<div>pane 1 content</div>
<div>pane 2 content</div>
<div>pane 3 content</div>
</div>
So clicking tab 1 loads the contents of the first DIV, tab 2 second DIV, etc. I have a different image map that loads into each of the separate DIVs. I have set up a search box that allows me to enter a value that matches an ALT value of one of the <area> tags and then using the scrollTo library, scrolls to that value using the coordinates provided in the <area> tag. Currently I have this working when I manually enter the DIV's class into the script:
<div>
<input id="search" name="targetId" value="" />
<button type="button" id="searchButton" name="searchButton">Search</button>
</div>
<script type="text/javascript">
$('#searchButton').click(function(){
var id = $('#search').val();
var elem = document.getElementById(id);
if (elem) {
var parts = $(elem).attr('coords').split(',');
parts = $.map(parts, parseInt);
$('div.fms1').scrollTo({ left:parts[0], top:parts[2] }, {duration:1000, axis:'x'});
}});
</script>
I'm trying to figure out how I can set up the search box to search the currently loaded DIV which is loaded depending on which tab is selected. I tried the following unsuccessfully:
$('div.'+$(this)).scrollTo({ left:parts[0], top:parts[2] }, {duration:1000, axis:'x'});
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]
My requirement is, I have multiple pages in tab format. If i am on first page in edit mode and change any control's value and without saving information i click on other tab that particular time a popup should appear showing validation message say "you are moving without save and it will loos all changes either click ok to loose the changes and move to other page or click cancel to remain on the current page."I tried using var isDirty = false; var msg = 'This page has unsaved changes.Click OK to abandon the changes and leave the page.Click Cancel to stay on the page so that you can save your changes.';
$(document).ready(function ()
{
$(':input').change(function ()
[code]....
Based on the lack of responses to the last hole (which I am attributing to one of the following:
a. The hole being too difficult,
b. It being overly time consuming, or
c. People not wanting to do it)
I have decided to take a step back for this hole.
Create a Javascript include function. This function should include a javascript file (when given a URL) into the current page assuming it wasn't already included in the page (either via the include function call or by HTML). If the file is already included the function should just return.
This function should either take a file name/ path to file or a full URL as a parameter. If it is a filename/ path the function should include the file from the base URL of the current site (such as [url]). If it is a full URL just include it.
Make sure you don't allow files to be included multiple times, we don't want that!
There is many examples of PageLoader's etc. in the web, but I can't find a script like facebook (and many other sites) uses. When a link is cliked -> user stays at current page and get's "Page loading" etc. notice until the next page is fully downloaded.In other words; When I click a link (Internet Explorer), I get first "a white page" until next page show's ..I want, that the page does not go white at all, but current page show's until the next page is fully downloaded.
View 3 Replies View RelatedIt is possible to perform a find in page search that looks at a specific link, opens the page in a new window and finds the text within that document?? Basically I regularly use an html page in work that has a list of people and their telephone numbers. I want to be able to type in a searchbox on my main page and it open the target page and find the name I am looking for? Is this possible or can you only Find In Page on the same page or another frame?
View 1 Replies View RelatedI 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.
I am using a very simple search-type page to enable users to input a model number and its page appears in a inline frame. Its not a true search as it is simply relying on a person entering the correct html page name to find it. But this works perfectly in my application.The problem I have is that I cannot get the type box to accept enter key as a submitt, only a click of the mouse will submitt the request. If enter is pressed the box loses the users input but no action is taken.I think this may be a javascript issue. I have posted the code below.
[CODE]
<html>
<head>
[code]....
how to post dat from curent page to another php page using jquery
View 2 Replies View RelatedI have a button in my site which when clicked, will set the current page to be the home page for the user. I use the following code:
var hiddenLink = document.getElementById('dummyLink');
hiddenLink.style.behavior='url(#default#homepage)'
hiddenLink.setHomePage('http://www.123.com');
somewhere in my <body>, I have the following link definition:
<a href="#" id="'dummyLink'" style="display:none"></a>
Now, this solution works fine for IE But I need to have a working solution for Firefox and Opera too. Does anyone know how to solve this in these 2 browers?
I've got 2 pages: a current events page and a past events page the current events page loads fine as there is only about 10 events the past events page takes about 30 seconds to load and will crash if u click your mouse in the loading time.
The pages are near identical the only difference is the query that selects the events (> versus <)
The page loads immediately without:
But when i put it back in the above happens. I'm using jQuery.roundedcorners.
I wanna scroll the page to a specific location at the bottom. I can get the position of the destination, but how can I know where I am on the page? I need to scroll the page from the current location to the destination slowly not at once, is that possible?
View 2 Replies View RelatedI want to add the current page's url to a link, like this:
[Code]...
I'm running a script for my ecommerce website. I'd like to modify a button that brings up a customer's invoice as a webpage to instead print out that page (not the current page) and not leave the page I am currently on. Is there a way to do this in javascript? I'm assuming window.print() can only be used for the current page?
View 1 Replies View RelatedUsing the DOM the non-standard but widely implemented innerHTML extension, the following would be sufficient to modify the content of any element that can have content:
« <div id="anID">Some Content</div» with script of
« document.getElementById("anID").innerHTML= "Some <em>new</emContent"; »
Where "anID" is the (unique on the HTML page) ID attribute value
of the element to modify.
The script below adds support for « document.all » capable browsers.
Support for NN4 is also possible, but certain issues mean that
it is not listed here. Using the example above, the call would
be written:
I was searching for this and found only: var local = window.location.href; Is there any other way to achive this?
View 5 Replies View RelatedI'm not sure if this is the correct place to post this question. If it isn't, please let me know where I should post it.I created a simple content slider with each link directed to a section on the same page. The menu I'm using is straightforward:
<div id="menu">
<ul>
<li><a href="#home" class=".current">Home</a></li>
[code]....
I'm trying to append the url of the parent page an iframe is located in based on the current url within the iframe.This is all taking place on the same domain, so I don't think there should be any security issues.My code looks like the following:
Code:
function locator_url() {
var iframeUrl = alert(document.getElementById("dealer-locator").documentWindow.location.href);
var iframeUrlSplit = iframeUrl.split('/locator/');[code].....
The code works for the initial page load, the parent url is appended to http://localhost/meade/dealerlocator/#
However, when I click a link inside the iframe the parent url doesn't change, even though the href value in the iframe has.The parent url should have it's hash updated to something like:
http://localhost/meade/dealerlocator/#results_list.php?showonly=US&tab=US&zip=&distance=10&state=&city=&name=
But that's not happening.What am I missing?
As you can see this code will open up a new window. I can't seem to find the code to make it appear in the same window. As in I click on the link "ABOUT US" and the new page loads on the current window.
Code:
<div style = "cursor:pointer;hand" onclick = "window.open('testdocaboutus.html')" class = "txt-1">ABOUT US</div>
I put my website in an iFrame to mask the URL...and everything works great, except that on any given page, when you click the browser reload button it goes back to the original iframe src.
I assume I need JS to get it to refresh the current content(page), but I cannot for the life of me find a simple answer. Does anyone know how to do this off hand? Is it even JS that I need?
I need to do is take the current page's url and replace/add a bit into the URL at the appropriate place.For Example, if this is the Current Page URL:http:[url]...I want to be able to use the bookmarklet to change it to:http:[url]....This is all I've got for it so far. Probably botched that up too. : javascript:(function(){var%20a=document.URL.split([url]....
View 7 Replies View Related