Using a query string to populate a radio button and show/hide a div
Hi All, Here's my HTML populated jsFiddle: http://jsfiddle.net/FelixFortis/VQYab/ I'd like to use a query string to populate the radio buttons named "attend" and then show/hide the div #venue_choice based on the result. So if attend = "attend_yes" then the first radio button is selected and the div #venue_choice is shown when the page is visited. Other attend options include "attend_no" and "attend_ppt". Thanks very much!
Validating fields
<html> <script> function save(){ } </script> <form name="myform" action="http://www.mydomain.com/myformhandler.cgi" method="POST"> <div align="center"><br> <input type="radio" name="group1" value="Milk"> Milk<br> <input type="radio" name="group1" value="Butter" > Butter<br> <input type="radio" name="group1" value="Cheese"> Cheese <hr> <input type="radio" name="group2" value="Water"> Water<br> <input type="radio" name="group2" value="Beer"> Beer<br> <input type="radio" name="group2" value="Wine">
firebug/netbeans missing ;
Both netbeans and firebug say I am missing ; before the function x10 line but I can't see where. Hoping someone can see where I am missing it. <Script type="text/javascript" src="jquery/jquery-1.7.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ var intervalId = setInterval(X10Check, 5000); $("button.toggleStatus").click(function(){ //This Ajax toggles device on and off $x10Device = $(this).data("x10"); $.ajax({ type:
Move overflow text only in other div
Hello Friends, I have one div with height auto and overflow hidden. I need to get only those content which hidden for overflow. Any solution to get this content which is hide because of overflow:hidden. Thanks Balraj
Javascript not working till refresh
i have javascript embeded on my jquery mobile page. the problem the javascript doesn't work unless you refresh the page. any solution on how to make this work once the page loads. here's my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.3.1 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> body,td,th
Should I create a function
I have a block of code that I would like to execute every 10 seconds or so and also on a buttons click event. Should I create a function to save on coding repetation ? I will have alot of buttons on the page that will fire this block of code, but realise I can use a class selector to trigger the code. I need the timer interval as 3rd parties will be able to change the values that the code is checking, I am not to concerned about the timer been super accurate. How would I change the code into
Show a <img> in full screen - No URL bar
Hi, I'm working in a project that the client wants to view an card in full screen, with no address bar. I've tried many things, but the result is nothing seems to this. Anyone have an idea? Thanks in advance. Gerson
Looping through set classes
I have 3 columns of divs that are inline and forms many lines: <div class="info0..."></div><div class="info1..."></div><div class="info2..."></div> ... repeat sim. line ... I am trying to target the first and last lines of each class and change their borders. var str1 = 'info'; for (i = 0; i < %id=infogroups%; i++) { console.log('Groups: ' + %id=infogroups%); // should always output the assigned value (3) var sel = str1 + i.toString(); console.log('SelName: ' + sel); // should output 3 variables
SSN Masking and Formatting
/* --------------------------------------------------------------------------------------------- * myPass v1.0 - jQuery password-hiding iPhone-Style * * Copyright (c) 2009 Oliver Storm, Stefan Huissel( http://www.mysrc.de ) * Feel free to redistribute the script/modify it, as * long as you leave my infos at the top. * * * Date Thu, 30 Jun 2009 * * Defaults: charReplace -> Unicode for the symbol that will be displayed * instead of the character. You can find a good overview here: * http://www.fileformat.info/format/w3c/entitytest.htm?sort=Unicode+Character
How to bind event to .data item
Hello, Is there a way to bind a click event to a .data item? Thank You
CSV or XML to save data?
Hello, I have a webapp that pulls data out of a MySQL DB. Now I want to make this app independet from a server so I want to save the data in a differente format and accesss it directly with Jquery. It is basiclly one table with 5 columns and about 200 lines. I think I could read this table in an array and work from there. My question now is: should I use CSV or XML to save this table? Which can be handeled better by jQuery? What are other advanteges of one or the other? Thanks a lot!
How and What prototype maked difference in javaScript classes?
Hi, I have written class "IC" in a javaScript file whose code is like this: IC = function () { this.var1 = null; this.var2 = null; this.name = 'acxs-334'; this.turn = 'forward'; } IC.prototype.getMonthsName = function (m) { return IC.MonthsName[m]; } IC.MonthsName = ["Jan", "Feb", "Mar", "Apr"]; Next I have written this code but I am getting this error while accessing MonthsName : 'MonthsName.0' is null or not an object function Person(gender) { debugger; var obj = new IC(); var month = obj.getMonthsName(2);
Automatic update of select menu after jquery input database
Hello, I'm having a little issue and i don't know how to let it work, i will explain! I have enough PHP knowledge, only my knowledge of jquery is a bit poor... I'm working on a website and i have started a backoffice thats adding menu items into a database, if i put a new menu item it wil open a jquery window and add the menu item in the database. So i think i need to do this in JSON It's also possible to add a sub menuitem to an existing menuitem, this is standing in the form in a <selection>, now
Observer Pattern using jQuery
I got asked a while back in a test to implement the Observer Pattern using Javascript / jQuery. I did not understand the Pattern at that point and its taken me a while to get something running. I have no theory background so I had never heard of the Pattern plus I had to understand the difference between Observer and Publish/Subscribe (still slightly confused tho). Does the code below seem to form a solid basis for the Observer Pattern? I tried to follow the idea of how Flash AS3 implements the pattern
Search by Date with JQuery
Hello to All! I have XML file. In this file have a date when user's was registered. http://d.pr/i/Wpw2 I can filter the registered users by date ? using JQuery Like: week, month, year, ...
Trouble getting content in tag.
Hi, I am having trouble getting some text from an element in an xml file. I need to get the value inside name and as there is multiple names the only thing thats different with this one is the key tag. How do I go about getting the name? Thanks in advance. <attributes> <key>creator</key>//This is the only difference <value xsi:type="someTextinHere"> <itemId>someID</itemId> <userId>UserID</userId> <name>NameINeed</name>//This is the name I need <emailAddress>Email</emailAddress> //my jQuery is below
Jquery portlet plugin for struts2
Hi All, We are having the jquery portlet application(with static data) now we want to integrate with struts2, I want to know is there any jquery portlet plugin for struts2. thanks R.Ramesh
How to make multiple sets of ui tabs work with jquery 1.6.4?
I made a website using a nice template when jquery 1.6.4 was new. Now I've added two sets of ui tabs using the code below that I found on jquerys site. It works like a charm on all pc's and on all Apple products. My problem though is that the jquery 1.9 version makes my site crash on android tablet and smartphones = it completely ends the whole internet session. Since my site worked before I added the 1.9 version, I'd like to adjust the code below to "communicate" with jquery 1.6.4 instead, but I
how to validate textbox having html editor??
how to validate textbox having html editor?? i am using ckeditor :http://ckeditor.com/download in my text box to add html editor features?? but on submit i want to check whether the textbox is empty or not?? if text box is empty do not submit to database??? $(document).ready(function () { $("[id*=lblUploadError]").hide(); // On Click value entered in textboxes,Works when Add is clicked $("#ctl00_InnerContent_Update").click(function () { alert("xx");
we want to add expand and collaps dymanic
Hi all, we used div append var $Session = $('#sessionData'); $Session.append("<h2 class='expand_heading'><a href='#'>test</a></h2><div class='toggle_container'><div class='box'><h3>Need Shopping website?</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</p> </div></div>"); }); css call but funcality not work thnks Arvind
On click select and remember which is selected
I have a display with around 100 thumbnail images. Each has an anchor tag around it that does not target any place. It's just a container for the thumbnail and a rollover span that triggers when move your mouse over the thumbnail. . This works. The structure of each thumbnail looks like this. <a class="thumbnail thumbLeft" href="#"> <img id="avatar" width="30" height="30" border="0" name="Avatar Image" alt="AvatarImage" src="/images/AVATARS/10_30x30_BLUE.gif"> <span style="width: 150px"><img
If i am selecting date using Datepicker, radio button is still selected.
hi sir, I have just stucked it here i need your help to solve this problem. Scenerio- i have a datepicker textbox ,below that a radio button is there. I have to select either one of them. Suppose if i entered date using datepicker then radio button should be unselected of if i have selected the radio button first then date entered in textbox should be cleared. This is the code which i have written. <script type="text/javascript"> $(document).ready(function () { $('.datepicker').datepicker('destroy');
complex variables (SOLVED)
Aloha, I am trying to use jQuery and Greasemonkey to make client side changes to a site but am having problems with getting my variables setup right.. Here is a page I am trying to make changes to... Fanfiction Story Here is the part I am working with...you can find it near the top of the page. Rated: Fiction T - English - Adventure/Angst - Harry P. - Chapters: 7 - Words: 43,822 - Reviews: 74 - Favs: 129 - Follows: 48 - Updated: 07-20-07 - Published: 05-06-07 - Status: Complete - id: 3525286 Here
Forms not working with updated jQuery
I'm working with a client who uses a sort of clunky CMS system. The jQuery the CMS uses is a very old version, and I had to update it to a newer version to get certain plugins working. However now the forms aren't working. When you press submit nothing happens. I'm no programmer, but I try to work things out. I noticed the form tag had an onsubmit="return false;" tag. This worked with the old version of jquery, but not the new one. When I get rid of that, it insists there is no e-mail entered in
Datatables constant height
I have 21 records in my datatables and page size equals to 10. When I turn to last page, entire table shrinks vertically and paging controls go up, since there is only one record on the page. How to make my table contant height? I tried with: <table id="aaa" style="height:400px;"> but my table gets streched and looks disguisting. Thank you for help in advance
When reusing a dialog, how do you go about clearing the contents before it is called again?
Hello, This has probably been asked before, but I'm not having much luck finding an example of how to go about the following scenario. I have around a page that has hundreds of possible inputs that all reuse the dialog, but with different contents provided via AJAX. When you call the dialog and it gets populated, the contents are still there when you call it again until they are overwritten via the AJAX call. I was hoping that I could call something like .clear() that would clear the contents of
Firefox redirects on failed JSONP ajax call
Hi, Here is the JSONP that i am making to a cross domian .js file $.ajax({ url: HtmlPageObj.RemoteLoc + "/" + HtmlPageObj.CurrentPath, global: false, timeout: 2000, type: "GET", cache: false, dataType: "jsonp", jsonpCallback: 'EditorPage_PageContentsReceived', contentType: "application/json", success: function(objjson) { }, error: function(x, t, m) { if (t === "timeout") {
Remember status after reload of page
I have a script that has a button wich simply removes itself when clicked. But when I reload the page the button appears again. How can I add a "memory" so that the button is gone also after reloading? Here is the script jq2.html <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"> </script> </head> <body> <!--hiding the current HTML element--> <script> $(document).ready(function(){ $("#x").click(function(){ $(this).hide(); }); });
How to hide the x and y scrollbars in my folding out pictures?
On this homepage website, I have three big pictures, which fold out on a hover... so basically a big part of the image is hidden and at a mouse hover it get's visible.... Thing is... I get these ugly scrollbars in my images when they fold out... I tried to get rid of them, but so far without any succes... I'm a bit of a rooky on the field of building websites...so maybe this solution is very easy to solve... I hope... This is the html and css... <!DOCTYPE html> <html> <head> <title>Homepage</title>
Use of jQuery in comercial project
I am using [jquery-1.8.3.js / jquery-ui-1.9.1.custom.js/ jquery.jqGrid.src.js/ json2.js] in my commercial product. I am not going to modify anything from this file. I just need to use the api. Do I need to get any extra license for this? Or Need to inform about to jquery team? I am planing to give explanation about jquery which is under MIT license in my README.TXT file. Is their any need to explain it in README.TXT? if yes then please guide me what will be the content of README.TXT file. If no still
event click doesn't work on firefox and ie
Hello, novice in jquery, I currently use it for suppressing value by clicking on a button. The click will display a confirmation pop-up and then delete the value after. My code works fine in google chrome but not in firefox and ie. I think it comes from the click event code jquery but i can't resolve the problem. Here is my html code: <center> <button class="btn btn-mini btn-red dropdown-toggle" data-toggle="dropdown"> <i class="icon-remove" rel="<?php echo $array[$i]->getId()
Enter Key Event Bubbling Up from jQuery Modal Dialog
(Also posted this in "Getting Started" forum, but it looks to me as though this forum gets a lot more attention than the other one, so I'm posting it here, too.) I have searched for an answer to my question, thinking that it is a common problem -- but to no avail. Here's my problem: I have a page where I have attempted to convert one of my old javascript alert dialogs to a jquery dialog. The dialog comes up just fine. And if I click on the "Ok" button, the dialog closes as it should. However,
hello
<!doctype html> <html> <head> <meta charset=utf-8> <title>Q&A</title> </head> <body> <script id= blogTemplate type=tuts/template> <h2> {{title}} </h2> <img src={{thumbnail}} alt={{title}}> </script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script> ( function() { var content = [ { title: 'My awesome blog post', thumbnail: 'http://cdn.tutsplus.com/net.tutsplus.com/uploads/2013/06/david-walsh-preview.jpg', }, { title: 'My second awesome
what's the different between calling functions with () or without ()
hi , i have really big problem in understanding this . let say i have an object and my objects contain couple of functions var my_methods = { init:function(){ $(window).load(my_methods.create_element()); $(window).click(my_methods.window_clicking); }, create_element:function(){ //some code }, window_clicking:function(){ alert('hello world'); } } the both of the above functions calling w'll works
Delayed image display with fadeToggle()
Hi, this is my first post in this forum; I'm a total rookie on Jquery hence today's post: I'm trying to display several images contained in a HTML "table". I'd like these images to display on after another when the page is ready. I've tried several stuffs but can't get what I'm looking for. I've already tried to use ".each()" or a "for" loop but I'm stuck, could any good Samaritan help me out with it? Here's my latest try to get the idea: <script type="text/javascript"> $(document).ready(function(e){
Hiding OAuth secrets in jQuery
Hello, Below is some sample code from Yelp: <!-- This example is a proof of concept, for how to use the Yelp v2 API with javascript. You wouldn't actually want to expose your access token secret like this in a real application. --> <html> <head> <title>Yelp OAuth Example</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script type="text/javascript" src="http://oauth.googlecode.com/svn/code/javascript/oauth.js"></script> <script
Coding problem, JQuery has been suggested as an answer.
I use JQuery in all my sites, specifically with AJAX load functions and various plugins. Basically, my issue is with my Navigation bar. When i hover over a button, i'd like the 2 images either side to change as well as the image that the mouse is hovering over. Is this possible in Jquery? Thank you for any help in advance, greatly appreciated!
How to use jquery and why..?
I am very confuse to using jquery and My question is why we use jquery and what is the purpose. This is simpler to javascript, php, or c++ lauguage. If anyone know all about coding of jquery please share with me. I want to learn it
how to get the real height for google chrome and safari
hi , i want to get the real height of the document by using $(document).height(); unfortunately i cant get the real height . the returning value is 1163 but when i took a look at the metric of the body it was 1193 , i don't know why this is happening maybe it bcz i'm using -box-sizing property . but this problem is happening just for webkit , i mean googlechrome and safari mozilla , opera and ie get the real height with no problem . but googlechrome and safari do not .
position().top returns unexpected value if element has display: none
I'm trying to position a popup dynamically if the window is scrolled to the point where my default position wouldn't be appropriate. The div has an id style: #gallery { position: absolute; top: 90px; display: none; } I'm trying to compare $(window).scrollTop() with the current top value - if the current top is less than the scroll position, I change the top to the scroll top plus a small additional amount. The reason I'm trying to read the current top is so that I can have an arbitrary top
Next Page