Find jobs - WoW Gold - Find services - Just Holden Commodores - Myspace Layouts

PDA

View Full Version : JavaScript 'GET'


T0PS3O
May 9th 2006, 10:57 am
I'm creating an eBay listing template and want an 'ask a question' link in there. This link requires the item id (iid) and it would defeat the purpose of a template if its inserted manually.

So... Can JavaScript sniff out the listing ID from the URL, or from the HTML above the snippet?

I only ever used PHP with $_GET['variable'] - does JavaScript have a similar structure available?

Slapyo
May 9th 2006, 11:08 am
You might want to check this out.

http://adamv.com/dev/javascript/querystring

Provides a nice method for accessing the query string of a page, or of one that you pass to it. It splits the query string up into name/value pairs for you.

T0PS3O
May 9th 2006, 11:16 am
Thanks!

Though I only just now realized how the eBay URL looks like:

.co.uk/item_name_listing_title_here_W0QQitemZ9589355026QQcategoryZ45107QQtcZphotoQQcmdZViewItem

Without a ?key=value&key2=value2 it's probably not going to be easy... I'll check out the link though, thanks a lot.