June 30th, 2003, 06:03 PM
var words=" ";
for (i=0; i<=10; i++)
words = words + " + AND + " + prefArray[i];}
How can I pass the var "words" to another asp page (say, search.asp)? In that search page, I want to use the received words to conduct a key word search. Please help me!!! Thax a lot!
You can pass the variables via the post method and have the recieving page accept the variables. Depending on your server and your experience you could use sessions as well.
This is something i created for transferring some products:
HiddenHTML = '<form name="frmProduct" method="POST">'
HiddenHTML += '<input name="Code' + i + '" type="hidden" value="' + arrCode[i] + '">'
HiddenHTML += '<input name="Oms' + i + '" type="hidden" value="' + arrOms[i] + '">'
HiddenHTML += '<input name="Prijs' + i + '" type="hidden" value="' + arrPrijs[i] + '">'
HiddenHTML += '<input name="Totaal" type="hidden" value=' + total + '>'
HiddenHTML += '<input name="AantalVelden" type="hidden" value=' + i + '>'
HiddenHTML += '</form>'
Put it in a div with this :
document.all["HiddenProducts"].innerHTML = HiddenHTML
And put this somewhere on your page
And create a button and call a function with some thing like this:
document.frmProduct.action = "<somepage.asp>"
there some dutch words involved but i think you well get the main idea from this.