开发者

want to create a popup in scala [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Cl开发者_如何学Cosed 10 years ago.

I want to create a popup on a click on link on my first page in Scala and my popup window contains one drop dwwn menu.

I am using "lift framework "and I want both Scala and HTML code for that to create that popup menu.


This question is just so wrong:

  • Web pages aren't written in Scala, they're written in HTML, JavaScript and CSS
  • HTML Pages can be generated from Scala, but you still have to say which web framework you're using to do that

The question that you're asking has absolutely nothing to do with Scala; the way you've tagged it is completely inappropriate. It's also vague and leaves out so much information that it's impossible to answer.

UPDATE

Really, it's not about Lift, or Scala. all the work will take place in JavaScript and HTML. If the menu is dynamic then you may have to generate the necessary HTML from within Lift, but it's still all about the HTML...

So assuming you have a default Lift application already in place:

  • Make sure you have the jQuery library on your page

This is best done by having the following line in the <head> block of src/main/webapp/templates-hidden/default.html (if not already present):

<script id="jquery" src="/classpath/jquery.js" type="text/javascript"></script>
  • Add a jQuery plugin that supports drop-down menus

Something like this: http://plugins.jquery.com/plugin-tags/popup-menu

This should also be imported as a script in either default.html or the page where you're using the menu.

  • Generate the menu

Follow the instructions on the Plugin's page for how to do this.

You can hard-code this in the HTML for your page if you want, or generate it from a snippet (in this case, it also makes sense to import the plugin through the head section of the snippet).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜