H2VE 0 Posted October 22, 2020 Report Share Posted October 22, 2020 Hello, I have a voting info website. People click on cells in a large 50 U.S. state table, with 4 URL links per row. That's 200 URL's. Here's the code for each I'm using: "onclick="window.location='http://alabamavotes.gov/AbsenteeVotingInfo.aspx?m=voters'"> Is there a way for the code in the HTML to be a "placeholder" to an external area where all the URL's "live" for easier updating? Such as "onclick="window.location=AL-AV" and somewhere else in the code (or even a table that "lives outside" the code in a separate document) there's something like "AL-AV" = http://alabamavotes.gov/AbsenteeVotingInfo.aspx?m=voters'" Thanks. Quote Link to post Share on other sites
niche 143 Posted October 22, 2020 Report Share Posted October 22, 2020 want to do it server side or client side? Quote Link to post Share on other sites
H2VE 0 Posted October 22, 2020 Author Report Share Posted October 22, 2020 Hello. Thanks for offering to help. I'm my own client! All I know about what you asked is that... I can upload things in folders that I can access at my web hosting service. Quote Link to post Share on other sites
niche 143 Posted October 22, 2020 Report Share Posted October 22, 2020 (edited) I'd do it client side with php. either way you'd need to know something about php (server side) or javascript (client side). else, the answer is probably beyond your current capabilities. Someone else might have a different approach/opinion. We're happy to help as long as you try to ask informed questions. The best hint I can give you is that you'll probably need to use some kind of loop. so, read up on php loops specifically and php in general and try to rough out how you'd fit a php loop into your code. First things first, though. you'll need to set a localhost. i'd use wampserver for that. So, install wampserver (assuming you're using windows) and get back with us. The step after that is familiarizing yourself w/ php. This will be a leap worth taking. Edited October 22, 2020 by niche Quote Link to post Share on other sites
H2VE 0 Posted October 22, 2020 Author Report Share Posted October 22, 2020 Thanks. I appreciate the confidence and the advice and that I should consider my current capabilities. Since it's a voting website, the links don't actually need to be updated all that often. But I'll definitely consider what you've advised. Thanks again. Quote Link to post Share on other sites
bramjdow 0 Posted October 26, 2020 Report Share Posted October 26, 2020 I think an expert should be consulted Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.