Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Need help with ASP / Amazon links

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

simonj

Established Member
Impact
15
Hi I have amazon afilliate links on my site, such as this:

Code:
<iframe src="http://rcm.amazon.com/e/cm?t=sfbookscom-20&o=1&p=12&l=st1&mode=books&search=asimov&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="300" height="250" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>

I want to change the hardcoded keyword to one grabbed from a search. For example in the code above where is says asimov I want to put ASP code in there such as this <%=request("search")%>

For some reason it's not working, is it the iframe that is screwing up the ASP or some other problem?

thanks
Simon
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
What do you mean not working?

Please show the source of the loaded page.
 
0
Close
This works:
http://rcm.amazon.com/e/cm?t=sfbookscom-20&o=1&p=12&l=st1&mode=books&search=poker&fc1=&lt1=&lc1=&bg1=&f=ifr

Make sure that your search string is properly URL-encoded or you will screw up the results ;)
 
0
Close
0
Close
Could you post some code ?
 
0
Close
<iframe src="http://rcm.amazon.com/e/cm?t=sfbookscom-20&o=1&p=12&l=st1&mode=books&search= <%=request("search")%>
&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="300" height="250" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>

All I want is the correct syntax for inserting ASP in the middle of the url
 
0
Close
Your code should be fine provided that:

- you encode the search string to be passed on to Amazon properly (I have added urlencode in the sample below), this is necessary if you have special characters or space etc
- your iframe is not broken in your code with a space or line break for example, make sure the whole statement sticks together, that is on the same line ;)

HTML:
<iframe src="http://rcm.amazon.com/e/cm?t=sfbookscom-20&o=1&p=12&l=st1&mode=books&search=<%=server.URLEncode(request("search"))%>&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="300" height="250" border="0" frameborder="0" style="border:none;" scrolling="no">
</iframe>
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back