SEARCH YOUR SOLUTION HERE  

check box checked along - JavaScript Help

[syntax=php]function chk_view() { var theForm = document.myform; for (i=0; i

Posted On: Wednesday 2nd of January 2013 12:24:02 AM Total Views:  363
View Complete with Replies




Related Messages:

javascript function doesn't respond   (119 Views)
hey again. in my website I have a couple of forms that you can only see them if certain conditions are applied. for example - if you're an admin and you search a user, you'll see a form which allows you to edit his information. if you're not you won't see it. if you're already logged in you can't see the registration form, but if you aren't you can. so I did it with ASP in this way - (this is the registration part) if (Session["LoggedIn"] != null) { Response.Write("You're already registered!"); } else { Response.Write(); } I've managed to put in the form inside the Response.Write(), and it also has the javascript part like this - + "" + "" this works perfectly fine. now, I've done this twice. the example above is from the registration part which doesn't allow a logged in user to register again. I'm having problems with the second one - not showing the edit form to a user who can't edit. this is basically the code - if (Session["LoggedIn"] != null && ((Session["IsAdmin"] != null) || (Request.QueryString["SelfEdit"] == "Yes") || ((string)(Session["LoggedIn"]) == UserId))) { Response.Write( "" + "" +"
javascript dynamic content styles nodes   (157 Views)
Unhappy Dynamic Content and Styles problem... Alright, So I've been trying to do this ALL weekend for my online java class... and cant seem to figure it out! It's been killing me... If anyone could help me out, I would GLADLY appreciate it!!! Here is a shortened version of the HTML.... followed by one of the functions in javascript that im having the problem with... basically, when the user selects a name from a select dropdown menu, I want to change the actors names in the html to black, along with their lines... and else to red. So far, I can properly change just their NAME to red and black correctly... but not their block quotes PROSPERO Enter PROSPERO in his magic robes, and ARIEL Now does my project gather to a head: My charms crack not; my spirits obey; and time Goes upright with his carriage. How's the day ARIEL On the sixth hour; at which time, my lord, You said our work should cease. PROSPERO I did say so, When first I raised the tempest. Say, my spirit, How fares the king and's followers ARIEL Confined together In the same fashion as you gave in charge, Just as you left them; all prisoners, , In the line-grove which weather-fends your cell; They cannot budge till your release. The king, His brother and yours, abide all three distracted And the remainder mourning over them, Brimful of sorrow and dismay; but chiefly Him that you term'd, , 'The good old lord Gonzalo; His tears run down his beard, like winter's drops From eaves of reeds. Your charm so strongly works 'em That if you now beheld them, your affections Would become tender. PROSPERO Dost thou think so, spirit ARIEL Mine would, , were I human. PROSPERO And mine shall. Hast thou, which art but air, a touch, a feeling Of their afflictions, and shall not myself, One of their kind, that relish all as sharply, Passion as they, be kindlier moved than thou art Though with their high wrongs I am struck to the quick, Yet with my nobler reason 'gaitist my fury Do I take part: the rarer action is In virtue than in vengeance: they being penitent, The sole drift of my purpose doth extend Not a frown further. Go release them, Ariel: My charms I'll break, their senses I'll restore, And they shall be themselves. ARIEL I'll fetch them, . Exit PROSPERO Ye elves of hills, brooks, standing lakes and groves, And ye that on the sands with printless foot Do chase the ebbing Neptune and do fly him When he comes back; you demi-puppets that By moonshine do the green sour ringlets make, Whereof the ewe not bites, and you whose pastime Is to make midnight mushrooms, that rejoice To hear the solemn curfew; by whose aid, Weak masters though ye be, I have bedimm'd The noontide sun, call'd forth the mutinous winds, And 'twixt the green sea and the azured vault Set roaring war: to the dread rattling thunder Have I given fire and rifted Jove's stout oak With his own bolt; the strong-based promontory Have I made shake and by the spurs pluck'd up The pine and cedar: graves at my command Have waked their sleepers, oped, and let 'em forth By my so potent art. But this rough magic I here abjure, and, when I have required Some heavenly music, which even now I do, To work mine end upon their senses that This airy charm is for, I'll break my staff, Bury it certain fathoms in the earth, And deeper than did ever plummet sound I'll drown my book. Solemn music function filterScene(e) { var listBox = e.target || event.srcElement; var h3t = document.getElementsByTagName("h3"); for(var l = 0; l < h3t.length; l++) { if(listBox.value != h3t[l].innerHTML) { // Turn non-names red h3t[l].style.color = "red"; } else { // Turn Selected Character Black h3t[l].style.color = "black"; } } }
Lightbox problem.   (126 Views)
I have now found a solution to this problem by using http://www.cabel.nam...ncyzoom-10.html. Mods feel free to delete this post. This post has been edited by Sneblot: 23 January 2011 - 09:21 AM
Animation   (132 Views)
How would I animate a something across a screen
Picture gallery website with javascript disabled   (143 Views)
Hi , I wonder if anybody can give me an advice. I am working at a photography site (as many of you might know by now :)) and I realized I made a pretty bad mistake, for the second time in a row unfortunately, which is to rely on javascript to display my pictures. I think it is time to make amends, so I want to make sure the site, the whole site, works with javascript disabled. I have an idea as to what to do, but I was wondering if you can let me know if this is the right way. So, here the website, or I should say, the page with the javascript http://antobbo.webspace.virginmedia.com/petras/test/egypt.htm Needless to say, if you click on the thumbnails (only the first 3 are linked up) adn you have javascript disabled nothing will happen. Here are the relevant bits of code: HTML code: here are the thumbnails ... ... here the big pictures, overlay and close button hidden in the page ... ... The script: var $full_images; var $close_button; var $overlay; $(function(){ $full_images = $(".full_images"); $close_button = $(".close_button"); $overlay = $(".overlay"); }); function change_images(image){ var $images = $("#" + image); $overlay.hide().show(); $full_images.hide().show("slow"); $images.hide().fadeIn(1000); $close_button.hide().show(); $close_button.unbind('click').click(function(){ $(this).hide(); $images.fadeOut("fast"); $full_images.hide("slow"); $overlay.hide("slow"); }); } and the css: ... .overlay { display:none; background-color:black; position:fixed; opacity:0.85; filter:alpha(opacity=75); /* For IE8 and earlier */ top:0; bottom:0; right:0; left:0; width:100%; z-index:100; } .full_images { display:none; background-color:transparent; position:fixed; width:700px; height:490px; z-index:102; left:50%; top:50%; margin:-245px 0 0 -350px; } .image_div { border:1px solid transparent; width:660px; height:450px; margin:20px auto 0; z-index:103; /*no positioning so that I can centre the image*/ } .close_button { position:absolute; top:0; right:0; z-index = 104; } ... Ok so, here's what I think I will do. For non javascript users I will hide the thumbnails away and just display all the big pictures, one below the other one, so there will be quite a bit of scrolling. This will require some changes to the page, in particular: give display:none; to all the thumbnails one by one (I can't hide the class main_categories because it contains the thumbnails and the big pictures), the overlay and instead display just the big pictures. Then on the body tag I will call a script that does the opposite: display the thumbnails and hide the big pictures, overlay and the black background behind the big picture. I wonder, does this script need to be placed inside the other script I have on the page and that I call as an external file from the head tag or can I add it as a separate one Hope it all makes sense
INTERVAL   (186 Views)
My problem is all about being able to define an interval withing the frame work of a Javascript program. Is it correct what I've coded downif not then just give a helping hand
Javascript question   (168 Views)
Is there a way to create an onclick event that will take a file and post it similar to the browse/upload form in html
jquery datepicker range validation #2   (359 Views)
all, i posted this a while ago and the thread closed, this was my original question: $(function() { $('#inlineDatepicker').datepick({ rangeSelect: true, monthsToShow: 3, minDate: '+7d', rangeSeparator: '|', altField: '#resdate', altFormat: 'dd-mm-yyyy', pickerClass: 'locgrid', onDate: nationalDays } ); }); var natDays = [[12, 18, 2010], [12, 19, 2010]]; function nationalDays(date, inMonth) { if (inMonth) { for (i = 0; i < natDays.length; i++) { if (date.getMonth() + 1 == natDays[i][0] && date.getDate() == natDays[i][1] && date.getFullYear() == natDays[i][2] ) { return {dateClass: natDays[i][3] + '_day', selectable: false}; } } } return {}; } now what i'm trying to accomplish is, when a user clicks a start- and enddate and there is a natDays variable in between to throw an error message. any ideas This is what airshow answered, thanks for that btw: Piet, I think I have it. In the datepick settings, change onDate: nationalDays to onSelect: nationalDays . Then nationalDays should be as follows: function nationalDays(dates) { var natDate; var includesNatDate = false; for (i=0; i= dates[0].getTime() && d.getTime()
JavaScripts onchange event handler   (184 Views)
List 2 HTML elements that can be associated with the Javascript event handler on change
random background images   (155 Views)
So, I have a client that wants a new background image every time page is reloaded. I thought I have to script and thought I had it working but when I applied it to all my pages from a template I made in dreamweaver it doesn't work. It only works on the template. Any ideas.... Oh, FYI I have no background css so things won't get confused. See code below.
image swap on mouseover   (199 Views)
im trying to do an image swap when a user hovers a mouse over it heres the code i got but for some reason it doesnt work. can any 1 tell me what is wrong with this function ImgOver() { document.quote.go.src = "images/go_on.gif"; } function ImgOut() { document.quote.go.src = "images/go_off.gif"; } and this is in the body
Javascript in FireFox   (120 Views)
var counter = "1"; function buildTable(name,value,age,years){ docBody = document.getElementsByTagName('body').item(0) theForm = document.getElementById('frm'); for (i = 0; i < 1; i++){ myTable = document.createElement('table') myTable.id = name + counter; //myTable.border = 1 myTable.setAttribute('cellspacing','5'); myTable.setAttribute('cellpadding','2'); myTable.setAttribute('border','0'); myTableBody = document.createElement('tbody') myLink = document.createElement('a') row = document.createElement('tr') row.setAttribute('class','landing'); for (j = 0; j < 2; j++){ //cell = document.createElement("TD") //cell.setAttribute("WIDTH","50") //cell.setAttribute("HEIGHT","50") myInputTag = document.createElement('input') if (j < 1){ textVal = value; cell = document.createElement('td') cell.setAttribute('class','landing'); cell.setAttribute('width','150') myInputTag.setAttribute('id',name+counter); myInputTag.setAttribute('type', 'hidden'); myInputTag.setAttribute('name',name + counter); myInputTag.setAttribute('value',value); } else { textVal = years; cell = document.createElement('td') cell.setAttribute('class','landing'); cell.setAttribute('width','50') cell.setAttribute('align','center') myInputTag.setAttribute('id',age+counter); myInputTag.setAttribute('type', 'hidden'); myInputTag.setAttribute('name',age + counter); myInputTag.setAttribute('value',years); } theForm.appendChild(myInputTag); textNode = document.createTextNode(textVal) cell.appendChild(textNode) row.appendChild(cell) } cell = document.createElement('td') cell.setAttribute('class','landing'); cell.setAttribute('width','50') cell.setAttribute('align','center') //cell.setAttribute("HEIGHT","50") myLink.setAttribute('href','java script:removeElement(\''+name+counter+'\',\''+age+counter+'\');'); var linkText=document.createTextNode('REMOVE'); myLink.appendChild(linkText); cell.appendChild(myLink) row.appendChild(cell) myTableBody.appendChild(row) counter++; } myTable.appendChild(myTableBody) x = document.getElementById('landing') x.appendChild(myTable) //theForm.appendChild(x) } Let me explain this code. basically what it does is, someone puts in a name and age and clicks a button and it makes a table inside a div. It works inside IE perfect, only problem is, it doesn't work in firefox. any ideas
Calling a function twice, help appreciated   (186 Views)
Let's see... Add these two numbers: Start! > Diagnostic Page< Check! Subtract these two numbers: > Pick! Check! , :) I must thank you for your help. It has opened my eyes to how much easier java script is than jquery, I cannot understand why they call it "write-less" do-more lol :p If I would like the same function implement a subtraction, a division and a multiplication, what would be a better way to write the code Would it be better to have the same function with a different operation( -, * ,/) I want the user to stop at 3 strikes with the addition function, and use that number to send it as a string to another java script page so I can determine a user's math level, is this possible
passing selected radio button value from js to java   (423 Views)
Hi all, I have two radio button yes,no in a.jsp. var IncludeCharges = document.getElementById("IncludeCharges_no").value; If i select yes i need to pass 1 to the java file and in case of no i need to pass 0. but when i retrive the radio button value using int Includecharges = Integer.parseInt(request.getParameter("IncludeCharges_yes"); It shows undefined... How could i get the value
CSS Accordion Menu - Javascript help needed   (220 Views)
, I have put together an accordion menu using css, html (ul, li tags) and javascript. I'd like the arrows on the collapsible menus should change state depending on if they're open or not. The triangle turner should point right when the content is closed and can be opened. The triangle turner should point up when the content is open and can be closed. But I'm not sure how to replace this arrow image css using javascript. css to open menu: level01_top_link_subnav_open css to close menu: level01_top_link_subnav_close I have attached the menu page and its associated files (see the zip file). You can view the menu here: http://praky.com/demo/gui-prototype/accordion/navmenu_accordion.html I'd appreciate if someone can help me with this. Many
Reload/Redirect to a form without losing data   (187 Views)
I'm working on a contact form. I have the form being checked by a PHP script once it's submitted. If the script finds an error, it will load a new page with the error message and then redirect back to the form after 10 seconds so the user can correct the error. The problem is that when the form reloads, it is blank. How can I have the form reload and keep the entered data This is what I'm using now: window.setTimeout("window.location = './contact.htm'", 10*1000 );
change window attributes in body onload..   (193 Views)
hello peeps i need help on this.. can i change the window attributes (scrollbar,width,height,etc..) during page load or onloadi know that i can do this in window.open function but is it possible to do that in onload when the page is already opened thnx hope you can help me
How to simultaneously animate two divs in Jquery - JavaScript Help   (199 Views)
Hi ,here is an example of what I want to do: http://cam-it.com/test.htmlBut here is what happens when I try to do that with two divs http://cam-it.com/test2.htmlWhy is this happening here is the code for the first body { background-color:#000000; } #square{ width:356px; height:52px; border: 1px solid red; background-image:url(images/ANIMATEINS.png); background-repeat:no-repeat; position:relative; } #container{ margin:100px auto; width:356px; height:52px; background-image:url(images/ANIMATE.png); background-repeat:no-repeat; position:relative; border:1px solid blue; } #square2{ width:356px; height:52px; border: 1px solid red; background-image:url(images/ANIMATEINS.png); background-repeat:no-repeat; position:relative; } #container2{ margin:100px auto; width:356px; height:52px; background-image:url(images/ANIMATE.png); background-repeat:no-repeat; position:relative; border:1px solid blue; } #box { border: 1px solid #FF0000; } var $square = $("#square"); bounce(); function bounce() { $square.animate({ left: "+=170" }, 1000, function() { /**new command**/ $square.animate({ left: "-=170" }, 1000, function() { bounce(); }) /**end command**/ }); } And here is the code for the second: body { background-color:#000000; } #square{ width:356px; height:52px; border: 1px solid red; background-image:url(images/ANIMATEINS.png); background-repeat:no-repeat; position:relative; } #container{ margin:100px auto; width:356px; height:52px; background-image:url(images/ANIMATE.png); background-repeat:no-repeat; position:relative; border:1px solid blue; } #square2{ width:356px; height:52px; border: 1px solid red; background-image:url(images/ANIMATEINS.png); background-repeat:no-repeat; position:relative; } #container2{ margin:100px auto; width:356px; height:52px; background-image:url(images/ANIMATE.png); background-repeat:no-repeat; position:relative; border:1px solid blue; } #box { border: 1px solid #FF0000; } var $square = $("#square"); bounce(); function bounce() { $square.animate({ left: "+=170" }, 1000, function() { /**new command**/ $square.animate({ left: "-=170" }, 1000, function() { bounce(); }) /**end command**/ }); } var $square2 = $("#square2"); bounce(); function bounce() { $square2.animate({ left: "+=170" }, 1000, function() { /**new command**/ $square2.animate({ left: "-=170" }, 1000, function() { bounce(); }) /**end command**/ }); }
Jquery validating radio button - JavaScript Help   (138 Views)
I am trying to validate radio buttons for gender using Jquery, but have no clue as to how I go about doing it, the different ways I've tried do not seem to work> anybody have any help.I have included the form part for the gender radio buttons. Gender /> Female
Extending a jQuery plugin - JavaScript Help   (254 Views)
I have a default plugin(function($) { $.lsc = function (json) { $.lsc.vars = json; if (json['toolbar']) $.lsc.toolbar (); } //Create essential functions $.extend ($.lsc, { init: function () { //some code }, }); });This appears to work fineNow when my whole project is in debug mode, a seperate javascript file is loaded with the following(function($) { //Create essential functions $.extend ($.lsc, { toolbar: function () { alert(1); }, }); }); But I get the following error: $.lsc.toolbar is not a functionHow can I create a plugin and extend in a seperate file with additional functions when my project is in debug modeI have never written a jQuery plugin before and struggling to get my head round it
Image loader - JavaScript Help   (112 Views)
Is it possible to create a textbox where you can insert urls of images (unlimited, so there's no maximum amount of images) then click submit and you have a webpage full of thumbnails that are clickable to make full siz
Re Parse Div In Page   (136 Views)
Hi I have this div and I AJAX html into it, the problem is that the AJAXed html does not interact correctly with the rest of the page. I think i need to re parse the div, but not sure... Does anyone know how to have it parse the div or a better way to fix this This is the div that the html is AJAXed into:
selecting ticked checkboxes with jquery   (210 Views)
Hi peeps, quick question. I am debugging a script in IE (it's producing errors and I suspect it might be down to the selectors) and I was wondering if the below is correct. Guven the following html Compare the Toyota range fruit type Petrol Diesel Hybrid Another type Manual Automatic I want to select the checked tickboxes in the jquery fragment below: var $theFirstFilter = $("#fruit_filter").find("#first_filter input[type=checkbox]:checked"); var $theSecondFilter = $("#fruit_filter").find("#second_filter input[type=checkbox]:checked"); Is this the correct way to select the checked tickboxes I mean is this syntax input[type=checkbox]:checked correct I have seen this done in many different ways and I am not sure what's good or bad. cheers
Re: open and close a window   (209 Views)
sheldonlg wrote on 11 jun 2008 in comp.lang.javascript : > Does anyone know how to open a window and have it close by itself You > may ask why, but here it is. I want to have it open (a ...
best way to load arrays with large amounts of data?   (172 Views)
I'm working on an application that requires a lot of internal data - short texts, numbers, switches etc. At the moment the only way I have of loading these is long lines of Array[1,2,3 etc]=The Data. In the VB version ...
xmldom getAttribute firefox problem   (140 Views)
Hi all I am trying to get a url attribute from an xml node: I can do this in IE with the following code: var newDom = xmlhttp.responseXML; var x = newDom.getElementsByTagName("item"); var urlNode = ...
Button with onClick inside Form (with Submit Button)   (128 Views)
In Internet Explorer, I get the error message "Object Expected" when we click on the button ("Text") when I click in Internet Explorer. In Mozilla, clicking the button invokes the Action (recordurlvote.scgi) .. (Obviously, this is a simplified version of ...
Some simple help please.   (109 Views)
I'm not a coder, and this is the only suggestion I've had for a forum to help me. I'm having a problem with java on my browsers...mainly IE, but Netscape, Firefox and to a lesser degree Opera. Any java is ...
Cuffs - code and effect comment?   (496 Views)
, and js -dates.htm, and some Easter pages, now include . function Cuffs() { var ThisPage, ThisSite, J, DLJ, HREF ThisPage = location.href.replace(/#.*/, "") ThisSite = location.protocol + "//" + location.hostname + "/" for (J in document.links) ...
Calling a Function On load of a HTML Jquery Mobile?   (167 Views)
I tried $('#page18').bind("load",function() { alert("total Type") ; }); and also i tried doing this $('#page18').ready( function() { alert("total Type") I want to call a function on Load of a Html5 Jquery Mobile page. I have various Div with Each of them has Id.Now with navigation when I reach on i want to cal a function ... }); But cant seem to fig it out. can anyone help me with this
newbie: how to compare form input to variable value?   (186 Views)
, In my form validation, I'm testing a form input field to see if it contains the same number as a variable contains. if the variable is called "match1", and my user text field is named "guess1" I'm trying to ...
SkimpyGimpy PNG canvas w/ Javascript mouse tracking   (317 Views)
ANN: SkimpyGimpy PNG canvas has Javascript mouse tracking The SkimpyGimpy PNG image canvas now can generate Javascript data structures which allow HTML pages to intelligently respond to mouse events over the image. Please read about the SkimpyGimpy Canvas and look ...
JavaScript "objects" to extend HTML Elements   (231 Views)
Hi! I create HTML pages on the server side. I want to extend DIV elements with more information. E.g.:
Now I want Joe to have an age for example and access it using: $('joe').age = 20; Doing ...
javascript function to display message   (149 Views)
So i need to write or modify javascript code i think, for what i want to do. The web page im developing displays a table with two arrows beneath, one to go show next and one to show previous. I need the show previous arrow to display an alert box if the user selects it when the page is first loaded (they cant show previous because nothing has been shown yet). Again similar for the show next arrow, if the user selects it when the last name is displayed in the table then it should show a message saying no more names. I've no idea how to do this and it sounds like it should be easy. The code i have is: COM301 var studentNames = new Array ("Jack Dee", "Ruby Wax", "Billy Connolly", "Miranda Hart", "Al Murray"); var regNumbers = new Array ("10001", "10002", "10003", "10004", "10005"); var currentStudent = -1; function showNext() { currentStudent=currentStudent+1; document.getElementById("nameHolder").innerHTML=studentNames[currentStudent]; document.getElementById("regNumberHolder").innerHTML=regNumbers[currentStudent]; } function showPrevious() { currentStudent=currentStudent-1; document.getElementById("nameHolder").innerHTML=studentNames[currentStudent]; document.getElementById("regNumberHolder").innerHTML=regNumbers[currentStudent]; } COM301 Assessment 4 - Event-driven programming Useful Links Click here for Google Click here for BBC StudentName Registration Number A good place for a footer This is not homework or anything. I am a university student and trying to get my skills up to scratch before I start placement.
Writing JavaScript to HTML page   (183 Views)
I want to output some Javascript onto a HTML page. I am trying to put the date that the page was last modified onto the bottom of the HTML page, using the document property 'lastmodified'. Currently my code looks like this: This page was last modified on: document.write(document.lastModified) I want to move this text to the right hand side of the page and I thought I could do that using a span class, however, it seems that this doesn't work. I suspect that I have to use 'getElementById()', if so, could someone explain to me how this works Thank for your help.
Problem with CKEditor being called multiple times via AJAX   (125 Views)
all, I know this is a long shot because I am talking specifically about a third party application but I thought what the hell, someone might be able to point me in the right direction. The problem is with CKEditor a WYSIWYG rich text editor. I have already made a similar post to the CKE forums as well. The setup is this: I have a page that has information that corresponds to an organization. The info is pulled from a database. The page defaults to a "read only" and the info is formated and displayed in HTML( etc). When the user presses an edit button an AJAX call is made and the read-only content is replaced with the response. The response contains a form that has all the organization data(again from the database) but this time in inputs and textareas. It is here I replace the regular text area with a rich one: CKEDITOR.replace('textbox') As I understand it this basically attaches a style of "display:none" to the textarea and adds the editor to the DOM.This happens on load. This works fine. After the save button is clicked the info is saved to the database, another AJAX call is made and the read-only view replaces the form. The problem arises if the edit button is clicked again without a page refresh first. I get the form but where the textarea should be I see nothing. Further inspection revels my textarea is there but has a style of diplay:none but this time it has not been replaced by the rich text editor. It's not that any of the styles or anything that was done on the previous edit sticks on the page elements as it is essentially a new page, I'm thinking this has something to do with data being stored in memory, but am not sure. Again I know it's a long shot here but thought it was still worth the post as someone may have some insight into why this is not working and be able to point me in the right direction. Also apologize for how long winded the post was.
enabling radio buttons   (105 Views)
hey im new here, ive had a little look around the site and google(which mostley braught me to this site) and im having a few problem with some coding for my website. My lecturers (which i pay 3grand a year to attend the university) havent even been able to figure out the problem (what a joke) . . . im pretty sure it because im using notepad and i probably have just missed something so simple!! but anyway :- what im trying to do is using html and javascript is, when a certain radio button on my form is clicked , another set of radio buttons become enabled //find my current code below// _____________________________________________________________________________ Ticket Order Form function returnJourney(form){ if (ticket_order.journeyType[1].checked=="True"){ ticket_order.RetDate[0].disabled=false; } } Please Choose A Date and Time of Departure 11th November @ 08:00 11th November @ 12:00 11th November @ 17:30 12th November @ 08:00 12th November @ 12:00 12th November @ 17:30 Please Choose Whether Your Journey will be a Single or Return Journey SingleReturn Please Choose A Date and Time of Return 12th November @ 09:30 13th November @ 09:30 14th November @ 09:30 15th November @ 09:30 16th November @ 09:30 17th November @ 09:30
Who manages Javascript?   (160 Views)
You know how php, java, mysql, they all have a project page and some sort of foundation that backs. Well who backs javascript I can never seem to find an official js site, one with all the classes/methods/properties, you can find what your looking for but i was wondering if there is some sort of foundation site to it.
Basic Javascript Rollover   (229 Views)
For some reason I cant get my rollovers to work on my web design here's the html http://halffull.free...rash/index.html THE Javascript window.onload = rolloverInit; function rolloverInit() { for (var i=0; i
javascript: void(0)   (141 Views)
java script: void(0) every time i click on some page this error comes in !!! and the site never opens !! help please !!!!
String replacement of file.name - JavaScript Help   (207 Views)
Greetings,I am barely literate in Javascript, but I have done my best to try figuring this out on my own. I am playing with a Drag & Drop uploading script for HTML 5 that i found here: http://www.sitepoint...-drag-and-drop/I have been able to get the script 95% set up to allow uploads, but it has a problem parsing when it comes to dealing with white space. If an uploaded file has spaces in the name, the name output stops at the first whitespace.As I said above, i have gone through many blogs and posts in the past several hours trying to figure the best way to do a string replace, but my ignorance of JS limits me on how to find the proper place for this. However, I think it has to belong in here: // Output link Output( "" + file.name + "" );/* filedrag.js - HTML5 File Drag & Drop demonstration Featured on SitePoint.com Developed by Craig Buckler (@craigbuckler) of OptimalWorks.net */ (function() { // getElementById function $id(id) { return document.getElementById(id); } // output information function Output(msg) { var m = $id("messages"); m.innerHTML = msg + m.innerHTML; } // file drag hover function FileDragHover(e) { e.stopPropagation(); e.preventDefault(); e.target.className = (e.type == "dragover" "hover" : ""); } // file selection function FileSelectHandler(e) { // cancel event and hover styling FileDragHover(e); // fetch FileList object var files = e.target.files || e.dataTransfer.files; // process all File objects for (var i = 0, f; f = files[i]; i++) { ParseFile(f); UploadFile(f); } } // output file information function ParseFile(file) {} // upload .Torrent files function UploadFile(file) { // following line is not necessary: prevents running on SitePoint servers if (location.host.indexOf("sitepointstatic") >= 0) return var xhr = new XMLHttpRequest(); if (xhr.upload && file.type == "application/x-bittorrent" && file.size
jQuery .attr Error - JavaScript Help   (193 Views)
I have a function that grabs the title from a li and split what ever the title up that is seperated by a '|' function RemoveFunction(data) { var get = $(data).attr("class"); var getitem = $(data).closest("li"); var cat = $(getitem).attr("title"); console.log($(cat)); var cats = cat.split('|'); This just returns blank on console, but yetconsole.log($(getitem).attr("title"));Outputs correctly in console :sAny ideas
simple jquery conditional response-to-comment form display - JavaScript Help   (161 Views)
I am looking to compare the data-commentid attribute process in javascript after user slideToglle function. I want to compare that value attribute in each interaction with $id variable within the php. if $id = commentid data attribute in the span tag then display the response. I am not sure whether to do the comparison in php or javascript. an example or idea is if(after slideToggle, write a response, submit the form with the response then compare $id == $idc) that would be the sequence. if $id == $idc then display the response and only then.Any idea code I have so far is as below. ' . $ufirstname . ' • ' . $message_date . ' hi how you doing today id=101
Form element dynamic changes - JavaScript Help   (201 Views)
. Total rookie in JScript here. I've a form, here are three of the elements: Type: Object 1 Object 2 Object 3
Disabled = true doesn't work - JavaScript Help   (139 Views)
once I toggle the select all button on it enabled the another button, but once I toggle the select all button often it doesn't disable my other button. function selectall (pm) { var messages= document.getElementById('pm'); if (checked == false) { checked = true; document.getElementById('multiple_action').disabled = 'enabled'; document.getElementById('drop_button').setAttribute("class", "drop_button"); } else { checked = false; document.getElementById('multiple_action').disabled = true; } for (var i =0; i < messages.elements.length; i++) { messages.elements[i].checked = checked; } } checked=false;
Javascript Survey Before Downloading - JavaScript Help   (89 Views)
, I've Searching for a while to find the code they use for the survey on this site before downloading: http://xboxfreegames...e-download.html But I could't find him. Does somebody know this or a similar code for my site.
Sliding tab? - jQuery - JavaScript Help   (106 Views)
I have tried a lot of things with jquery to do this. Basically I have div content with a title and only the title shows as a tab at the bottom of the page. When the user hovers over the tab, I want the entire div (including the title) to slide up to reveal the rest of the div. So essentially a div of height 100px might only show 20px (title) until you hover over when it slides up and reveals the entire thing. Any ideas how
set if statement for mousedown - JavaScript Help   (150 Views)
,My question is, is it possible to create an if statement for div.onmousedown that will then excute document.onmousemove call function. var div = document.getElementById('div'); document.onmousedown = eventHandler(); function eventHandler(){ if(div.onmousedown){ document.onmousemove = moveFunction(); } } The reason I ask this is that i have a script that moves a div in a certain area and need the div to move even if the mouse is not inside it. This mouse down function is not the only one so i need something that can work with multiple mouse functions depending on wat one wat clicked etc
new to jQuery, tips on what to start with - JavaScript Help   (119 Views)
i've recently read a bit about jQuery, and started to write some code today, this is what i came up with so far: $("#mydiv").click(function() { if($(".myclass").is(":hidden")) { $(".myclass").slideDown("slow"); } else { $(".myclass").slideUp("slow"); } });superbasic stuff that slides down a on click.well, i'd love some tips on what to do next, something not to advanced and maybe even some pointers on what to look at to get the script done.
line of jquery REGEX, need to allow lowercase as well as uppercase - JavaScript Help   (132 Views)
hey,im no good with js. i have this line which is from position-absolute's jquery validator. $.validationEngineLanguage.allRules["postcodeUK"] = { // UK zip codes "regex": /^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9][ABEHMNPRVWXY0-9] {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$/, "alertText": "* Invalid postcode, please use capital letters and a space." }; currently it only accepts, as you can see, caps, how do i allow lower case toothis doesnt work, any ideas $.validationEngineLanguage.allRules["postcodeUK"] = { // UK zip codes "regex": /^([Aa-PpRr-UuWwYyZz0-9][Aa-HhKk-Yy0-9][AaEeHhMmNnPpRrTtVvXxYt0-9][AaBbEeHhMmNnPpRrVvWwXxYy0-9] {1,2}[0-9][AaBbDd-HhJjLlNn-UuWw-Zz]{2}|GgIiRr 0AaAa)$/, "alertText": "* Invalid postcode, please use capital letters and a space." };