Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next
Help with HTML section
Author Message
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 599
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Excuse my ignorance, but I've been trying to make a HTML section for Find-DVD.co.uk using a title search and I'm having a small problem.

First, I honestly don't know what I'm doing, but I've basically been cutting & pasting from the Wiki HTML section I have in my layout and editing in what I think are the correct links. I'm trying to do at least a title search on the site, but would also like to do a UPC search if possible.

I have the HTML working up to this point...



What do I need to change in the code to get it to submit the title?

And if you're feeling extra helpful, also search using UPC?

Here's the code so far...

Quote:
<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">

function FindDVD() {
  var title = DP_Title;
  var matchErg = DP_Notes.match(/FindDVD:\s*(.+)$/i);
  if (matchErg) {
    var FindDVDilink = "http://www.find-dvd.co.uk/" + matchErg[1];
  } else {
    var FindDVDlink = "http://www.find-dvd.co.uk/search.aspx?title=";
  }
  window.location.href= FindDVDlink;
}

//-->
</SCRIPT>
</HEAD>
<BODY onload="FindDVD();">
</BODY>
</HTML>


Any help would be greatly appreciated.
 Last edited: by Antares
DVD Profiler Unlimited RegistrantFredLooks
phpDVDProfilerDude D5/7/2
Registered: March 13, 2007
Canada Posts: 350
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting Antares:
Quote:
What do I need to change in the code to get it to submit the title?


I think you need to change
Quote:
    var FindDVDlink = "http://www.find-dvd.co.uk/search.aspx?title=";

to
Quote:
    var FindDVDlink = "http://www.find-dvd.co.uk/search.aspx?title="+title;


Quote:
And if you're feeling extra helpful, also search using UPC?


FindDVD does not appear to have a search by EAN/UPC. It isn't obvious from the 15 seconds that i looked at the site if they use that very much ...
-fred
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 599
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thanks you very much, it worked. Green arrow for you!
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 599
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting FredLooks:
Quote:
FindDVD does not appear to have a search by EAN/UPC.


Would it be possible to search using Director instead?
 Last edited: by Antares
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting Antares:
Quote:
Quoting FredLooks:
Quote:
FindDVD does not appear to have a search by EAN/UPC.


Would it be possible to search using Director instead?


This should work:
var FindDVDlink = "http://www.find-dvd.co.uk/director.aspx?director=<DP NAME="CREW_DIRECTION">";


DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Quoting TomGaines:
Quote:
Quoting Antares:
Quote:
Would it be possible to search using Director instead?

This should work:
var FindDVDlink = "http://www.find-dvd.co.uk/director.aspx?director=<DP NAME="CREW_DIRECTION">";


Sorry, it won't, because the DP tag will include HTML tags. You either have to put the DP tag in a hidden DIV tag and extract the first line of the innerText property or you have to include Crew in the HEADER_VARS, search for the first Director entry in DP_CrewEntries, and normalize that name.

Also you should always call escape() for parameters appended to a query URL.

Lastly, the director search on www.find-dvd.co.uk is pretty poor. It seems to require exact spelling of the full director name. For example, it will find neither "Spielberg", nor "Steven++Spielberg" (2 spaces), only the exact spelling of "Steven+Spielberg".
Matthias
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next