PHP Array to display data depending on link - FOLLOW UP
By : catherine cassell
Date : March 29 2020, 07:55 AM
wish of those help I have previously asked a question to populate a page depending on which link the user clicked on this post, found here: code :
(QUERY = SELECT * FROM [table] WHERE company = {$_GET['link']};)
while($row = mysql_fetch_array($result)) {
$companyarray = $row;
}
echo "<div id='companyname'><a href='http://" . $companyarray['website'] . "' />" . $companyarray['company'] . "</a></div>";
echo "<div id='website'><a href='http://" . $companyarray['website'] . "' />" . $companyarray['website'] . "</a></div>";
echo "<img src='images/example.jpg' class='profilePic' />";
echo "<div id='story'>" . $companyarray['story'] . "</div>"
|
android + json + how to display the extracted data in a list and when it clicked display the data in a single row?
By : Duncan Scott
Date : March 29 2020, 07:55 AM
Hope that helps i see 2 problem in your code: 1- you define your AsyncTask class like code :
AsyncTask<Void, Void, List<String>>
protected void onPostExecute(Void result)
protected void onPostExecute(List<String> result)
JSONParserHandler.finalResult
result
protected void onPostExecute(List<String> result) {
// TODO Auto-generated method stub
if (null != mClient) {
mClient.close();
if (result != null)
{
ListAdapter adapter = new SimpleAdapter(
JsonActivityHttpClient.this, result,
R.layout.list_item, new String[] { PLACE_NAME_TAG, LATITUDE_TAG,
LONGITUDE_TAG, POSTAL_CODE_TAG }, new int[] { R.id.countryname,
R.id.lat, R.id.lng, R.id.postalcode });
setListAdapter(adapter);
}
else
// do any thing you want for error happened
}
|
React-router - Choose data to be inserted onto component depending on Link clicked
By : TheHangedMan
Date : March 29 2020, 07:55 AM
Hope that helps I'm building a Portfolio using React and have a "ProjectPage" which I will be using as a template individual projects. , Change the data depending on the route. You can use params like this: code :
<Route path="project/:projectId" component={ ProjectPage }></Route>
this.props.params.projectId
|
How can I display a different image according the link clicked inside a php file?
By : user1882128
Date : March 29 2020, 07:55 AM
it fixes the issue If i understood you correctly, you want the same "satellite" page to display a different image according to which "planet" file was clicked to reach it. What you can do is to use a "GET" method, for example in your planet1.php file the href will look like this : code :
href="satellite.php/?planet=1"
if ($_GET["planet"] == 1)
document.getElementById("yourDiv").classList.add("planet1");
|
Change div class name with onlick for 3 divs depending on which link div's link is clicked
By : Rishabh Agarwal
Date : March 29 2020, 07:55 AM
This might help you I have three divs each with a link inside, when a link is clicked I want the class name of all three divs to change, depending on which link is clicked. , Hey you can do that with the help of parameters like this code :
<div class="w-33" id="first-project">
<a class="learn-more" onclick="changeclass(1)">Learn More</a>
</div>
<div class="w-33" id="second-project">
<a class="learn-more" onclick="changeclass(2)">Learn More</a>
</div>
<div class="w-33" id="third-project">
<a class="learn-more" onclick="changeclass(3)">Learn More</a>
</div>
function changeclass(div_number) {
if(div_number==1)
{
document.getElementById("first-project").className="w-60 ml-100 mp-100 project";
document.getElementById("second-project").className="w-20 ml-100 mp-100 project";
document.getElementById("third-project").className="w-20 ml-100 mp-100 project";
}
if(div_number==2)
{
document.getElementById("second-project").className="w-60 ml-100 mp-100 project";
document.getElementById("first-project").className="w-20 ml-100 mp-100 project";
document.getElementById("third-project").className="w-20 ml-100 mp-100 project";
}
}
|