In the following code snippet I'm trying to set the setPrice argument dynamically.
XHTML:
<asp:DropDownList ID="CCType"
runat="server"
onchange="setPrice('<%# Eval("setPriceVal") %>')"
TabIndex="16">
</asp:DropDownList>
Code Behind:
Dim setPriceVal As Literal = CType(FindControl("setPriceVal"),Literal)
setPriceVal.Text = "0"
I get an error saying the server tag is not well formed.
Have I gone about this the wrong way or is there a syntax error I can't see?
I believe it's:
<asp:DropDownList ID="CCType"
runat="server"
onchange='<%# setPrice(Eval("setPriceVal"))%>'
TabIndex="16">
</asp:DropDownList>
You cannot add the server tags <%%> inside the tag of a runat=server tag unless it's in a Template control of some kind.
You can however, do what you want to do here by attaching an event handler from the code-behind.
Related
Am having a AEM6 html component, am getting the values from dialog and using it inside the component via the .js file and using the return properties.
I could able to get the authored values but it is getting null or empty when am using it inside the onclick method. Please find below the code snippet below.
<div data-sly-unwrap data-sly-use.test="test.js"></div>
<a href="#" class="${test.testId}" id="${test.testId}" onClick="toggleDraw('${test.testId}')" >
The content I authored is getting displayed in class and Id, but it is not displaying in the onClick method.
Below is the Output am getting after authoring.
<a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('')" >
Output I needed is :
<a href="#" class="get-a-quote" id="get-a-quote" onClick="toggleDraw('get-a-quote')" >
This should do the trick:
<a data-sly-test.variable123="toggleDraw('${test.testId}')" href="#" class="${test.testId}" id="${test.testId}" onclick="${variable123 # context='attribute'}" >
You need to put the function call in a variable because of the nested single quotes. And you need to manually set the context in this case. If "attribute" does some escaping you do not like, you could use "unsafe" - this will end in all escaping mechanisms being disabled. That might or might not be a security issue for your application.
HTH
I'm trying to add a button that will link to a different page made to edit/delete an entry. However, the URL in the action /videos/{the id of the video}/edit
Usually I would just put it in curly braces or use a template literal, but these don't seem to be working. When I try using double curly braces /videos/{{the id of the video}}/edit I get an error saying Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead.
I'm trying to pass props for the id of the video to then apply to the URL, but I'm not sure how to go about that.
I've tried template literals, but it gives me a syntax error when I try using those in action="..." so I tried doing what it tells me to do and use binding :id="this.$props.id" but I'm not sure how to then add the id to the URL without still using interpolation.
<form method="get" :id="this.$props.id" action="/videolist/$id/edit">
<button type="submit">Edit</button>
</form>
props: ['id', 'name', 'description', 'category']
Thanks, I ended up solving it using a template literal. It just didn't work how I thought it did. This ended up working
<form method="get" :action="`/videolist/${this.$props.id}/edit`">
<button class="btn btn-success" type="submit">Edit</button>
</form>
So bascially with a f:link.action, calling an edit Action of another controller i get the error
Call to a member function setParent() on null
The code in my FormFields.html looks like this
<tr>
<td>
<f:link.action action="edit" controller="ExterneAktivitaet" arguments="{externeaktivitaet : externeaktivitaet}">
<f:translate key="tx_kundentermine_domain_model_termin.externeaktivitaet" />
</f:link.action>
{termin.externeaktivitaet}
</td>
<td>
</td>
</tr>
The edit Action just has a view->assign, so the error has to be somewhere else. The interesting thing is that i have other f:link.actions calling different but identical classes/controllers and these work just fine. Can this be some internal TYPO3 error? I don't have a "parent" property defined anywhere, so i don't understand the setter and why something i have not even in my code can be called. Also i've never seen this error before.
Try to use below typoscript in your setup.ts file. So, you can easily determine where is the error in your code.
config.contentObjectExceptionHandler = 0
Also set displayErrors => 1 in LocalConfiguration.php file.
Check, whether the arguments passed to the fluid render tags have all the arguments supplied. In my case the following code
<f:render partial="FormErrors" arguments="{object:object}" />
was throwing the same error. So the solution for me was to change it like this.
<f:render partial="FormErrors" arguments="{_all}" />
It might differ in your case. Hope this will get you to the right track.
<input type="submit" value= "OK" />
What I normally do is curl --data "button_name=OK" URL, but the button here has no name. How can I submit via cURL in this case?
CSS Selectors:
Without seeing more HTML you could try a CSS selector of input[value='OK'],
This says, element with input tag having attribute value with value of 'OK'.
CSS query:
VBA:
The CSS selector is applied via the .querySelector method of document.
.document.querySelector("input[value='OK']").Click
In the case that a button doesn't specify a name you will not need to send the button's value in the request, value just exists to provide the button's label in this instance.
I am not very familiar with curl, but give curl --data "" URL a try.
For something like this, without name
<div class="desc"></div>
<div align="center" class="buttons"><input type="submit"
value="Login" /></div>
In VBA, you can use say
dim i as integer
for i = 0 to 19
if webbrowser1.document.getElementsByTagName("input").item(i).getAttribute("type") = "submit" then
if webbrowser1.document.getElementsByTagName("input").item(i).getAttribute("value") = "Login" then
webbrowser1.document.getElementsByTagName("input").item(i).click
Exit For
end if
end if
next
Just Use 19 as an upper bound of the number of input element in the web page and increment it if needed. Once you found which one is it, you can use it straight away
Error decorator input errors such way:
<ul class="error">
<li>Error message</li>
</ul>
How can i remove this tags and leave only error message text?
I think a neat solution to the problem is to create your own custom decorator, and use it instead of the "Errors" decorator.
$errors = $zendForm->getErrorMessages();
I think this should work? Not 100% sure though I don't have time to check documentation.