I have in my javascript these 2 functions "classes":
// product class
function Product() {
this.id;
this.qty;
this.size;
this.option;
}
// room class
function Room() {
this.id;
this.type;
this.products = [];
}
I have my js logic which fills rooms and their products.
Now i want to send array of rooms to a webservice to do some...
Hey there, I would like to load an html page into a div using
$(document).ready(function() {
$("#popupContent").load("aeffect.html");
//Close property
$("a.close").click(function(){
$("#popupContainer").empty();
});
});
My html from the calling page is:
<div id="popupContent"></div>
What I would like to do, is when ae...
Hey all,
I'm working with the jQuery ColorPicker widget - specifically exercising the ColorPickerSetColor function (just 'setColor' internally). Code excerpt:
setColor: function(col) {
if (typeof col == 'string') {
col = HexToHSB(col);
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
col = R...
I'm trying to use the simple modal jquery library on a page and the modal popup is being hidden behind an embedded youtube object on my page. I tried messing around with z-index, but couldn't figure this out. Any suggestions?
...
Is there a way to detect if the "display" css property of an element is changed (to whether none or block or inline-block...)? if not, any plugin? Thanks
...
First let me tell you what I want to achieve. I want a layout as below(Replace the squares with circles):
|------------|
| |-------| |
| | button| |
| |-------| |
|------------|
It is a button inside a circle image. The button should also be circular in shape. How do I go about doing it? As in, is there a way to overlay one circula...
I had a requirement where I need to clear off the "select all" checkbox in case user manually deselects any of the data rows.
This has been accomplished by detecting this during an onRowSelect (jqgrid event) event.
The code snippet is as below and works as expected.
onSelectRow: function(){$("input:checkbox[id='cb_jqg']").removeAttr('ch...
I have a page where I am loading bunch of images initially when the page loads. These images are tied to the lightbox plugin and when i click on the images..the plugin does do what it is supposed to. However, I have some ajax added via jquery (triggered by a drop down box) which updates the list of images based on what it gets from the...
<form id="myForm" runat="server">
username
<asp:TextBox ID="txtuser" runat="server">
</asp:TextBox>
Password
<asp:TextBox ID="txtpass" TextMode="Password" runat="server">
</asp:TextBox>
<asp:Button ID="btnsubmit" Text="submit" runat="server" OnClientClick="Val()" />
</form>
this is my source code anyone validate it
or if anyone have a...
I have some html
<input type="text" name="name" value="" id="name">
<div id="preview"></div>
The rules for entry into the field:
Letters A-Z a-z 0-9 space and dash, no other characters allowed
Entry of forbidden characters should do nothing
The rules for the div:
Show each characters as it is entered into the input field
Do not ...
The following script works fine:
$("#regform").validate().showErrors({"username":"message"});
After I changed the script to the below one, it doesn't work.
var name = "username";
$("#regform").validate().showErrors({name:"message"});
I need to pass the field name by a variable. Anyone knows how this problem can be solved?
...
When the user clicks a button, I want his browser to automatically scroll to an <a> with a certain href (let's call it "abc"). Ideally the scrolling would be nicely animated in some way.
...
Hi ,
i am having a ajax post like
var ht = $.ajax({
type: "GET",
url: "http://localhost/FormBuilder/index.php/forms/viewChoices/"+attribute_id,
async: false
}).responseText;
var myObject = eval('(' + ht + ')');
var data = myObject;var j=0;
alert(data.choices);//alerts the choices as object
$(""+<?php e...
setTimeout(target.mousedown, 200) doesn't seem to work. I can do setTimeout("target.mousedown()", 200), but this feels dirty.
What's the right way to do this?
...
Hi,
I am using jquery datepicker, please see below code
$(document).ready(function()
{
$(".txtDate").datepicker({
showOn: 'button',
buttonImage: '../images1/calendar.gif',
buttonImageOnly: true,
dateFormat: 'dd/mm/yy',
showOtherMonths: true,
showStatus: true,
onSelect:function(){}
});...
I have a div called #output, styled with overflow: scroll;. Using jQuery.ajax, it's being updated every x second. I'd like to have it so that when the scrollbar appears (after the divs filled up), it should continously stay at the bottom of the div instead of the top, like most chat clients do.
I'm sure there's a way to do this, I just ...
Hello,
At this time, I'm doing this :
var dateSelected = $("#datepicker").datepicker("getDate");
alert(dateSelected.getDate());
alert(dateSelected.getMonth());
alert(dateSelected.getFullYear());
dateSelected value look this : Fri Sep 11 2009 00:00:00 GMT+0200 (Romance Daylight Time)
2 Options :
a) Is it possible to use this in .NET...
I've got a floated list of elements which I want the same height on. But there is more than one list per page, and they all use the same class-name.
How to I reset the tallest variable for each list so they don't all inherit the height from the tallest list-item on the page, but only from within it's own list?
Here's my HTML:
<ul cla...
Just to tell the user that your request is being processed.
EDIT:
I've find myself an image.
How to show it in the center of whole page?
...
Like below,I need to send "name" and "psw" value to server side,
and get the response as right or wrong.
<table cellpadding="0" border="0" width="100%">
<tr align="center">
<td align="right">name/email:</td>
<td><input type="text" id="name" /></td>
</tr>
<tr align="center">
<td align="right" valign="top">pass...