Page 1 of 1

Website Help (Wasn't sure where to post)

Posted: Tue May 12, 2009 7:40 pm
by Bacon
I thought mabye this should go in programming discussion but all I see in there is c++ etc, and it's kinda dead in there sometimes... :shrug:

Heres the situation - I have a page, listing items, lets use games as an example.

Right now its like this:

-Game A
-Game B
-Game C

and so on. Right now it's set up so Game A points to gamea.html, Game B points to gameb.html, you get the idea...

The reason they are thier own seperate pages is because in the game's html code i have an <applet> then <param name = "xxx" value ="yyy">

I was wondering if it is possible to just have one page, for Game A, B, C, and have the page that lists these games set the variables inside of the next page, (the value ="yyy" part), elimination the need to have a seperate page for each click. This will save me about 700 html files, so it's a necessity.

Also I was wondering if I can have radio buttons on the game listing page to edit these values as well, depending on whats selected.

I've googled for a few hours and the only solutions I can seem to find involve active server pages which I have no experience in whatsoever, just html/java/js I currently really know how to use.

Anyone up for this? ANY help whatsoever is appreciated, because I really don't want to have to make 700+ pages...

Re: Website Help (Wasn't sure where to post)

Posted: Wed May 13, 2009 2:38 am
by Fender
You need some sort of way to generate HTML. Be that .NET, Java, Perl, PHP, Python... whatever.

edit: you might be able to get HTTP parameters w/ JavaScript and rewrite part of the page.

http://www.netlobo.com/url_query_string_javascript.html
or
http://www.go4expert.com/forums/showthread.php?t=2163

Re: Website Help (Wasn't sure where to post)

Posted: Wed May 13, 2009 6:13 am
by Bacon
that first link is exactly what i needed, tyvm :p

Re: Website Help (Wasn't sure where to post)

Posted: Wed May 13, 2009 8:13 am
by MKJ
yes, using indexOf is what will help you here.

Re: Website Help (Wasn't sure where to post)

Posted: Wed May 13, 2009 8:39 am
by ^misantropia^
And use something like jQuery's $('param[name=xxx]').attr('value', queryParamValue) to escape the query parameter, or I'll come and h4x0r your site.

Re: Website Help (Wasn't sure where to post)

Posted: Wed May 13, 2009 9:10 am
by MKJ
shit, dont rely on toolkits too much. while they have their uses they are also the bane of webdevelopment and more importantly personal growth