I am new to Velocity. I have a requirement as follows.
I have a dropdown in jsp page with the following values.
1 Normal
2 Reverse
If I select 1, then the properties for Normal Auction should be displayed on the same page
If I select 2, then the properties for Reverse Auction should be displayed on the same page
Can anyone guide me how to use velocity macros to achive the same?
A small piece of sample code can really help.
Thanks
Velocity macros cannot be called from a webpage, which is what I believe you want to do. You could achieve what you are asking by reloading the page and therefore rendering the Velocity template but I'm not sure if that's what you want.
Basically it doesn't seem that velocity is the right solution for you and as serg and Nathan have said, using Javascript to manipulate CSS or DOM will probably be the best solution. Check out DHTML on w3schools to learn how to do this http://www.w3schools.com/dhtml/
Related
I'm using the Angular UI Bootstrap typeahead to display a customized list of suggestions as the user types into a text input form control. This form control exists inside a div using jQuery slimScroll in order to maintain a constant div size despite the size of its contents fluctuating. I really hoped the typeahead would display over everything like a regular html select dropdown, but unfortunately it does not, as can be seen in this plunker. I've tried futzing around with the z-index and adjusting the position and display properties; all fruitless endeavors.
Does anybody know how to get the typeahead popup to display over its parent border? If not, is there a way I could coerce the select tag to display HTML content so I can include glyphicons, emphasized text, etc. in the list of suggestions?
The problem is with the slim scroll - you are inside a div with relative position and overflow hidden (think of it as an iFrame). There is a small workaround...
You could, essentially set the position of the generated UL (.dropdown-menu) to fixed, set a height for it, then set an overflow:scroll...
It would work in some scenarios where the input field has a fixed position... otherwise you'd need to control where the input is and adjust the position of the auto-complete to follow, and a whole other bunch of nasty scripts.
Without looking at your application, I cannot understand why your have this particular architecture, but I can say that there must be cleaner options for handling autocomplete outside of slimscroll.
I just set typeahead-append-to-body="true" on the typeahead control and it worked. Not sure exactly why, but it's certainly a simple solution.
I am looking to create a slider within wordpress that is a little out of the norm and was wondering if anyone could give me advice on how to go about it.
I'd like a slider for a meet the team page on our website.
I am hoping the slider could work as normal but have filters on the left for departments and thumbnails below and outwith the slider with each employee on there.
I would like these thumbnails to be clickable and for the matching slide to appear when the thumbnail is clicked.
Can anyone suggest a plugin or a method to create this kind of thing?
Thanks in advance for your help.
Well i think you are referring to isotope jquery plugin. It filters down items based on the selected tag. Its actually free but you will have to create modify it for your needs. If you are using bootstrap you can get the idea of implimentation from here.
http://theme.stepofweb.com/Atropos/v1.5/HTML/page-team.html
Here is a paid wordpress plugin that can do that for you.
http://codecanyon.net/item/meet-the-team-wordpress-plugin/full_screen_preview/4983412
I'm confused by the showcase example of Cell List. Shown below is a screenshot, when I inspect the element I can see a png image is used to give a blue background for the selected cell. I cannot find any reference to such an image or css file from its source code here or from google-code. I couldn't find any injection of css or things like that as mentioned in related sof answers. Please show me where the code is or some other example code. I'd like to know how this exact scenario works, not an alternate solution to get the effect. I'm pretty new to gwt, I'm sure this is a piece of cake for the veterans out here,any clues?
It's the default styling for the CellList. You can use your own by passing a CellList.Resources to the CellList constructor.
Ok im struggling to find anything on this as im probably searching the wrong keywords.
I have a backed form thats use to display content on a page. When entering the details i want to be able to use a basic text editor to style the text, like bold, bullets, underline.
On top of that i would also like to allow them to wrap section in paragraph tabs, apply a certain style i.e style id="x".
Its more for backend so it doesnt have to be really user friendly but if there was an uncomplicated way of showing the styles in the form as i apply them, basically a WYSIWYG view. If not i will settle for applying the styles without having to see all the hmtl and css tags in the editor but when the information is passed via the INSERT query it will show pass all the relevant code like My Style and so on.
Now im quite happy to spend the time learning how to do this if you point me in the right direction but i have no idea what keywords to search. Ideally if there is a script out there i can just edit to my needs would be great too rather than starting from scratch.
Finally since im learning php and mysql still keeping it dumbed down will help and also since my values im passing is going to be full of characters the code wont like what functions should i look up to pass the code and content into the database to avoid breaking the code
I'm not entirely sure what you mean, but it seems you can achieve what you want using an editor like for example TinyMCE in combination with JQuery?
With JQuery you can show/hide items and ander your css like
$("p").mouseover(function () {
$(this).css("color","red");
});
I've done the prerequisite searching of stackoverflow and looking on the internet. I suspect that the answer is ' This can't be done. ' but I'm hoping someone here might have a solution.
My page loads fine, but many of my YUI components don't fully load before being displayed. For example, my DataTable will resize itself when displaying or my buttons will appear in their native form and then get YUI-fied.
Is there a way to delay the displaying of the page until all the Javascript is finished (i.e. all my YUI components are finished rendering)? I don't know how this would happen, as a lot of the JS depends on the DOM being present to manipulate it.
Is there a way to delay the displaying
of the page
If I understand correctly you would like to hide it until it's done?
If that's the case I have an idea:
add a wrapper around the element you
want to hide (or use
position:absolute to cover it)
give that div a background which use
the color of the surrounding with a
positive z-index
when all your javascript has loaded remove the
z-index or change the color of the background to transparent
Your javascript code would look like this:
do 1. and 2.
load your js
do 3.
Of course it needs to be synchrone.
As an alternative you could use visibility:hidden / visible on the element itself but I dunno for sure if it's well supported.
Try putting your Javascript in the head section of the page, as if it's near the end of the page, it'll load later (making the first elements load faster). OR, better yet, serve up your Javascript compressed and via a CDN, such as Amazon CloudFront so that it loads quickly.