invalid location of tag a, jsp page in eclipse - eclipse

I got 'invalid location of tag (a)' message, when I am working on my JSP page.
<a href="abc.html">abc</abc> this tag is not working properly.
<form class="form-inline my-2 my-lg-0">
<c:choose>
<c:when test="${sessionScope.SIGNIN_ID == null}">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">
signin
</button>
</c:when>
...(I erased unnecessary part)
</form>
</nav>
</header>
a tag is located under body > header> nav > form > button > a.
I tried to add <div> after <form> and add <tr>``<td> before <form> but it still doesn't work.
I also have jstl file in my \lib. Is there anyone who can help?

You can't have an a tag inside a button tag, in HTML. What are you trying to achieve, with the href (signinForm.html) inside the button?

Related

TYPO3 8.7 - how to hide elements in navigation header before login with EXT:felogin?

I can't find a solution for a problem I have with a TYPO3 Fluid template.
In the navigation header template I have a search form and a logout link.
<div class="suche">
<f:form action="search" method="post" controller="Search" extensionName="indexedsearch" pageUid="61" pluginName="Pi2">
<f:form.textfield name="search[sword]" value="{sword}" class="quicksearch-sword" placeholder="search" />
<button type="submit" name="search[submitButton]" class="btn">
<i class="glyphicon glyphicon-search"></i>
</button>
</f:form>
<p>
<div class="logout">
<f:link.page pageUid="1" additionalParams="{logintype:'logout'}">Logout</f:link.page>
</div>
</p>
</div>
How can I tell the page, that these two elements should also hide till the user is logged in with EXT:felogin?
The template is included into the default page template in this way:
<f:render partial="Navigation/Main" arguments="{_all}" />
I guess a simple display:none/show from the two divs would be enough, but I have no idea how to do this. (I must admit I'm not the biggest expert in TypoScript).
Any advice would be really helpful and appreciated.
You can use the <f:security.ifAuthenticated> view helper.
More you can see here:
https://docs.typo3.org/other/typo3/view-helper-reference/8.7/en-us/typo3/fluid/TYPO3_8-7/Security/IfAuthenticated.html
Example:
<f:security.ifAuthenticated>
<f:then>
shown when a user logged in
</f:then>
<f:else>
shown when a user is not logged in
</f:else>
</f:security.ifAuthenticated>

Why is there a form in a Wicket modal window?

When I look at the HTML of a Wicket modal window, I see a form. Why is it there?
ModalWindow's JavaScript generates a <form> to support the following use-case:
+ Page
+ Form("f")
+ TextField("a")
+ ModalWindow("m")
+ Form("f2")
+ TextField("b")
When rendered in the browser, the nested form "f2" is rendered as a <div> - this is something Wicket does for you because nested forms are not valid HTML.
When opened, ModalWindow removes its containing markup and puts it into a <div> added to the document body:
<form wicket:id="f">
<input wicket:id="a" />
<div wicket:id="m">
<!-- markup removed -->
</div>
</form>
<div>
<form> <!-- generated form -->
<div wicket:id="f2">
<input wicket:id="b" />
</div>
</form>
</div>
Without the generated form the inputs inside the modal window could not be submitted via Ajax.
Note that this has a naughty implication:
Even when you just want to use a form inside the modal window, you still have to have a form wrapping the modal window.
Without it:
+ Page
# wrong - no wrapping form
+ ModalWindow("m")
+ Form("f2")
+ TextField("b")
... "f2" would stay a <form> and the result would invalid HTML with two nested forms:
<div wicket:id="m">
<!-- markup removed -->
</div>
<div>
<form> <!-- generated form -->
<form wicket:id="f2">
<input wicket:id="b" />
</form>
</form>
</div>

How to trigger a GTM Tag with a div class

I want to trigger a Google Tag Manager tag with the text within a div class. The text is "Accommodation offer successfully edited". I've tried element ids and classes to no success. Do you have any recommendation? Is this even possible?
There is nothing else on the page that makes it unique so I really have to go with what is inside this div
<div class="alert alert-success">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="fa fa-times"></i>
</button>
<i class="fa fa-check"></i>
Accommodation offer successfully edited
</div>

jssor slider add external link to the thumbnail

I am using the jssor templete for my slider and I have modified the setting so that I can have a slider image change when the mouse hover on the thumbnail. But I do not know how to add an external link to the thumbnail image so that I can go to the another page associated with that picture
I have try the following method from http://quabr.com/28478806/jssor-external-links-on-thumbnails but it is not worked
<div>
<img u="image" src="../img/photography/002.jpg" />
<div u="thumb">
<img class="i" src="../img/photography/thumb-002.jpg"/>
</div>
<div u="caption" t="L">My Title</div>
</div>
</div>
Thank you for your help!
I guess it worked already.
But there is an extra enclosing '<div>' in following code,
<div>
<img u="image" src="../img/photography/002.jpg" />
<div u="thumb">
<img class="i" src="../img/photography/thumb-002.jpg"/>
</div>
<div u="caption" t="L">My Title</div>
</div>
</div>
Please remove it by replacing
<div u="caption" t="L">My Title</div>
</div>
with
<div u="caption" t="L">My Title</div>
Also, please set 'height: 100%' for 'a' element to make the clickable area bigger.
<a href="http://mylink.com" target="_blank" style="height: 100%;">
And finally, please check out the thumbnail navigator skin html code, because it is fully customizable, and it can be very complicated. Please make sure your link element is not covered by any other element.

How do I click on a button in Selenium IDE using only the text associated with the button and not its position?

this is the dom source of the button I want to click on
<div class="footer clearFloat">
<div class="left">
</div>
<div class="right">
[P]
[-575063738]
[SB_XML]
<input class="button" value="Next step" id="dpTransportResultSelectLink[7]" type="submit">
</div>
</div>"
This is the x-path "/html/body[#id='transport-results']/div[#id='master']/div[#id='master_center']/div[#id='page_content']/div[#id='contentPad']/form[#id='fare_5']/div[2]/div[2]"
How do I frame my locator using "[SB_XML]", irrespective of the form Id?
//*[contains(text(),'[SB_XML]')]/following-sibling::input[1]
I've tested it as an xpath but not in Selenium
lemme know how it goes