Hi.
I´m new in the forum and i start with a problem i´m having in my code and hope you can help me out.
The code is related with a search for products in my database.
The problem is that in the for cycle that i have to make the pages ( if there are more then 30 products ) my variable to send through the querystring link is not complete.
If i make the search with just one word it goes ok, but if i place 2 words separated by space it only shows the first word.
The for cycle is only to make the page links, it doesn´t affect the variable at all.
Here is some code:
' this code receives the variable that comes from the text form )
Dim exemplo
example=strText2
At this stage if a print example it shows the right value. ( either if it´s one word ore more, no problem until here )
' this code is to make all the necessary pages in a link to go to the next page
pages = " "
For l = 1 to ipage
If l = page then
pages = pages & " [" & page & "] "
Else
response.write "Go 24"
response.write "<br><br>"
response.write example
response.write "<br><br>"
pages = pages & " <a class='pagpesquisa' href=searchaction.asp?pesquisa="&example&"&intPrice="&intPrice&"&chkPrice="&chkPrice&"&strCat="&strCat&"&chkCat="&chkCat&"&page=" &l&">" & l & "</a>" & " "
End If
Next
When a run this code i get a pass on the G0 24 and i print the EXAMPLE and it show right ( team magic ) - team magic is the variable value.
Here is the print:
Go 24 ( this e a response.write to mke sure that i was going in the right way )
team magic ( this is the response.write of the search variable )
But when i move the mouse pointer into the second page in the browser it only shows (team)
Here is the link that it shows:
searchaction.asp?pesquisa=team
Also it is ignoring the other variables, but i think it is ignoring the other variables because of the first one ( example ).
If i make a search of only one word the result is the following as a link: (bateria is the search word)
searchaction.asp?pesquisa=bateria&intPrice=&chkPrice=&strCat=&chkCat=&page=2
We can see the other varaibles empty but that is not a problem to my code.
Any thoughts ?
If you need to test the code i can supply the link of my store. ( you can check it in english )
Thanks.
Alex