By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,576 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,576 IT Pros & Developers. It's quick & easy.

Is it possible to have "something.html?id=1" ?

P: 15
Hi,

is it possible to create a html with variables, like "www.site.com/category.html?id=type1"?
I wanna do this because I'm using a little ajax in my html and I have created a category.html page already. So depending on my variable, "id=type1", I will populate my category page with the data of type1 or type2 or type3 from my xml.

If it is possible, what is the javascript syntax to extract the variable "id=type1" so I can use it in my ajax part?

Thanks
Gordon
Oct 25 '07 #1
Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
I guess you're looking for the location.search property.
Oct 25 '07 #2

P: 15
Thanks. I didn't know about that one.

Regards,
Gordon
Oct 25 '07 #3

acoder
Expert Mod 15k+
P: 16,027
Thanks. I didn't know about that one.
You might find the HTML DOM Reference useful, then.
Oct 25 '07 #4

P: 15
Ok, Thanks for the reference.
Oct 25 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.