Unstoppable Domains

Need help with ASP / Amazon links

Spacemail by SpaceshipSpacemail by Spaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
What do you mean not working?

Please show the source of the loaded page.
 
0
•••
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
•••
0
•••
Could you post some code ?
 
0
•••
<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
•••
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
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back