0

I have some ten html pages each page has same search tab, when i click search button from any of the page it navigates to index page with search text passed through query string and displays output on the index page . How can i write click on the index page with search parameters entered from index page search tab and display the results on the index page. I used the following logic: example1.html ......

$("#SearchButton").click(function() {
    var address = ($("#s1").val());
    var keyword2 = ($("#s2").val());
    var radius2 = ($("#s3").val());
    $.cookie("spaddress", address);
    $.cookie("spkeyword", keyword2);
    $.cookie("spradius", radius2);
    window.location.href = "http://localhost:4745/blsk22-9-2010/seek.html?page1=1";
    });

...... .. index.html .....

$(document).ready(function() {
var page1 = Request.QueryString("page1");
    alert(page1);
    if (page1 == 1) {

            map = new GMap2(document.getElementById('SearchMap'));
                var keyword1 =  $.cookie('spkeyword');
                var radius = $.cookie('spradius');
                var address1 = $.cookie('spaddress'); 
....
....
}
else
{
$("#SearchButton").click(function() {

                    var keyword1 = ($("#text1").val());
                    var radius = ($("#radiusSelect").val());
                    var address1 = ($("#addressLocation").val());
....
.....
.....
}
Reigel Gallarde
  • 64,198
  • 21
  • 121
  • 139
mahesh
  • 3,067
  • 16
  • 69
  • 127
  • Can you clarify your question? I can't understand what you want to know. – geon Oct 04 '10 at 07:39
  • If their are two html pages example1.html and example2.html .when i navigate to example2.html from example1.html how will check in example2.html that i have navigated from example1.html itself – mahesh Oct 04 '10 at 08:19

1 Answers1

0

Use document.referrer to find out what page was used to get to the current page, and .serialize to convert input values into query string parameters.

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265