.
Topic RSS12:12 pm
Hi all and thanks for this great plugin!
My site is about Movies and TV Series, so I would like to add a custom button that directly passes the %%TITLE%% value to IMDB search.
The problem is most of my titles are like "Dexter - Season four" but IMDB shows no results for this, so I need a trick (Javascript?) to cut the %%TITLE%% and pass to IMDB only the part before the "-" char.
I tried this
function doSomething(form) {
var str = "%%TITLE%%";
var new_var = str.split("-",1);
form.action = 'http://www.imdb.com/find?'+new_var;
return true;
}
but it seems not to split anything...
Any help would be appreciated thank you!!!
12:16 pm
For some reason the forum cut some part of script I pasted...
Please find the full code I'm trying here: http://nopaste.php-q.net/189695
SpoilerOne said
Hi all and thanks for this great plugin!
My site is about Movies and TV Series, so I would like to add a custom button that directly passes the %%TITLE%% value to IMDB search.
The problem is most of my titles are like "Dexter - Season four" but IMDB shows no results for this, so I need a trick (Javascript?) to cut the %%TITLE%% and pass to IMDB only the part before the "-" char.
I tried this
function doSomething(form) {
var str = "%%TITLE%%";
var new_var = str.split("-",1);
form.action = 'http://www.imdb.com/find?'+new_var;
return true;
}but it seems not to split anything...
Any help would be appreciated thank you!!!
why do you want to use javascript when this can be done using simple HTML. Try out the below code.
<a href="http://www.imdb.com/find?q=%%TITLE%%&s=all" target="_blank"><img src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/174569_15925638948_1606817441_q.jpg" alt="" width="50" /></a>
< My Domain Names Generator tool crossed 50,000 page views. If you haven't tried yet, then try it out. />
Log In
Members
Add Reply
Add Topic
Quote
Offline
