Link that forwards a page with params jsp - html

I'm building a website for a school project. In a page i need a link to another page (profile.jsp) with params, because I need to do a query in that page. I've tried forward in JSP but it opens the page right away, I need to activate this with a link, or also with a button. Here I'm using windows.location but it doesn't allow me to give params as far as i now.
<div class="mask_container">
<h2><%out.println(title);%></h2>
<p onClick="JavaScript:window.location='profile.jsp';"><%out.println(autor);%></p>
<img src="img/like-white.png" class="social">
<img src="img/comment-white.png" class="social">
<img src="img/download-white.png" class="social">
</div>

how about passing your parameter values in query string as shown below, instead of <p> tag put below <a> tag to redirect to another page
<%out.println(autor);%>
You can get value of parameter on other page using request.getParameter("param") this will gives you parameter value.
May this will help you.

Related

CSS Image showing as a broken file

I am trying to add a logo to my webpage. I am using CSS and eclipse. The image shows as a broken image and I am not sure why. The image I am trying to use is in the folder specified :
Does it need to be added in CSS or can someone please help me to know where I am wrong. Thank you.
<body>
<div class="jumbotron">
<h2 style="text-align: center; color: white;"> New Plan </h2>
<a href="#">
<img src="resources/img/logo.png">
</a>
</div>
</body>
This wouldn't be a css issue if the browser is showing the broken link icon. That icon means the path to the file is incorrect or it can't retrieve it.
To confirm this, take resources/img/logo.png and add it to the end of the URL where your HTML is, excluding any files. For instance, if your URL is http://example.com/index.php, you want to make the URL read as http://example.com/resources/img/logo.png, without the index.php.
You will need to tweak this URL until the image shows up in the browser, since you didn't provide a URL where the HTML is running. When that happens, the URL in the address bar is the one you can use for the image URL.

HTML <form> with multiple <a>

thanks in advance for your help.
I have some code that has an <a href>xxxxx</a> inside of a larger block of code which consists of divs inside of an <a>xxxxx</a> block, like this:
<a href=...>
<div>
xxxxxxx
</div>
<div>
<a href=...>xxxxxx</a>
</div>
<div>
xxxxx
</div>
</a>
note: in this case both <a> actually use the same href URL, the reason there are two <a> is that the first <a> already existed prior to surrounding the larger page area with <a href="..."> functionality
the problem is that i now need to use a <form> with hidden values and i am unclear as to where and how to place the <form> so that the user clicks definitely pass the hidden form parameters to the url
thanks again.....
First, using a link inside a link (a tags) makes no sense and is a no-go. Erase the inner link - wherever you click inside the outer link, the link will work anyway - no need for an inner link if it has the same target.
Second, if you mean to transmit parameters ("hidden form values") when you click that link, I wouldn't use a form, but append these values to the linked URL (like http://example.com/page1.php?par1=abc&par2=xyz, so that they can be received as GET parameters by the target page.

Edit code of page on Wordpress

I want to edit the HTML code of my Wordpress page. Exactly, I want to create a page, not posts, in my Wordpress page, where I want expose my CV and insert my photo which will changes when I pass the mouse above of it.
I tried to search something about this and i found this. In this reference, the writer speaks about the code modification, but isn't my particular case.
When I try to edit the code in the Wordpress page, I can't use some codes. For example: <a>, <div> ...
I want to use something like this:
<div class="authorimage">
<a href="https://www.codesyntax.com/eu/bloga/author/lfernandez">
<img class="mainimage" src="https://www.codesyntax.com/lfernandez.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
<img class="hoverimage" src="https://www.codesyntax.com/lfernandezhover.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
</a>
</div>
But in the published page the following appears:
<img class="mainimage" src="https://www.codesyntax.com/lfernandez.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
<img class="hoverimage" src="https://www.codesyntax.com/lfernandezhover.jpg" alt="Luistxo Fernandez" title="Luistxo Fernandez">
I need use this code for my purpose. what can i do to fix this problem?
Thanks for all.
Please refer below link, this should work,
http://www.inmotionhosting.com/support/edu/wordpress/wordpress-introduction/adding-html-wordpress
Log into your WordPress dashboard and create a new page. On that new page you can insert your CV and photo and then publish it.
Use the "text" mode in the text editor (instead of "visual mode") when you use the text editor to create a new page. There you can write HTML code.
Or, in "visual mode", just use select the part of the text on which you want to put the link and clock on the link symbol (the chain icon) above the text editor.

simple html anchor tag is not redirecting on click

It just HTML part of my PHP code which gives listing of products. I want the product image to be clickable which redirect to product detail page, but it seems that anchor tag is not working.
Here is my code:
<div class="container">
<div class="row">
<a href="/ProductUrl" class="grid-item"> //This code is basically under a loop which results in 6 products
<img src="/img1.jpg" alt="gem">
</a>
</div>
</div>
Right click the html document, view its page source, click the link of the href, check if its there. It might be in the wrong url.
#TheWell has given a good solution. Also you can give url like this,
<a href="../ProductUrl">

Composite C1 Razor function - link to external URL

I've got a Razor list-to-view function setup and i render a website url that a user inputs. My problem is that at the moment clicking the url causes the anchor to try and find that page within the website, when it's an external link.
How do i do this?
My code with the rendered URL:
<div id="PageDetails">
<h2> #artist.ArtistName </h2>
<p><strong>Website:</strong> #artist.ArtistWebsite</p>
<p><strong>Bio:</strong> #Html.C1().Body(artist.ArtistBio)</p>
#if (!string.IsNullOrEmpty(artist.Image))
{
<img src="#Html.C1().MediaUrl(artist.Image)" /><br />
}
</div>
The URL in the data type field should start with http://:
Use 'http://www.xyz.com' rather than 'www.xyz.com'