Hi there.
I need to set a Bean value with one javascript return value.
Something like:
<script type="text/javascript">
function getUserId(){
return 4;
}
</script>
<h:inputText name="lala" value="getUserId()"/>
Thanks
...
<html>
<head></head>
<body>
<script type = "text/javascript">
var x = 5;
var y = 8;
if (x < 6)
{
document.write("They are equal");
}
else
{
document.write{"They are NOT equal");
}
</script>
</body>
</html>
...
What would that code look like?
...
So say my page has a list of indexes '1,3,4,5,9,12' and a multi-select listbox with 12 items in it.
What's a fast way to use javascript to tell the listbox to multi-select all items at those indexes?
How would this be done using jQuery?
So for example if the user selects the 'caramel' preset associated with the 'candybar' listbox, it ...
i'm developing a web application that focus heavily on ajax. the whole application is just on one page except for the threads that are in traditional pages so they can be indexed.
so i have to have very structured JS-codes and i wonder if they are any frameworks out there that are for ajax-based applications.
eg. codeigniter, cakephp a...
I'm starting to get my head around node.js, and I'm trying to figure out how I would do normal MVC stuff. For example, here's a Django view that pulls two sets of records from the database, and sends them to be rendered in a template.
def view(request):
things1 = ThingsOne.objects.all()
things2 = ThingsTwo.objects.all()
ren...
I'm looking for a way to fill a <ul> list up to 10 item. If the list doesn't have 10 in the HTML, I want the items to repeat themselves.
For example:
<ul id="carousel">
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
</ul>
I tried to do it myself, but it's not exactl...
Can anyone shed any light as to why my JSON is coming out below, with the extra backslashes. I am using ASP.net MVC to serialise a datatable, when I debug in Visual studio it all looks ok but when I look with firebug with adds the extra characters?
Any ideas anyone?
"[{\"uid\":\"516219026\",\"pic\":\"http://profile.ak.net/\",\"first_na...
I'm using WebControl from Windows Forms in C# and I'm trying to load a Web Ajax content (i suposed that the content is ajax) this is the code of the page retrieve from the explorer:
<ul id="building">
<li id="button1" class="on">
<div class="supply1">
<div class="buildingimg">
<a class="fastBuild tips" title="|Expandir...
it was always a question for me that how can i use an array value in javascript while that array is defined in my php scripts
For example consider reading some values from a file and use it in javascript.
what's ur plan to do so ?
...
I'm wondering if anyone else has experienced the following issue.
On a single non-linked (to a master page) .aspx page, I'm performing simple JS validations:
function validateMaxTrans(sender, args) {
// requires at least one digit, numeric only characters
var error = true;
var regexp = new RegExp("^[0-9]{1,40...
Doesn't using Google CDN for jquery break the rule of not using cross domain requests on the webpage. Do we trust Google enough to do this?
...
I am interested in adding a stick feedback tab to be hosted on my page. No third party ones like uservoice, monyta, getsatifaction.. etc.
It should be sticky while scrolling vertically and the tab should slide out showing a form to be filled out and submitted, very much like monyta.
Any JQuery plugins (or plain Javascript) which do thi...
If I have a form that is the main part of a page's content, will assigning focus to the first form field via JavaScript on page load have any negative effects on accessibility?
...
What about support for major browser? IE 6+. FF 2+, Opera 9+, Safari 3+, Google Chrome?
It is good idea to use actionscript to generate graphics (interface developed in JS and standard HTML forms)? Maybe its better to use canvas? What about performance?
...
I have been running into intermittent errors with some java selenium-rc tests which I think are related to a page which has an ajax poll and automatically refreshes when some condition is reached on the server. In this scenario, I have no way of asking selenium to wait for the page to load, and so I run into a bunch of random "Couldn't a...
If I dynamically generate the img tags they don't show up when they should, but if I hard code the values in there the images show up. Anyone know why this is?
According to my jQuery there should be 2 image tags inserted after each input with the class .inputBox
HTML:
<form action="" method="post" id="myform">
<label for="FirstName...
I have a javascript photo-organizer built on the YUI JS libs which can organize photos from many sites via REST api. I want to know if I can resuse any of this code to organize photos on the local filesystem.
I need a cross-browser (i.e. PC/Mac) solution to the following (in order of increasing privilege):
persistent file access to...
i have a site where i am using an accordion menu plugin and hoverIntent. this is the code for the accordion:
(function($) {
$.fn.hoverAccordionMenu=function(options){
var hoverIntentConfig = {
sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)
interval: 100, // number =...
I would like a web interface for a user to describe a one-dimensional real-valued function. I'm imagining the user being presented with a blank pair of axes and they can click anywhere to create points that are thick and draggable. Double-clicking a point, let's say, makes it disappear. The actual function should be shown in real time...