Javascript in either property binding or Query in Birt [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Can I include javascript in the property binding Query Text field of a BIRT report Data Set?
The reason why I want to do this is to select a query depending on a report parameter passed by the user.

Yes, for instance you can do this in this field:
var param=params["myParameter"].value;
if (param==1){
"select code,label from tableA";
}else{
"select code,label from tableB";
}
However this makes reports more difficult to maintain. Most of the time it is a better practice to modify an existing queryText from "beforeOpen" method of the dataset, by replacing keywords such explained in this topic

Related

Is it safe to store product id in HTML? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
Usually I use attributes to store the product ID, I fill these attributes using JavaScript when I create product blocks, I get information about products from an ajax request to PHP.
In order to use the product in the future, for example, add it to the cart or to the list of paid products, I need its ID. Therein lies my question.
Is it safe to store the id as an html attribute or is there another way to store it to make it safer?

Is writing HTML values the same as writing Javascript into HTML? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
For my project I am not allowed to write any JavaScript into my HTML according to my teacher. That would mean that I am not allowed to write features like onClick in my HTML. I want to check a answer with the if statement by giving my buttons value's, but isn't that also seen as writing JavaScript into HTML?
I know the best thing to do would be contact my mentor, but I want to know your answer/opinion on this.
you can use JS function to get elements from the HTML such as document.getElementById or document.querySelector and bind them an event listener.
you can read more about on MDN

How to get correct search terms from the user [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to get correct search terms from the user even if the user gives incorrect spelling of the product and display products according to that. How can I do that and should I use AI for that?
You can make use of Bing spell check API.
Whenever someone types in the input field and event should be triggered which sends the request to the Bing API.
You can refer the documentation here

Sort Meteor Collection First By Specific Value [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am building an application where I want to filter a returned collection based on a specific name, where the current Meteor.user().username always shows first in the returned list. I want to do something like this:
Lists.find({}, {sort : {user: Meteor.user().username}});
From input from #BatScream, I ended up doing two different querys. One where I looked for the specific username and a second where I looked for all others besides the user name. After I just combined the two querys.
Lists.find({user: Meteor.user().username});
&&
Lists.find({user: {$ne : Meteor.user().username});

How to use HTML5 Datalist with MySQL [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
HTML5 introduces new tag datalist, which connected to <input list="datalistID"> provides autocomplete functionality.
Question is - what is the best way to connect this datalist suggestion to MySQL table with high amount of rows (let's say 50K).
The best way to connect it is via the data attribute or the <datalist> tag which takes any URI or IRI to get the data as XML.
You can then change the URI/IRI based on the input value. And also you should limit your resultset to a useful maximum number of lines, you don't want to transfer megabytes just for auto-complete.

Categories

Resources