jquery

how to prevent duplicate item

i have a dropdownlist (asp.net control) and a listbox control and a Add button when the user select the item from dropdownlist and click on add button to add to the listbox. how can i prevent the user from adding duplciate items and alert saying its already in the listbox? UPDATE: in my particular scenario, i have a dropdwonlist and a...

First attempt at ajax, script not being seen?

I've been coding with php/CI for a bit now and am starting to get the hang of it, but I'm trying to make the leap to use jQuery + some ajax stuff and I can't seem to get it to work. It's like the the script isn't even being seen. What I'd like it to do is to call the java/test function when the user clicks the submit button. I'd like ...

PHP AJAX login, is this method secure?

I have just started PHP and mySQL and need to know if this is "safe". The login information is passed into the following PHP file through AJAX (jQuery). jQuery AJAX $("#login_form").submit(function(){ $.post("login.php",{user:$('#username').val(),pass:$('#password').val()} ,function(data) PHP ob_start(); mysql_connect("-", "-", ...

I am seeing jQueryXXX="YY" attributes added to some of my DOM elements

When I use the IE developer tools, some of the DOM elements have attributes added that are of the form jQueryXXXXXXXXX="YY" where XXXXX is a fairly long digit string and YY is a usually small integer value. I don't see these with the DOM inspector on Safari. Why and when are these added? Is the data useful to me in any way? ...

Custom Range/Variable Set with jQuery UI Slider

Hello, I wanted to see if I could make a custom data set to use with jQuery UI Slider. I'm working on a site that has dress sizes that come in the range of: [ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 16W, 18W, 20W ] The issue I'm having arises right after 18, when it jumps to "wide" sizes that are a bit unique. Before I added in the 16W, 1...

jQuery dragging (reordering) table rows between multiple tbodies

I'm great with CSS but I largely suck at jQuery. We all have our limitations... OK with that admission out of the way I'll begin. We have a "favourite products" table, which you can sectionalize into categories (eg, Booze, Sheep, Spoons). Each category is a . Each row (excluding the ) is a product. I want to enable a user to drag and d...

Table filtering with paging

Hi All Been working on a table that I want to apply filtering, which is fired from a select on change event. Which removes all of the rows that do not match the filtered value and then updates the paging. At present, I can get the paging to work and filtering to work independent of each other. Select Mark-up: <sele...

jQuery UI Dialog, How to change text once the dialog is opened.

I'd like to click a button in a dialog and change the text on the message area before running the function associated with the button or simply change the text as part of the function. ...

Making Magic Fairy Dust With JQuery

I have the following task: Add falling fairy dust (kind of like Tinker Bell) to a website logo. The falling fairy dust should be continuously animated/falling and fading out. The website logo is a png. I would like to absolutely position a div over the existing website logo image. That div would contain the animating fairy dust. I k...

If condition for redirection in jquery?

Edit... Someone suggested I do it differently... If I were to use .htaccess, would this work? Options +FollowSymlinks RewriteEngine on RewriteRule ^chapter http://mysite.com/chapter/1 I'm just using basic javascript here, but I wanted to find out if there's a way to add it to my jquery file so that the redirection will happen if th...

jQuery load content failing in all IE's

Hello! I'm a newb in ajax stuff, so this is my first project with jquery load(). I did this step-by-step instruction http://net.tutsplus.com/tutorials/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/ and it seems to be so easy. The result: works with Webkit and Gecko, but IE 7 + 8, what a surprise, they load no content. T...

Validate the uploaded file size with jQuery form validation remote method

Hello all, I would like to do a filesize validation as follows. Please see whether this proposal method makes sense or not. This part alone should work. 1> After the user selects a file, I check whether the file has suffix as png, gif etc. $("#myform").validate({ rules: { fieldForUpload: { required: true, accept: "png|gif...

how to submit the form in jquery to server side by escaping or bypassing the Validations that were set

how to submit the form in jquery to server side by escaping or bypassing the Validations that were set ...

How do I out put the JSON format for other website?

How do I out put the JSON format for other website? I wrote the code below. I've tried to retrieve the information from the JSON server but it didn't return anything back. JSON SERVER <%@ Page Language="C#" %> <%@ Import Namespace="System" %> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { /...

Really basic help w/ a php contact form

I feel like I must be missing something simple here... Nothing sends, nor do I receive the success message. <?php if(isset($_POST['submit'])) { $to = "[email protected]"; $subject = "Feedback Form"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $emai...

cant get color animation to work

Simple just trying to animate a p-tag #disclaimer to highlight the background color. Example in jQuery: $('#disclaimer').animate({'backgroundColor':'#ff9f5f'}, 2000); The html is a simple <p id="disclaimer"> disclaimer here </p> But when I try to open the page in IE here is the JS error: Webpage error details User Agent: Mozi...

Wrapping an Element using Pure JavaScript !!

Hello, I have a series of div tags on my page & I want to wrap them all into a container. <div class = "c" >blah blah </div> <div class = "c" >blah blah </div> <div class = "c" >blah blah </div> I want to wrap all the above tags into a container as follows <div class="container" > <div class = "c" >blah blah </div> <div cl...

How to embed HTML via JS embed code.

I need to give the user a snippet of js code that will insert some HTML code into the page. I'm wondering what the best method to do so is. Should I use document.write, should I just create all the HTML elements via DOM programmatically? Is it possible to use a js library? I can see conflicts occurring if the webpage the code is embed...

jQuery toggle CSS?

I want to toggle between CSS so when a user clicks the button (#user_button) it shows the menu (#user_options) and changes the CSS, and when the user clicks it again it goes back to normal. So far this is all I have: $('#user_button').click(function() { $('#user_options').toggle(); $("#user_button").css({ borderBottom...

appends the option on every run

I am using the code below. Problem is that every time I select the option it duplicates all the options and the list shows all the options again. Here is the code: if(x > 50){ var i, j; j = 0; for(i=0; i < x; i++){ if(i%50==0){ $('#startRecord').append( ...