H2VE Posted October 22, 2020 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. Link to comment Share on other sites More sharing options...
niche Posted October 22, 2020 Share Posted October 22, 2020 want to do it server side or client side? Link to comment Share on other sites More sharing options...
H2VE Posted October 22, 2020 Author 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. Link to comment Share on other sites More sharing options...
niche Posted October 22, 2020 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 Link to comment Share on other sites More sharing options...
H2VE Posted October 22, 2020 Author 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. Link to comment Share on other sites More sharing options...
bramjdow Posted October 26, 2020 Share Posted October 26, 2020 I think an expert should be consulted Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now