Problem with javascript in page

lossehelin

Regular Member
Joined
May 23, 2009
Messages
204
Reaction score
47
I am trying to add a javascript code from surehits on the destination page, but nothing is showing... is just wordpress useless with javascript?
 
wordpress is all for JavaScript
what is the code you got from surehits and where did you put it on your site?
 
this is the code i got from surehits:
PHP:
<script type="text/javascript">
function getQueryStringVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split('=');
if (pair[0] == variable) {
return pair[1];}}}

ni_ad_client = "111111";
ni_res_id = 2;
ni_alt_url = "https://www.shmktpl.com/search.asp";
ni_zc = getQueryStringVariable('zipcode');
ni_str_state_code = getQueryStringVariable('statecode');
ni_var1 = "";
ni_display_width = 500;
ni_display_height = 1000;
ni_color_border = "";
ni_color_bg = "";
ni_color_link = "";
ni_color_url = "";
ni_color_text = "";
</script>

<script type="text/javascript" src="https://www.shmktpl.com/retrieve_listings.asp"></script>

<noscript><a href="https://www.shmktpl.com/search.asp?src=179482&res=2"><img src="https://www.shmktpl.com/images/nojs/image.asp?src=179482&res=2" border="0"></a></noscript>

the code is in mydomain/results/ page
 
ok. if i try to insert thecode in a post it works, but not with pages..... :`
 
I've tried adding my Surehits code to posts instead of pages without success. Right now I'm directing users to a static HTML, non-WP results page. Obviously this is pretty inefficient and not so well integrated with the rest of the site.

Does anyone else have any pointers as to how to integrate the Surehits javascript with Wordpress? I have seen several WP sites doing this well but have been unable to replicate the results. Most of them set their permalinks on the results page to end with .html, like "/results.html" even though it's a WP post.

I tried the Advanced Permalinks plugin to replicate this; however, my post still ends with a trailing slash: "/results.html/"

If anyone has any advice, I would truly truly appreciate it. I've been pulling my hair over this :D

Thanks!
 
will this script works in my site if i dont have a surehits account? if then i will have a look at once ...
 
Back
Top