Hi. This is a part of a javascript function from my php file and i want to make a small change to add a search command. Someone take a look please and tell me what i am doing wrong. I tried many various ways. $(function(){ $('#content').scrollPagination({ 'contentPage': 'source.php', // the url you are fetching the results Code (markup): This is the change that i need to make and i don't know how to make it working so wen i acces the link like "mysite.com/source.php?search=blabla" to get the results from blabla word [B]$keyword = strip_tags($_GET['search']);[/B] $(function(){ $('#content').scrollPagination({ 'contentPage': 'source.php[B]?search=[/B]'[B]$keyword,[/B] // the url you are fetching the results Code (markup):
I think you may be missing a + to concatenate the string so something like:'source.php?search=' + $keyword
WeddiGo thanks for your advice but still not working, and if i put it like this source.php?search=blabla' it works ok. i cant figure it out how to make it. With php i'm good but javascript is to hard for me.
Ah I thought that was the problem, is $keyword php variable or JavaScript? Im ASP here so if it was an asp variable I would write it like this 'source.php?search=<%=keyword%>' ...note the single quotes, so the bit between <%= %> is asp and gets inserted. If you are using pure JavaScript then it should be var keyword = strip_tags(blah blah...) 'source.php?search=' + keyword I think the $ should be var
Thanks Weddigo is working now i added this code "var keyword = "<?= strip_tags($_GET['search']); ?>" and it works with the + Thanks again