• Page 1 of 1
  • 1
Forum moderator: bigblog  
How to replace all occurrences of a string in JavaScript?
fadly
Posts: 73
Reputation: 0

Message # 1 | 4:12 PM
How to replace Request returned no results with another text in JavaScript?
blizar10
Posts: 96
Reputation: 0

Message # 2 | 5:50 PM
please. Give us the link with the text to be replaced.
fadly
Posts: 73
Reputation: 0

Message # 3 | 2:06 AM
Quote blizar10 ()
please. Give us the link with the text to be replaced.


How to replace Request returned no results with another text in JavaScript?

look on demo http://indoxxi.info/search/?q=cinta+laki+laki+biasa

Request returned no results i want change with Sorry.. you search cinta laki laki biasa not found

Post edited by fadly - Saturday, 2017-03-25, 2:09 AM
blizar10
Posts: 96
Reputation: 0

Message # 4 | 4:29 AM
Put this in the search page in the design customization of your Site Search:

Code

<script>
  document.getElementsByClassName("fix-film_item fix_home clearfix list_items")[0].innerHTML = "Sorry.. you search $SEARCH_QUERY$ not found";
     </script>
fadly
Posts: 73
Reputation: 0

Message # 5 | 5:56 AM
not working... i want change Request returned no results with Sorry.. you search cinta laki laki biasa not found sad

how to hange this

Code
<div style="text-align:center;padding:20px">Request returned no results</div>

Post edited by fadly - Saturday, 2017-03-25, 5:58 AM
blizar10
Posts: 96
Reputation: 0

Message # 6 | 8:42 AM
Quote fadly ()
not working... i want change Request returned no results with Sorry.. you search cinta laki laki biasa not found


For me it's works. Where did you put the code? Can you send me screens shots?
fadly
Posts: 73
Reputation: 0

Message # 7 | 9:17 AM
Quote blizar10 ()
For me it's works. Where did you put the code? Can you send me screens shots?


Im put on search page above $BODY$

here the screens shots


its working now... im fixed the script

Code
<div class='rey'>$BODY$</div>

     <script>
x = document.getElementsByTagName('div')
for(i=0;i<=x.length;i++){
if(x[i].className=='rey') x[i].innerHTML=x[i].innerHTML.replace("Request returned no results","Sorry..  $SEARCH_QUERY$ Not Founds")
}
</script>
Attachments: 4547149.png (42.1 Kb)

Post edited by fadly - Saturday, 2017-03-25, 6:20 PM
blizar10
Posts: 96
Reputation: 0

Message # 8 | 6:54 PM
Good !
I hope I have helped you a little smile
Post edited by blizar10 - Sunday, 2017-03-26, 7:03 PM
  • Page 1 of 1
  • 1
Search: