How is this done?

They have: 22 posts

Joined: Nov 2005

Please follow this link and click on one of the reg# links...

http://www.advantagecattle.com/classifieds_embryos.htm

When you click on that link, it goes to the Angus Animal Search page, but it already has the registry number in the box. How is that done? I've done a little html and am using Dreamweaver to build a site for my husband's cattle business. Can someone help me with this?

Thanks!

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Chances are, they are using a server side language such as PHP or ASP.

I'm not too sure how it's done with ASP but, there are several ways to do it with PHP.

They have: 22 posts

Joined: Nov 2005

Well, the most I've ever done with php is editing the files for my Photopost and vBulletin installs, so he may just be out of luck on this one. Thanks!

They have: 5,633 posts

Joined: Jan 1970

http://www.angus.org/common/epd_ped_details.html?aid=14098832
That is the link to the other site. (angus.org)

The page it goes to is "epd_ped_details.html".

You will notice right after the page is a "?"
Everything pas the "?" is called a QueryString.

All you have to do is change the "aid" value.
So if you want Animal Reg Number 12345 then you use this link:
http://www.angus.org/common/epd_ped_details.html?aid=12345

He has: 698 posts

Joined: Jul 2005

Yep, and then it passes that value to its destination page and that text box has a value of "$_GET['aid'];", or something similar to that. Wink

They have: 22 posts

Joined: Nov 2005

Oh, my gosh, you're awesome! So, that's the link I put in and just change the number for each animal? That's great! Thank you so much!

They have: 5,633 posts

Joined: Jan 1970

It would appear as if they where doing it with javascript though, considering all the makes have the .html extention

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

I doubt it is javascript, as when you do VIEW SOURCE, you will see the source code as given by the server already has the ID# in there:

<td><b>Animal Reg Number</b></td>
<td><INPUT TYPE="Text" NAME="reg1" STYLE="{width:120px;}" SIZE="9" VALUE="14098832">
</td>
'
It is running on IIS 5.0, so maybe they just set the server to run .html files as ASP pages or soemthing?

Just to clarify, is the issue of how to link to their page with the ID# already in there (which has been resolved) what you were looking for, or issue of how to make a page of your own that will accept such a link?

-Greg

They have: 22 posts

Joined: Nov 2005

Nope, just how to link to their page with the ID# in there... I thought my giddy response above would let everyone know my problem was solved, LOL! That was exactly what I needed to know. Thanks again! You guys are great!

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Opps, I had missed your previous responce.

Glad that it is working Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.