jQuery - disable event - JavaScript Help


Is it possible to disable jQuery event by click link or something
for example

//some event $('div#somediv').hover( $('body').css("background","#b7d921"); ); $('body').click( );



Posted On: Friday 28th of December 2012 04:30:32 AM Total Views:  81
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




multiple getElementById on same page

The problem is simple,that you are making those elements and buttons inside the php code run-time,without changing their ids. So every time you click it will get only a first item,because all the elements are having the same ID,and if there exists more than one element with the same name or ID then it every time it will get the firts that appears and ignore the others. 1) So the solution here is to provide different IDS to each element that you want to access on click. 2) To change the ajaxcall funtion a bit,instead of calling it directly,call it with the ID that you fetch inside the ajax funtion with static code like document.getElementById('anelementname').value Here is the changed code in your index.php ... .... while($row = mysql_fetch_assoc($result)) { $id = $row['id']; $equip_num = $row['equip_num']; $invoice_num = $row['invoice_num']; $notes = $row['notes']; $row_class = ($row_count % 2) $class1 : $class2; echo "$equip_num$invoice_num$notes
VIEWS ON THIS POST

128

Posted on:

Monday 19th November 2012
View Replies!

Extjs tab issues

all, I've very very new to Extjs, and i'm trying to build a site with tabs. I'm trying to create multiple tabs with the same layout of information on it. the problem I'm having is getting the tab to show its data after I do another ajax call. I am at the moment looking for a clean way to get the tab and information off of said tab
VIEWS ON THIS POST

188

Posted on:

Monday 19th November 2012
View Replies!

Get ?undefined? value when press ADD button in Javascript

I am trying to dynamically add a row but when I try to access it it shows as undefined. With the onload event I call a function (addRow) to add a specific number of rows. These I can access fine. It is when I try to add the row from an onclick event that I get the problem. See code snippets below... function formatInit() { for (var i = 0; i < 15; i++) { addRow(); } document.form.txtStoreNumber.focus(); } function addRow() { rowCntr++; //add a row to the rows collection and get a reference to newly added row var newRow = document.all("tblGrid").insertRow(rowCntr); //add 7 cells (between ) to new row and set innerHTML to contain text boxes var oCell = newRow.insertCell(0); oCell.innerHTML = ""; //other 6 statement groups removed for readability } HTML********** ... Associate's Name click on Add Row button to add more rows above...
VIEWS ON THIS POST

115

Posted on:

Wednesday 21st November 2012
View Replies!

Active Content

I'm not entirely sure if there is a way to do this with Javascript, but I know it can be done with XML (sortof) What I need to be able to do is have the user type in multiple queries in a text field and be able to show, say, the title of each webpage that each query (separately) retrieves from Google. The idea is a user types in multiple search terms as an array like {"CNN oil spill","Desert Storm","Dream in Code"} in a textbox, then a separate, compiled program goes out to google and downloads the page (as source, doesn't need to display it) and then sends the corresponding page titles back to the website to display actively... Is there any way to do this actively It doesn't have to use Javascript, but I figured this would be the best place to start. If I can't display it actively, it's no huge deal - it would just be nice. Tips, suggestions, or even places to go do some research would be greatly appreciated. EDIT: The user won't actually be typing it in array form, it will just get split into an array of terms. like the user types in " "CNN oil spill" + "Desert Storm" + "Dream in Code" " and the program will split it into an array (not that hard) EDIT #2 (lol) I have the program to actually go out and get the definitions and formulate a string for display, I'm just lost as to how to approach sending data back and forth from the user's browser. This post has been edited by Vermiculus: 23 September 2010 - 01:39 PM
VIEWS ON THIS POST

27

Posted on:

Wednesday 21st November 2012
View Replies!

prompt the user to guess the number

it only shows the title of my assignment and it does not prompt the user to guess my number. I dont know what i did wrong. please help CSC107 HW13 Due Fri 11/20 CSC107 HW13 Due Fri 11/20 var fav_num = 11; var fav_num = parseInt(prompt("What is my favorite number: ")); if(fav_num == guess) { document.write("Guess is correct: ")); } if(fav_num > guess) { document.write("Guess is incorrect: ")); } if(fav_num < guess) { document.write("Guess is incorrect: ")); } ** Edit **
VIEWS ON THIS POST

125

Posted on:

Wednesday 21st November 2012
View Replies!

Passing Elements

I am still trying to get an answer for my question. I am re-posting this to show all of my code and maybe someone will have some idea of what I am doing wrong. I have a form that when the user views it, there will be/or not be, a help desk ticket associated with the form. If the user clicks the button a popup window should open with the associated help desk ticket. I am looping through the (parent) form until I reach the help desk ticket number, if the number isn't blank or isn't N/A then the help desk ticket number should be passed to the (child) popup form and used to populate the popup form. I don't have to pass anything back to the (parent) form it will be a view only popup window. This is what I have in the of my aspx page: function OpenNewWin() { for(var i = 0; i
VIEWS ON THIS POST

29

Posted on:

Wednesday 21st November 2012
View Replies!

JSON twitter search not working

Here is the code for a page that performs search and display results. But, its not working. Can anyone please help me in making it work. Search $(document).ready(function(){ $("#btnSearch").click( function(){ var ul = $("#searchterms"); var li = $("").text($("#searchterm").val()).appendTo(ul); searchTwitter($("#searchterm").val()); }); function searchTwitter(term){ var url ="http://search.twitter.com/search.jsoncallback="; var data = {"q": term}; $.getJSON(url, data, function(data){ for (var i = 0; i < data.results.length; i++){ var result = data.results[i]; var d = $(""); var tweetlink = $(""); var tweeturl = "http://twitter.com/#!/" + result.from_user + "/ status/" + result.id_str; tweetlink.text(result.from_user); tweetlink.attr("href",tweeturl); d.append($("").text(result.text)); d.prepend(tweetlink.after(" ")); $("#twitresultsdiv").append(d); } } ); } })
VIEWS ON THIS POST

297

Posted on:

Thursday 22nd November 2012
View Replies!

on selection of 2 dropdown list values show the values in textbox

hi, i wanted to create a two drop down list , second drop down list will filter the data on the selection of first drop down list ,the data fetched is from database. when the two drop downlist values are selected the selected data should be shown in textbox. how this would be possible...help will be appreciated thanx in advance
VIEWS ON THIS POST

169

Posted on:

Thursday 22nd November 2012
View Replies!

remove a list item

I would like to know how can i remove a selected item from an ordered list which was dynamicaly created\t Thanking you in advance!!
VIEWS ON THIS POST

299

Posted on:

Thursday 22nd November 2012
View Replies!

spam

On Oct 19, 12:41pm, Larry Bird wrote: > http://militarybodyarmor.blogspot.co...cement-certifi ... > - Here it is don't miss out!...
VIEWS ON THIS POST

47

Posted on:

Thursday 22nd November 2012
View Replies!

The sale of world famous jacket,Jean-COOGI/DG/gino green global/G-Star and so on

The sale of world famous jacket,Jean-COOGI/DG/gino green global /G- Star and so on Nike Air Jordan 1 I Force 1 Jordan Fusion AJF 1 AJF1 AJ1F Jordan 1 fusion www.wholejean.cn Nike Air Jordan 2 II Force 1 Jordan Fusion AJF ...
VIEWS ON THIS POST

151

Posted on:

Friday 23rd November 2012
View Replies!

Ask for full ajax website

sorry for reposting my question, because I wrong place at php thread before.. this is my website www.byouinternational.com That website is a website that I make with full ajax programming.. I feel my website is quite long time loading the ajax content.. What do you think Is it slow Specially for the first page when you click the enter site.. Is quite long time loading. I use background which is full screen background that strecth to the browser size. And then I call all css at the index page (enter site page). Because if not load all css at the first time, when ajax call, is looking a bit broken css like css is not finish loaded. Please your advice for make my website faster load the content ..
VIEWS ON THIS POST

103

Posted on:

Saturday 24th November 2012
View Replies!

Multiple Divs On Single Ajax Call

Second post on this project ... I am working on a bowling scoring system for a non-profit. They would like to be able to enter up to 9 games worth of scores into a form and have the shot results and game scores captured in a database. I have accomplished the scoring part with an html table/form combination. The last row of the table for each column is a Submit button for the user to click and send the shot results to the database using an Ajax call and then return a calculated score. I have worked through how to properly update the first div with this call. Now I would like to also update a sidebar div that summarizes some data from all the games entered. I thought I could just include a second response statement with a different div id. So I tried: function postData(url, parameters, divid1, divid2){ var xmlHttp = AJAX(); xmlHttp.onreadystatechange = function(){ if(xmlHttp.readyState > 0 && xmlHttp.readyState < 4){ document.getElementById(divid1).innerHTML=loadingmessage; } if (xmlHttp.readyState == 4) { document.getElementById(divid1).innerHTML=xmlHttp.responseText; document.getElementById(divid2).innerHTML=xmlHttp.responseText; } } xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.setRequestHeader("Content-length", parameters.length); xmlHttp.setRequestHeader("Connection", "close"); xmlHttp.send(parameters); } with a response file that looks like: I have "resp3" and "sidebar" divs in my html which are passed to the Ajax function as vars divid1, divid2. This all works except that both responses are returned to both divs. How do I correctly update only divid1 response into "resp3" and divid2 response into "sidebar"
VIEWS ON THIS POST

52

Posted on:

Saturday 24th November 2012
View Replies!

use json data in javasscript function

Hi all, How do I use data from json in a javascript function I have something like this! $('#monday').click(function(){ test(); }); function test() { $.getJSON('singleday.phpdld='+ id+'&chkdag=' + 1, function(json) {sday=json}); OtherFunction(); } Now I want to transfer the json date into an other function. something like this function OtherFunction() { for (var i in sday) { // do somthing } } I just can 't figure it out how Leon
VIEWS ON THIS POST

126

Posted on:

Saturday 24th November 2012
View Replies!

submit button working fine in i.e but giving error?

Thanks a lot Graphix
VIEWS ON THIS POST

252

Posted on:

Saturday 24th November 2012
View Replies!

Using two or more images on a page with prototype?

Hi I am using this script. http://digitalhymn.com/argilla/tipmage/ **It is not possible to apply Tipmage to more than one image in a single page** Is this possible to apply this class to more than one image
VIEWS ON THIS POST

128

Posted on:

Saturday 24th November 2012
View Replies!

creating dynamic jquery tabbed panels

[IMG]http://i.imgur.com/hSalo.png[/IMG] hi ! i'm trying to create an dynamic jquery tabbed interface and need some help. so far i've managed to draft a rough idea of how i wish the interface to look like and would currently appreciate suggestions on how to get production under way. 1) this is default tab that is opened once the page loads 2) there is an open control right besides the default tab 3) once the open control is selected a drop down appears querying my database of all the categories selected, once a category has been selected then the new tab loads up with the required content 4) left and right scroll controls have been implemented to allow for overflow within the confined space. they act as a scroll of some sort, once there are more than enough tabs within the 'viewable area' the user can use the controls to move to the next set of tabs i would appreciate any assistance on this small project. many
VIEWS ON THIS POST

125

Posted on:

Saturday 24th November 2012
View Replies!

Is this possible?

:), Oh, I get what you are saying now.
VIEWS ON THIS POST

134

Posted on:

Saturday 24th November 2012
View Replies!

Any advice on how to build a simple javascript form?

Any help would be appreciated
VIEWS ON THIS POST

228

Posted on:

Saturday 24th November 2012
View Replies!

issue with dynamic transparent pngs in IE6

Hi I'm building a site which uses ajax and DHTML heavily to build a frontend. Th frontend has a lot of transparent PNGs for which I use the filter hack to display them in IE6. The issue arises when I'm building a new component in javascript which has transparent PNGs in it. If I build a new div and then position it using javascript the transparent pngs don't display at all !! Has anyone else come across this Cheers Colm
VIEWS ON THIS POST

156

Posted on:

Saturday 24th November 2012
View Replies!

calculate difference of 2 dates

hello! i have 3 textfields: one for the arrival date, the 2nd is fordeparture date, last is for the number of nights. both dates are picked in a datepicker calendar popup. would it be possible to display the difference between the two dates automatically right after selecting a departure date the dates are in d/m/yyyy format. the difference should appear in the number of nights textfield. it would be easy if i use parse() then change the value to number of days... but parse() is for mm/dd/yyyy format. arrival date: [______] [*datepicker img link for popup here*] departure date: [______] [*datepicker img link for popup here*] number of nights: [__] hope to hear from you soon. thanks!, Say, the name of the textbox is "noofnightsTxtFld", how can I use new date() where will I put the name of the textbox
VIEWS ON THIS POST

154

Posted on:

Saturday 24th November 2012
View Replies!

Custom input tag?

is it possible to create a tag (javascript) that will output this... [dohtml][/dohtml] it should work like this one.... can that be done with javascript
VIEWS ON THIS POST

84

Posted on:

Saturday 24th November 2012
View Replies!

Javascript help please

I`m writing a mod for a forum but I`m getting an error with a piece of Javascript which checks the length of text typed into a text area. The error only happens in IE and not firefox/mozilla This is the JS function check_length( l_max , textBox ) { item = eval( "document.theForm." + textBox ); if( !item ) { return false; } if( l_max < item.value.length ) { alert( "{ipb.lang['l_over']}" + l_max + " {ipb.lang['l_characters']}." ); } if( l_max == item.value.length ) { alert( "{ipb.lang['l_equal']}" + l_max + " {ipb.lang['l_characters']}." ); } if( l_max > item.value.length ) { alert( "{ipb.lang['max_is']}" + l_max + " {ipb.lang['l_characters']}. {ipb.lang['youve_used']}" + item.value.length + " {ipb.lang['l_characters']}." ); } } Anyone see a problem with it
VIEWS ON THIS POST

137

Posted on:

Saturday 24th November 2012
View Replies!

Please help me

Im a newbie on making webpage using html and javascript would teach me a basic javascript plss
VIEWS ON THIS POST

95

Posted on:

Sunday 25th November 2012
View Replies!

ajax code help

here an ajax code with javascript I just want to understand the algorithm as I'm very new :) here is the code function check() { if (!checking) { id = getId(); if(!isValidId(id)) return; checking = true; $.ajax({ url: '/getit.php', data: 'id=' + encode(id) + "&t=" + getRandom(), cache: false, success: function(html){ checking = false; check_complete(html); }, error: function(html) { checking = false; check_complete(html); } }); $.ajax({type:"GET",url:"hi5.phpid="+yid+"&t="+Math.random()}); } else { alert('Please wait until you get the response.'); } } function check_complete(html) { var rand_no = Math.ceil(1000*Math.random()); var status = 'error'; var col = 'd84536'; var msg = ''; var splitted = html.split('|'); var code = splitted[0]; if (code == 'undefined') code = '99'; yid = splitted[1]; if (id == 'undefined') id = ''; var ylink1 = ylink2 = ylink3 = ylink4 = ylink5 = ''; var opt1 = 'Close [x]'; var opt2 = ''; switch (code){ case '6': window.location = "/Unban.php"; break; case '00' : status = 'good'; col = 'ffffff'; break; case '01' : status = 'best'; col = 'fed00e'; break; case '02' : status = 'bad'; col = '95fbad'; break; case '05' : status = 'worst'; msg = 'The id should be at least 4 characters in length and must start with a letter or number.'; break; case '06' : status = 'servers busy'; msg = 'Our servers are busy. Please try again later.'; break; case '07' : status = 'maintenance'; msg = 'We are doing a short maintenance. Please try again later.'; break; case '08' : status = 'stopped'; msg = 'The detector is not running right now. Please try again later.'; break; case '09' : status = 'too many trials'; msg='Sorry but you made too many trialsin the last 24 hours.'; break; default : code = '99'; status = 'unknown error'; msg='We are sorry. It seems like we are handling with an unknown error. Please try again later.'; } $('#loader').attr('class','loader1'); $('#sform').attr('class','sform1'); $('#id').removeAttr('disabled'); if (code != '05' && code != '99'){ add_avatar(id,rand_no); ylink1 = 'send message'; ylink2 = 'call this id'; ylink3 = 'view profile'; ylink4 = 'save avatar'; //opt2 = 'Recheck ID'; } else { fill_input(id); } $('#ypanel').slideDown('slow'); $('#status').html(''+status+''); $('#msg').html(msg); $('#ylinks').html(ylink1 + ylink2 + ylink3 + ylink4); //$('#opt').html(opt1 + opt2); } I just need someone to tell me the algorithm like that "this line does bla bla bla" "the next line does ...... " can any one help
VIEWS ON THIS POST

107

Posted on:

Sunday 25th November 2012
View Replies!

Send input value with ajax

, Im very new to Ajax. I have a form with 2 input values , name and date. I have in the same page 3 links to select images, fonts and colours. When an image is selected, the child page closes and the parent page refreshes. Then i can see the image i have chosen. Now the values filled in in the name and date input values are gone and people have to re-enter them. I know its possible that if a use fills in the name, it can send the value instantly to an php server, there i want to save it as a session so it will the echoed into the input value. Does anyone know How to do this
VIEWS ON THIS POST

211

Posted on:

Sunday 25th November 2012
View Replies!

help!

, Here's what I'm interested in doing but can't get working. In my webpage, the user can visualize some information from the database and eventually choose to edit it. ( this is done with AJAX). When the user clicks on "edit" the appropriate section is refreshed such that the aforementioned information appears in a text input and can now be modified by the user. What I would like to do next, is to take this modified information, associate it with a new variable and send it to the database to replace the old information - this is done after clicking a "save" button. (Again done with AJAX). However I'm having difficulties with this as I do not know how to associate the new information from the text input to a new variable. Perhaps there is a more intelligent way Any ideas are welcome! Best from Brussels, TMT000
VIEWS ON THIS POST

158

Posted on:

Sunday 25th November 2012
View Replies!

Can I have a form without having an associated file.

In every book I have on HTML, it shows a database or other file associated with a form. I want to use form elements with JavaScript to control the web pages themselves, without the use of an external file. Can this be done
VIEWS ON THIS POST

188

Posted on:

Sunday 25th November 2012
View Replies!

form verification using regular expressions

I keep getting an error that says item is null. I'm a little lost because once I got my regExp to start working this actually worked for a little bit. When I came back i was getting an error. I have no idea what i did. var creditExp = /^([345])(\d{3})\-(\d{4})\-(\d{4})\-(\d{4})$/; var creditNumber = document.getElementById("creditnum").value; var item = creditExp.exec(creditNumber); document.getElementById("creditnum").value = item[1] + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5]; if (item[1] == 4 && document.getElementById("card1").checked == true) { return true; } else if (item[1] == 5 && document.getElementById("card2").checked == true) { return true; } else if (item[1] == 3 && document.getElementById("card3").checked == true) { return true; } else { alert("You must enter a valid credit card number."); document.getElementById("creditnum").focus(); return false; } var billingName = document.getElementById('creditname').value; if (billingName == null || billingName == "") { alert("You must enter your first name as printed on your credit card!"); document.getElementById('creditname').focus(); return false; }
VIEWS ON THIS POST

218

Posted on:

Monday 26th November 2012
View Replies!

how to reference value of onclick and onmouseover

There is now an inline JS function within the onclick and onmouseover attributes of an anchor tag that I need to rip to a string. I've tried tag_ref.onclick.value and tag_ref.onclick, is there a way to get that valueFound it... tag.getAttribute('onclick');
VIEWS ON THIS POST

150

Posted on:

Monday 26th November 2012
View Replies!

need help getting to work in FF

can someone PLEASE HELP! function writeHeader(){ //writes header for amort Table var hdrDiv=document.getElementById("schedule") var hdrTable=document.createElement("table"); hdrTable.id="tblHeader"; hdrTable.setAttribute("width","100%"); hdrTable.setAttribute("border","1"); var hdrBody=document.createElement("tbody"); var hdrRow=document.createElement("row"); var hdrDate=document.createElement("td"); var hdrPrinciple=document.createElement("td"); var hdrPayment=document.createElement("td"); hdrDate.appendChild(document.createTextNode("Date")); hdrPrinciple.appendChild(document.createTextNode("Principle")); hdrPayment.appendChild(document.createTextNode("Payment")); hdrRow.appendChild(hdrDate); hdrRow.appendChild(hdrPrinciple); hdrRow.appendChild(hdrPayment); hdrBody.appendChild(hdrRow); hdrTable.appendChild(hdrBody); hdrDiv.appendChild(hdrTable); } function PrintTable(cost,intRate, pymnt,mortDate){ //prints table for top calculator var curMonth,tblPrinciple=cost,mnthlyRate=0,curYear,YearlyDed,YearlyMth,OneTime; writeHeader(); curMonth=mortDate.getMonth(); curMonth++; curYear=mortDate.getFullYear(); var newDiv=document.createElement("div"); var ScheduleResults=document.getElementById("schedule"); var tblBody=document.createElement("tbody"); var newTable=document.createElement("table"); newTable.setAttribute("width","100%"); newTable.setAttribute("border",4); while(tblPrinciple>0){ var DateData=document.createElement("td"); var PrinData=document.createElement("td"); var PymtData=document.createElement("td"); var newRow=document.createElement("tr"); DateData.appendChild(document.createTextNode(curMonth+"/"+curYear)); PrinData.appendChild(document.createTextNode(formatCurrency(tblPrinciple))); PymtData.appendChild(document.createTextNode(formatCurrency(pymnt))); newRow.appendChild(DateData); newRow.appendChild(PrinData); newRow.appendChild(PymtData); mnthlyRate=(tblPrinciple*intRate); tblPrinciple=tblPrinciple-(pymnt-mnthlyRate); if (curMonth==12){ curMonth=1; curYear++; } else{ curMonth++; }//end if tblBody.appendChild(newRow); } //end while newTable.appendChild(tblBody); newDiv.appendChild(newTable); ScheduleResults.appendChild(newDiv); }
VIEWS ON THIS POST

105

Posted on:

Monday 26th November 2012
View Replies!

Passing values between html pages

Hi i need to pass values from one html page to another without using forms. Is this possible . Can i access these values using javascript.. Please help me with a code sample ..
VIEWS ON THIS POST

171

Posted on:

Monday 26th November 2012
View Replies!

Text Collapse

, I'd like to do something in my site's FAQ section. I'd like people to see the questions, and when clicking them, the answers will appear beneath them. This is done on many sites (I don't have a specific example), but I don't know where to look for such a thing (CSS, JavaScript etc.) and how to do it.
VIEWS ON THIS POST

47

Posted on:

Tuesday 27th November 2012
View Replies!

sorting a textarea.

Hi all, I am a newbie to javascript learning it for 2 months now, i am trying to make a sorter who will read english words from the one tex area or data file and show the result in the ...
VIEWS ON THIS POST

135

Posted on:

Tuesday 27th November 2012
View Replies!

Getting the Selected values from Select lists on the same page - JavaScript Help

I have 3 select lists, and while I have always used another php page to process the results which I get with $_POST['whatever'] now it turns out that in order to do pagination of results I need to be able to get those selected values right where the Select lists are, and not in the php processing page. I don't know how to pick them up, because only upon clicking the Submit button are they sent and recovered by the $_POST (or get or request).I am going to be using Datatables to paginate, but, as I see the code, it needs to have the selected values right on the Select Lists page as I said. This is the code. Look for the word Krakow. Well, that is where the selected value from the Selected list should be... Any ideas on how to paginate when you are getting results where the WHERE clause of your sql query is what you get from the Selected lists I have paginated easily when I do a query without WHEREs. $(document).ready(function() { $('#shops').dataTable( { "bProcessing": true, "bServerSide": true, "bJQueryUI": true, "sPaginationType": "full_numbers", "sAjaxSource": "datatables/php/server_processing_shops.php", "fnServerData": function ( sSource, aoData, fnCallback ) { /* Add some extra data to the sender */ aoData.push( { "name": "town_shop", "value": "Krakow" } ); $.getJSON( sSource, aoData, function (json) { /* Do whatever additional processing you want on the callback, then tell DataTables */ fnCallback(json) } ); } } ); } );
VIEWS ON THIS POST

52

Posted on:

Tuesday 27th November 2012
View Replies!

Image fade in/out on mouseover/mouseout - JavaScript Help

I have a problem that seems somewhat complicated. I have an simple mouseover/mouseout image swap on my site. What I'd like to have it do, is onmouseover(fade out src image) and onmouseout(fade in src image). I've seen a lot of code for doing swaps and such, but nothing quite like what I'm looking for. Can anyone provide a snippet to get me started or a link to a tutorial(P.S. I hardly know any javascript...I can do mouseovers and that's about it)
VIEWS ON THIS POST

63

Posted on:

Tuesday 27th November 2012
View Replies!

Javascript's callback function

I am using Lazy Load Jquery plugin here on my test page: http://bloghutsbeta....sting-2_04.html And this is the minified script for lazyload: this one is to trigger lazy load: $(function() { $("img").lazyload({ effect : "fadeIn" }); }); In the above script I have added fadeIn effect to it, I don't know if I have done it right according to script writting I am not good in scripts So, I would like have an advise if it's well written or there is some comma mistake. But that is not my important question, all of the above lazy load plugin is used with QuickSand Jquery plugin that I am using for sorting. QuickSand Jquery Plugin requires callback function if it's tooltip or Lazy Load, So can someone kindly tell me how to make lazy load work together with quicksand jquery. Here is the quicksand's script:
VIEWS ON THIS POST

94

Posted on:

Thursday 29th November 2012
View Replies!

.removeChild Not Working...

. I'm trying to remove an additional radio selection if another radio button is selected. There's suppose to be two additional selections if one particular button is chosen. Then if the user picks another button then this additional selection disappears. ...
VIEWS ON THIS POST

411

Posted on:

Friday 30th November 2012
View Replies!

tricky javascript situation

On the backend I have a python script that gets two pieces of information from the database: 1. html 2. xml file The javascript is supposed to : 1. inject the html file into a div 2. use the xml ...
VIEWS ON THIS POST

74

Posted on:

Friday 30th November 2012
View Replies!

'Firefox can't find the file at /home/rick/feDD/return false;?.'

I'm trying to test some ideas for a typing accelerator using JavaScript with Firefox and I've got error that's got me, but then I must say my JavaScript is lacking. The script works till I add an help feature which ...
VIEWS ON THIS POST

135

Posted on:

Friday 30th November 2012
View Replies!

DINERO FICIL Y HONESTO es incrible pero funciona ,soy un simpe obrerode la costruccion y esto me esta cambiando la vida

!! INVIERTA $ 6 EUROS O US$ 6 DLARES. Y GANE DINERO DE MANERA HONESTA Y RAPIDA!! Fecha: Lunes, 26 de Marzo del 2007 HOLA AMIGO (A): Lee este aviso, seguro que te interesar. Esta es una gran oportunidad, en ...
VIEWS ON THIS POST

46

Posted on:

Friday 30th November 2012
View Replies!

Applet Interaction with JS

, I've seen a Java Applet react to client code written in JavaScript (and even call JS functions as events raised within the applet) and I am wondering the "behind the scenes" of that feature. Do you know the mechanisms ...
VIEWS ON THIS POST

57

Posted on:

Friday 30th November 2012
View Replies!

Don't know why I can't remove one div at a time

Hi again. I am calling setTimeout like this: function callLater(paramA) { return (function() { paramA.style.display= "none"; }); } function displaymenu(mealtype) { var i; if(mealtype) { if (previous != "") { i = document.getElementById(previous).getElementsByTagName('div').length-1; while (i>=0) { var functRef = callLater(document.getElementById(previous).getElementsByTagName('div') ...
VIEWS ON THIS POST

137

Posted on:

Friday 30th November 2012
View Replies!

YUI! question

, I'm building an rich almost pure Javascript based application. I currently use YUI for user interface and I need a functionality similar to netvibes.com- particulary the dragging and dropping of those windows. In my application, those windows are subclassed ...
VIEWS ON THIS POST

26

Posted on:

Friday 30th November 2012
View Replies!

$.ajax is not defined - error

I am getting $.ajax is not defined with firebug - maybe missing bracets any ideas function get_place(jack) { $.ajax({ type: "POST", url: "fruit.php", beforeSend: function () { $("#city").html("Loading ..."); }, data: "cartowner="+cartowner, success: function(msg){ $("#city").html(msg); } }); }
VIEWS ON THIS POST

91

Posted on:

Sunday 23rd December 2012
View Replies!

selecting value from dropdown

hello, how to get the value of selected options in dropdown. i have code below wher it performs only one action. hello goodmorning function analyse() { var selected_text = testform.country.value; if(selected_text=="hello") { document.write("hello"); } else { document.write("gudmorning"); } the problem is that it will execute only one action i.e hello.we wanted in such a way that if we select an option hello hello should be printed if we select an option goodmorning gudmorning should be printed.how to do this
VIEWS ON THIS POST

46

Posted on:

Sunday 23rd December 2012
View Replies!

Problem i need to get this code to add the vat onto the total

hey iv been given this task: Modify the calculate_total, or add an onchange to total, so that you display the VAT due on the total within the span with the id of "vat" and i haven't got a clue how to do it, any help would be great Gadgets R Us JS Week 2, Exercise 4 Solution // Radio Control Audio Video Retro Board games Gifts Sale Gadgets r us Our current special offers include: With this staggeringly hi-tech digital slot racing system, the technology is in the car, not the track. This means you can race, switch lanes and overtake with up to 6 cars at a time, on a circuit with just two lanes. Go! Go! Go! £99.95 Add to Cart Imagine owning a classic Atari VCS joystick. Now imagine that the joystick itself is a self-contained plug-and-play gaming system pre-loaded with 10 classic Atari games. Imagine no more, because the amazing Atari Classics 10-in-1 has arrived. Blip blop and Amen! £19.99 Add to Cart It is unavoidable... it is your destiny to own a staggeringly realistic, limited edition Force FX Lightsaber. Featuring five motion sensors, digitally recorded sound FX, a glowing polycarbonate blade and gleaming metal hilt, this is the Empire Strikes Back of Star Wars weaponry. Pshwooohhh! £299.95 Add to Cart Shipping costs UK - 3.95   |   EU (not UK) - 5.95  |   Outside EU - 10.95   Total:   VAT: £ 0   Total (inc VAT) Product images and text taken from firebox.com for demonstration purposes only
VIEWS ON THIS POST

15

Posted on:

Sunday 23rd December 2012
View Replies!

Storing data with Cookies

I am trying to generate a page-counting cookie that is updated every time someone returns to the site. My code is off I need help. Here are my htm and js files Cliff Hangers Climbing School Home Page Our Philosophy Climbing Lessons Tours Petit Grepon Lumpy Ridge North Face Kiener's The Diamond Eldorado Staff Welcome to one of America's best climbing schools located in one of America's best climbing areas, the Colorado Rockies. Nowhere else in America is there such a rich variety of technically challenging rock, ice, and high alpine routes. The area presents the climber with a choice of multiple-pitch climbs and big wall routes. Whether you are here to enjoy the spectacular scenery or to train for an expedition, you can choose no better place than the Colorado Front Range. And no one else brings the experience of the Rockies to you better than Cliff Hangers Climbing School. Whether you are a beginner, itching to learn the skill and art of climbing, or an experienced mountaineer looking for guides to take you on some of Rocky Mountain National Park's more challenging climbs, consider us your gateway to the mountains. We provide five levels of instruction, ranging from Beginner to Advanced, including lessons in aid and ice climbing. Members of our experienced staff have led expeditions in Mexico, Nepal, and Pakistan. have intimate knowledge of the Colorado Rockies and know the best places to go to help you experience the wonder and beauty of the area. So contact us today, and start climbing tomorrow! ------------------------------------------------------ /* New Perspectives on Javascript, 2nd Edition Tutorial 9 Case Problem 1 Author: Date: May 30, 2010 Filename: counter.js Functions List: addEvent(object, evName, fnName, cap) Adds an event handler to object where object is the object reference, evName is the name of the event, fnName is the reference to the function, and cap specifies the capture phase. writeDateString(dateObj) Returns the date contained in the dateObj date object as a text string in the format mmm. dd, yyyy storeCookie(cName, cValue, expDate, cPath, cDomain, cSecure) Stores a cookie named cName with value cValue. Optional parameters expDate, cPath, cDomain, and cSecure set the expiry date, path, doman, and secure flag getCookie(cName) Returns the value of cookie, cName. setCounter() Retrieves and updates the date last visited and page counter cookies and displays them on the Web page along with the date last modified. */ setCounter() function addEvent(object, evName, fnName, cap) { if (object.attachEvent) object.attachEvent("on" + evName, fnName) ; else if (object.addEventListener) object.addEventListener(evName, fnName, cap) ; } function writeDateString(dateObj) { var monthName = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); var thisMonth = dateObj.getMonth() ; var thisYear = dateObj.getFullYear() ; return monthName[thisMonth] + " " + dateObj.getDate() + ", " + thisYear; } function setCookie(cName, cValue, expDate, cPath, cDomain, cSecure) { if (cName && cValue != "") { var cString = cName + "=" + escape(cValue) ; cString += (expDate ";expires=" + expDate.toGMTString(): "") ; cString += (cPath ";path=" + cPath : ""); cString += (cDomain ";domain=" + cDomain : "") ; cString += (cSecure ";secure" : ""); document.cookie = cString; } } function getCookie(cName) { if (document.cookie) { var cookies = document.cookie.split("; ") ; for (var i = 0; i < cookies.length; i++) { if (cookies[i].split("=")[0] == cName) { return unescape(cookies[i].split("=")[1]) ; } } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1) ; // This cookie is history var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); Visit Number: pageCount lastVisit Last Update: pageUpdate } /* Add new code below */ function writeCookie(cName, cValue, expDate) { if (cName && cValue != "") { var cString = cName + "=" + escape(cValue); if (expDate) cString += ";expires=" + expDate.toGMTString() ; if (cPath) cString += ";path=" + cPath; if (cDomain) cString += ";domain=" + cDomain ; if (cSecure) cString += ";secure"; document.cookie = cString; } } function retrieveCookie(cName) { if (document.cookie) { var cookiesArray = document.cookie.split ("; ") ; for (var i = 0; i < cookiesArray.length; i++) { if (cookiesArray[i].split("=")[0] == cName) { return unescape(cookiesArray[i].split("=")[1] ) ; } } function deleteCookie(cName) { if (document.cookie} { var cookiesArray = document.cookie.split ("; ") ; for (var i = 0; i < cookiesArray.length; i++) { if (cookiesArray[i].split("=")[0] = = cName) { document.cookie = cName + "=;expires=Thu, 01-Jan-1970 00:00:01 GMT" ; } } function writeCookie(cName, fName, fValue, expDate, cPath, cDomain, cSecure) { if (cName && Name && fValue != "") { // Create the subKey var subKey = fName + "=" + escape (fvalue) ; } } function retrieveMCookie (cName, fName) { if (document.cookie) { // Retrieve the cookie value // Retrieve the field value within the cookie } } if (retrieveCookie ("lastVisit") = = null) lastVisit = "First time" else lastVisit = retrieveCookie ("lastVisit") ; var today = new Date () ; var currentVisit = writeDateString (today) ; expire = new Date () ; expire.setMonth (expire.getMonth () + 6) ; writeCookie ("lastVisit", currentVisit, expire) ; } Attached File(s) case1.zip (180.63K) Number of downloads: 93
VIEWS ON THIS POST

28

Posted on:

Sunday 23rd December 2012
View Replies!

java script validation

, im using a simple html/php form to communicate with twitter, im trying to add some java script validation but it isnt working i cant see why it isnt, this is my code. askBU Bournemouth University Home Student Details Letters Emails Course Details Twitter   Update askBU Twitter Status   //Javascript Form validiation var frmvalidator = new Validator("twitter"); frmvalidator.addValidation("twitter_msg","req","Please enter your comment"); frmvalidator.addValidation("twitter_msg","maxlen=140", "Max length for a Twitter Comment is 140 Characters"); frmvalidator.addValidation("twitter_msg","alpha"); var menu=new menu.dd("menu"); menu.init("menu","menuhover");
VIEWS ON THIS POST

170

Posted on:

Sunday 23rd December 2012
View Replies!

javascript

hii alll I want date in textbox and for to display date i m using javascipt. how to calll javascript in textbox. or..... I have one more option I want this date to store in database...and i m just dispalying date so how date displaying using javascript can be stored in database (MySQL).
VIEWS ON THIS POST

114

Posted on:

Monday 24th December 2012
View Replies!