0

I'm working on an online auction...all the bid updates are manual. Simply, there are hundreds of links (images of the pieces to bid on) on the same page. When the bidder clicks an image, a form pops up in a NEW WINDOW. The form says "Thanks for bidding on "TitleOfWork" send the form to finish..." I receive the form via email, with the TitleOfWork as the subject, so I know which bid to update.

What I need, is a way to use the same form for all of the items. The only way I can think of to achieve this, is to somehow run a script to call a value (id=TitleOfWork) from the item's link and retrieve it on the new window. I've tried everything, but I can't seem to retrieve a piece of information on the NEW WINDOW from the clicked link on the first page. And it had to be a variable, because there are several hundred links, all with different titles. Does this make any sense? I'm new to .php so I've been experimenting with .localStorage, but I seem to be doing something wrong.

Here's an example of how the links look:

<a href="../image1.html" name="#TitleOfWork-1" id="TitleOfWork-1">Bid Now!</a> 
<a href="../image2.html" name="#TitleOfWork-2" id="TitleOfWork-2">Bid Now!</a>
<a href="../image3.html" name="#TitleOfWork-3" id="TitleOfWork-3">Bid Now!</a>
<a href="../image4.html" name="#TitleOfWork-4" id="TitleOfWork-4">Bid Now!</a>

When the form pops up in the new page, I need it to access the particular #TitleOfWork from the link that was clicked.

If someone could help, you'll save me from making hundreds of different forms - one for each piece!!!

amandabeau
  • 43
  • 2
  • 8
  • Maybe it's just my misunderstanding of the question, but if it were me, I'd focus on using a database and NOT manually updating prices! – Paul Dessert Mar 21 '14 at 17:45
  • That would be ideal, but this is a client that was passed on to me. This is how it's always been done, and they don't want to pay for a re-design. I'm stuck :( – amandabeau Mar 21 '14 at 17:50
  • Wow. In that case, you'll want to use JavaScript to pull the id. This isn't a full solution, but it will get you started: http://stackoverflow.com/questions/3239598/how-can-i-get-the-id-of-an-element-using-jquery – Paul Dessert Mar 21 '14 at 17:56

0 Answers0