SEARCH YOUR SOLUTION HERE  

Change table row height

, once again I have a Javascriptin' problem!

In my table I have a row which is hidden like so...
Error: Unknown Error
(The slashes are because It's rendered from a PHP script)
Linked CSS classes:
.fsa { text-align: right; } .err { color: #FF0000; display: none; visibility: hidden; }

This makes the row completely hidden and not even a space where it should go.
It's then made visible with Javascript like so:
nameErrC.style.display='block'; nameErrC.style.visibility='visible'; nameErr.innerHTML='Please enter your name.';

This also works fine. Now it's visible I want to hide it again when they start to type in the nearby input text box. So this is my code for that ..


function updateCheck(x){ var nameErrC=document.getElementById('err_nameC'); if(x==document.details.ord_name){ nameErrC.style.dislay='none'; nameErrC.style.visibility='hidden'; }

Now, when they type into the text box the table row disappers like it should do, but it leaves a space where it was, almost like it's just turned blank but is still there. Is there anyway to make it disappear like it was at the start

I tried changing it's height but that doesn't work, when I tested the same height changing function on a visible table it worked so it can't seem to change the height of the "ghost row" as it doesn't exist.

Hope this isn't too confusing to understand

Posted On: Monday 24th of December 2012 12:04:03 AM Total Views:  306
View Complete with Replies




Related Messages:

Help: Only last loaded javascript runs   (110 Views)
I am having a problem getting two javascript snippets to run on a single html document. Whichever one is loaded last (further down in the html doc) runs fine. I am not any kind of javascript expert and would appreciate any help here.
Reorder divs to their original position if window size is > this v   (202 Views)
Hi Everyone, I need some help in reordering the divs to its original place when the window size is greater than some value. so what I am doing is onresize i am getting window size and if window size is < 880px value than I am reordering divs. Now I want to reorder those divs to their original size onresize and if window size is > 880px. so can someone please help me with that I am using following example code: var div1 = document.getElementById('div1'); var div4 = document.getElementById('div4'); var parent = div1.parentNode; parent.insertBefore(div1, div4);
Radio/conversion help   (219 Views)
This post has been edited by Jessicafigueroa: 03 March 2010 - 04:02 PM
jQuery - Hover on a Parent div to FadeIn/Out Child div select problem   (136 Views)
Webdesigners, I really have no idea why this isn't working, I've tried everything, by using .next(), .sibling(), .parent(), .children(). Non of them seemed to worked. .child { display:none; } Parent 1 - Child 1 Parent 2 - Child 2 Parent 3 - Child 3 $( function() { // NON OF THESE WORK $('.parent').hover( function() { $(this).next('child').fadeIn('slow'); }, function() { $(this).next('child').fadeOut('slow'); } ); $('.parent').hover( function() { $(this).parent().next('child').fadeIn('slow'); }, function() { $(this).parent().next('child').fadeOut('slow'); } ); $('.parent').hover( function() { $(this).sibling('child').fadeIn('slow'); }, function() { $(this).sibling('child').fadeOut('slow'); } ); $('.parent').hover( function() { $(this).parent().sibling('child').fadeIn('slow'); }, function() { $(this).parent().sibling('child').fadeOut('slow'); } ); $('.parent').hover( function() { $(this).children('child').fadeIn('slow'); }, function() { $(this).children('child').fadeOut('slow'); } ); $('.parent').hover( function() { $(this).parent().children('child').fadeIn('slow'); }, function() { $(this).parent().children('child').fadeOut('slow'); } ); } ); I know fadeIn automatically displays a display:none class, so probably that is not the problem. Can anyone help me find what is missing here Thank you for your help EDIT: What does work is by just using the .css() or pure CSS parent:hover, but there is no animation which defeats the purpose of using jQuery This post has been edited by ernestlwl: 21 April 2012 - 11:10 PM
Help with switch statement   (142 Views)
Q:Create a switch statement which includes the following statement: User will input the rating using window.prompt and the message will be printed are as follows: AAA Print Highest quality AA -Print High Quality BBB Print medium BB - Print Speculative B Print Highly Speculative Other than that Print Invalid Input me:what have i done til cant get the output ;/ var rating = prompt("Please enter either single/double/triple case A or B"); switch (rating) { case "AAA"; alert("Highest Quality"); break; case "AA"; alert("High Quality"); break; case "BBB"; alert("Medium"); break; case "BB"; alert("Speculative"); break; case "B"; alert("Highly Speculative"); break; default; alert("Invalid Input"); }
Difference Between Date Fields   (132 Views)
hi how to calculated the difference between two date feild(inputed by user using datepicker) format (yyyy-mm-dd).and store in another feild. As i tried to do but not able to get it Attached File(s) test.php (1.36K) Number of downloads: 102 t2.php (1.3K) Number of downloads: 105 s1.php (1.58K) Number of downloads: 107
reset the default values in the table   (227 Views)
Hi Guys , I'm trying to program a reset button so that when the user clicks on it , the default values will be restored but the only problem is that the cells are returning undefined but are showing in the correct cells . Here is my code for that . Here , the function ResetGrid() is the problem.
Mootools and Prototype   (119 Views)
Question: Is there a way to make the Mootools and Prototype compatible to each other If this is possible What are the possible solutions Ps. Don't give me codes. Just info.
Making sure Email Addresses match   (127 Views)
all, I'm having a bit of a problem here. I'm brand spanking new to Java (mainly a graphic designer) but need to get some java validation working on a page at work. I've been able to get the form to recognize that certain fields need to be filled out, however I can't figure out what or where to put coding to get the EMAIL & CONFIRM EMAIL fields to match (more or less just like what's on the sign up page here. The current java script is here: And the form that it's validating is this: Agency Info Agency Name: Contact Person: Email: Confirm Email: Phone Number:
2 scripts, same page, neither loads   (128 Views)
hey, been scratching my head over this for a couple hours, see if yall can give insight. its been forever since i have touched js, so i have a script my dad wants to work on both sides of his main header, if you have one on a page, it works fine, put on the 2nd and it dies. i figured it was overlapping variables, or function names so i went through and added a '2' to each variable and function name, but still no dice. same effect. actually now after some more messing around, if i have just the one on the left on the page, it loads and works, if i add in the one on the right only the right one works. its alot of code down here but any help would be greatly appreciated. and remembered, its double, so only half as long as it looks Untitled Document // CREDITS: // Image Scroller 2.03 with double-fade effect // By Peter Gehrig // Copyright (c) 2003 Peter Gehrig. rights reserved. // Permission given to use the script provided that this notice remains as is. // Additional scripts can be found at http://www.24fun.com // info@24fun.com // 9/6/2002 // IMPORTANT: // If you add this script to a script-library or script-archive // you have to add a highly visible link to // http://www.24fun.com on the webpage // where this script will be featured // URLs of slides var slideurl2 =new Array("pic1.jpg","pic2.jpg","pic3.jpg","pic4.jpg") // comments displayed below the slides var slidecomment2=new Array("Mary","Jane","Rita","Tina") // links for each slide var slidelink2=new Array("http://www.yahoo.com","http://www.google.com","http://www.altavista.com","http://www.24fun.com") // targets of the links. owed values: "_parent", "_top", "_blank", "_self" var slidetarget2=new Array("_blank","_blank","_blank","_blank") // the width of the slideshow (pixels) var scrollerwidth2=245 // the height of the slideshow (pixels) var scrollerheight2=75 // width of the transparent zones (pixels) var translayers2zone2=0 // font-attributes for the comments var slidefont2="Arial" var slidefont2color="blue" var slidefont2size="2" // background-color of webpage var pagebgcolor2="#FFFFFF" // do not edit below this line var translayers2width=1 var translayers2max=Math.floor(translayers2zone2/translayers2width) var translayers2leftpos=0 var translayers2opacity=100 var translayers2factor=100/translayers2max var translayers2widthall=translayers2max*translayers2width var allpicturewidth2 var distancepictopic2=0 var scrollerleft2=0 var scrollertop2=0 var pause2=20 var step2=2 var newstep2=step2 var clip2left,clip2right,clip2top,clip2bottom var I_picture2=0 var timer2 var picturecontent2="" var ns4=document.layers1:0 var ns6=document.getElementById&&!document.all1:0 var ie=document.all1:0 var browserinfos=navigator.userAgent var opera=browserinfos.match(/Opera/) var preloadedimages2=new Array() for (i=0;i=scrollerleft2-allpicturewidth2) { document.all.picturediv2.style.posLeft-=step2 clip2right+=step2 if (clip2right>scrollerwidth2) { clip2left+=step2 } document.all.picturediv2.style.clip2 ="rect("+clip2top+" "+clip2right+" "+clip2bottom+" "+clip2left+")" var timer22=setTimeout("scrollpicture2()",pause2) } else { resetposition2() } } if (ns6) { if (parseInt(document.getElementById('picturediv2').style.left)>=scrollerleft2-allpicturewidth2) { document.getElementById('picturediv2').style.left=parseInt(document.getElementById('picturediv2').style.left)-step2 clip2right+=step2 if (clip2right>scrollerwidth2) { clip2left+=step2 } document.getElementById('picturediv2').style.clip2 ="rect("+clip2top+" "+clip2right+" "+clip2bottom+" "+clip2left+")" var timer22=setTimeout("scrollpicture2()",pause2) } else { resetposition2() } } if (ns4) { if (document.roof2.document.picturediv2.left>=scrollerleft2-allpicturewidth2) { document.roof2.document.picturediv2.left-=step2 document.roof2.document.picturediv2.clip2.right+=step2 if (document.roof2.document.picturediv2.clip2.right>scrollerwidth2) { document.roof2.document.picturediv2.clip2.left+=step2 } var timer2=setTimeout("scrollpicture2()",pause2) } else { resetposition2() } } } function onmsover2() { step2=0 } function onmsout2() { step2=newstep2 } function resetposition2() { if (ie) { document.all.picturediv2.style.posLeft=scrollerleft2+scrollerwidth2 clip2left=0 clip2right=0 document.all.picturediv2.style.clip2 ="rect("+clip2top+" "+clip2right+" "+clip2bottom+" "+clip2left+")" scrollpicture2() } if (ns6) { allpicturewidth2=document.getElementById('emptypicturediv2').offsetWidth document.getElementById('picturediv2').style.left=scrollerleft2+scrollerwidth2 clip2left=0 clip2right=0 document.getElementById('picturediv2').style.clip2 ="rect("+clip2top+" "+clip2right+" "+clip2bottom+" "+clip2left+")" scrollpicture2() } if (ns4) { document.roof2.document.picturediv2.left=scrollerleft2+scrollerwidth2 document.roof2.document.picturediv2.clip2.left=0 document.roof2.document.picturediv2.clip2.right=0 scrollpicture2() } } picturecontent2="" picturecontent2+="" picturecontent2+="" for (i=0;iscrollerwidth) { clipleft+=step } document.all.picturediv.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("scrollpicture()",pause) } else { resetposition() } } if (ns6) { if (parseInt(document.getElementById('picturediv').style.left)>=scrollerleft-allpicturewidth) { document.getElementById('picturediv').style.left=parseInt(document.getElementById('picturediv').style.left)-step clipright+=step if (clipright>scrollerwidth) { clipleft+=step } document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("scrollpicture()",pause) } else { resetposition() } } if (ns4) { if (document.roof.document.picturediv.left>=scrollerleft-allpicturewidth) { document.roof.document.picturediv.left-=step document.roof.document.picturediv.clip.right+=step if (document.roof.document.picturediv.clip.right>scrollerwidth) { document.roof.document.picturediv.clip.left+=step } var timer=setTimeout("scrollpicture()",pause) } else { resetposition() } } } function onmsover() { step=0 } function onmsout() { step=newstep } function resetposition() { if (ie) { document.all.picturediv.style.posLeft=scrollerleft+scrollerwidth clipleft=0 clipright=0 document.all.picturediv.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrollpicture() } if (ns6) { allpicturewidth=document.getElementById('emptypicturediv').offsetWidth document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth clipleft=0 clipright=0 document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrollpicture() } if (ns4) { document.roof.document.picturediv.left=scrollerleft+scrollerwidth document.roof.document.picturediv.clip.left=0 document.roof.document.picturediv.clip.right=0 scrollpicture() } } picturecontent="" picturecontent+="" picturecontent+="" for (i=0;i
Table with sum   (116 Views)
Okay, so I'm taking a class in web technologies, and we're working with some basic Java. The assignment is to have numbers 1-10 and their squares fill into a table... Then to have them sum at the end. My problems are: How do I change the orientation on the table output to go up and down instead of left to right Do I have to write another for or while loop to get the sum's for these numbers, or can I do it from within what I've already written Suggestions would be awesome! The book they gave us is pretty generic. Sorry for the excess code that is commented out... toying around with other options to get to the solution! view source print 01 03 04 05 06 07 08 Table of Squares 09 10 11 12 13 14 15 76 77 78 79 80 Name 81 82
The sale of world famous jacket,Jean-COOGI/DG/gino green global/G-Star and so on   (108 Views)
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 ...
jQuery mobile   (138 Views)
Hi , I'm making my first jQuery mobile app and using a fixed bottom navbar. But the app is acting a little weird. When I tap the background twice, the navbar disappears or moves up a little. how can I fix this problem
toggle table rows   (112 Views)
I am trying to toggle rows in a table based on the selection of a radio button. The functions is as follows: function showHideRows(clsName, hideshow) { var table = document.getElementById('fullTable'); var rows = table.getElementsByTagName('tr'); for(var i=0;i
how to Load image without refreshing whole page   (125 Views)
hello i got alexa charts links from internet today i want to insert them in html form with few button for every chart and want to load new chart once user click another button i mean without reloading entire page ,.... i do not know ajax much more so need help
I want dropdown menu to display right values   (106 Views)
I have two dropdown menus. 1st -> Drop Down Menu (name="optionDrop") has 5 values which are "ABC", "ABCD", "ABCDE", "True or False" and "Yes or No". 2nd -> Drop Down Menu (name="numberDrop") has 5 values which are "","1", "2", "3" and "4". Now this is what I want to achieve: If user select "ABC" from "optionDrop", then only display options "", "1" and "2" If user select "ABCD" from "optionDrop", then only display options "", "1", "2" and "3" If user select "ABCDE" from "optionDrop", then only display options "", "1", "2", "3" and "4" If user select "True or False" from "optionDrop", then do not display DropDown Menu and Display N/A (This I achieved but I want hidden numberDrop to equal 1, I have not achieved that part) If user select "Yes or No" from "optionDrop", then do not display DropDown Menu and Display N/A (This I achieved but I want hidden numberDrop to equal 1, I have not achieved that part) Does anyone know how this can be done and implemented in the javascript code I have Below is Javascript Code: function getDropDown() { var optionDrop = document.getElementsByName("optionDrop"); var na = document.getElementById("na"); var numberDrop = document.getElementsByName("numberDrop"); var answerA = document.getElementById("answerA"); var answerB = document.getElementById("answerB"); var answerC = document.getElementById("answerC"); var answerD = document.getElementById("answerD"); var answerE = document.getElementById("answerE"); var answerTrue = document.getElementById("answerTrue"); var answerFalse = document.getElementById("answerFalse"); var answerYes = document.getElementById("answerYes"); var answerNo = document.getElementById("answerNo"); if (optionDrop[0].value == "abc" || optionDrop[0].value == "abcd" || optionDrop[0].value == "abcde"){ numberDrop[0].style.display = "block"; na.style.display = "none"; }else if (optionDrop[0].value == "trueorfalse" || optionDrop[0].value == "yesorno"){ numberDrop[0].style.display = "none"; na.style.display = "block"; } } Htrml code:
Instant name checking/showing using Ajax/Jquery   (204 Views)
The case scenario is like I have to check all available usernames/names from the databases whenever I type the letters instanly. For example:- When type "je" in the userfield, it should show all combination of names starting with "je" inline. I am attaching a picture as sample. Its indian railway website, where I type name of the train like "ka", it will show all names matching with it inline. [IMG]http://farm3.static.flickr.com/2119/5803687637_48d9717b56_b.jpg[/IMG] I need to implement this feature. any kind help would be appreciated , thanx a lot in advance
Simple ajax not working.   (153 Views)
, I am working on a small assigment but this code just wont work. I dont know what the problem is. Can anyone please debug it. var xmlhttp; function listFriend(){ xmlhttp = false; /* For Firefox*/ if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else /*For IE*/ if (window.ActiveXObject) { try { /*For some versions of IE*/ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { /*For some other versions of IE*/ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!xmlhttp) { alert('Cannot create XMLHTTP instance'); return false; } var delfrnd = document.forms[0].elements["delFriends"].value; var url = "editFriends_ajaxing.phpdelFriends="+delfrnd; alert(delfrnd+" "+url); xmlhttp.open('GET', url, true); xmlhttp.onreadystatechange = theResponse; xmlhttp.send(null); } //End showUserName function theResponse(){ alert("entering the function theResponse,readystate= "+xmlhttp.readyState+"status="+xmlhttp.status); if(xmlhttp.readyState==4) { if(xmlhttp.status==200) { alert("inside the iffs"); var xmlDoctext=xmlhttp.responseText; alert("xmlDoctxt is \n"+xmlDoctext); var xmlDoc=xmlhttp.responseXML.documentElement; var rootElement=xmlDoc.documentElement; alert("xmldoc = "+xmlDoc); var htmlArray=[];//An array in which to accumulate HTML fragments in lieu of String += "....". htmlArray.push("Friend NameSelect to Delete"); var length=xmlDoc.childNodes.length; alert("htmlArray is \n"+htmlArray); for(var i=0; i
Changing the cursor position.   (151 Views)
Dear all, I m using a div to show menus on master page . Div contains the html table whcih has 2 rows showing the main(Parent) menus(Master,Reports). Each row contains html table with 4 or more rows(tr) which shows their respective sub-menu. Onmousehover of image I m showing the div. Onmouseleave of div I m hiding the div i.e when user leaves the div ,div gets hide. Master menu is at top,below it is Report menu in div. When i click on Master Menu their submenu get opens which has 10 submenues . But when i click on Report Menu(Report menu has 4 sub menus) Their submenues are opened & Master Menu if already opened should be closed. As soon as I click the Report menu it opens its submenu and closes the submenu of master. The problem is that the div size gets mimimizes(which is correct) and cursor remain out of the div . and calls the Onmouseleave function for hiding the div Therefore user cannot see the report submenu. how should I stop this from happening I got one solution i.e To keep the cusror along with its main(Parent) menus ,so how to acheive that Or Can any one help me how to move the cursor position in webpage.
Ajax/Php Poll   (99 Views)
I was looking for a poll script (php/ajax) that does not reload when adding a vote. I've tried to search around for it but haven't found one that suits my needs. Anyone that knows where I can find such a script
Two Submit Buttons -- One PHP Destination   (137 Views)
Ok, I know this has to be simple. My Javascript skills are very weak (will become obvious in the code.) What I'm trying to do is use two Submit buttons in a form. The called function I want to send one named variable if one Submit is clicked and another named variable if the other button is clicked. The examples I've seen make it simple -- just use two destination PHP files. But isn't it possible to send just post ONE (the name connected to the button clicked) to the PHP file to use I know the PHP has to be set up, ready to Post whatever comes it's way (using variable would be really neat but can't transfer a JS variable to PHP file I guess). What happens below is that no matter WHICH button is pushed, both seem to be sent. function decide_action() { x = document.pressed if (x == "First") { myname =document.forms['frm1'].elements['firstname'].value; document.frm1.action ="two.php"; } else if (x == "Last") { myname=document.forms['frm1'].elements['lastname'].value; document.frm1.action ="two.php"; } } CAN this work
Adbrite Java Ad Code Amendment Needed!   (292 Views)
Dear brothers I want that my adbrite inline text ads open in new window, so its need ad code alteration. Can anyone here alter this given below code so that ads open in new window.
HTML radio buttons   (141 Views)
, I have a very interesting issue that I want to solve but I need some help because I do not know if it is possible. I am using some radio buttons on my website, but instead of the user actually clicking a radio button to set it as "checked" I need to make it so that they can click on a link and it will check the radio button. Don't even ask why, it is a very silly project, but it needs to be done. Please let me know if you know how to do this. Is there any way possible to just have an if-else statement like: if(linkclicked) then set radiobutton1 = checked If so please let me know.
how to add text field if we select option from selection?   (120 Views)
hello, i am sofie. here is my code. No of Partipants: -Select participant- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 More so here is what i want to ask. if a user select 1 then one text area will be displayed. if 2, then two text will be displayed. i have tried some coding but ity takes a lot work to do. so i hope you can help me.
change content with jquery?   (235 Views)
Hi i'm doing a project for college using jquery, i'd like to dynamically update a section when a link button is clicked without reloading the page, the content fades out and the new content fades in, but when i click on a link the content fades out but the new content doesn't fade in, any suggestions, is there a better way of doing this $(function() { var newHash = "", $mainContent = $("#main-content"), $pageWrap = $("#page-wrap"), baseHeight = 0, $el; $pageWrap.height($pageWrap.height()); baseHeight = $pageWrap.height() - $mainContent.height(); $('#list_nav li a').click(function() { window.location.hash = $(this).attr("href"); return false; }); $(window).bind('hashchange', function(){ newHash = window.location.hash.substring(1); if (newHash) { $mainContent .find("#guts") .fadeOut(500, function() { $mainContent.hide().load(newHash + " #guts", function() { $mainContent.fadeIn(500, function() { $pageWrap.animate({ height: baseHeight + $mainContent.height() + "px" }); }); $("nav a").removeClass("current"); $("nav a[href='"+newHash+"']").addClass("current"); }); }); }; }); $(window).trigger('hashchange'); });
brief walk through AJAX??   (306 Views)
daniweb users, i would like a brief walk through on AJAX if you'll can, i already looked through the post and didn't find what i was looking for, i would like to know how to refresh evertying on a web page but the header, which contains the navigation bar that way only the content info is refreshed,
edit caption of image in lightbox   (201 Views)
hello ! im just wondering if it is possible to edit the caption of an image while it's being viewed through lightbox
Create a timer for php pages   (150 Views)
i want to create a timer for my php page i created the page that only 20 second i want that the time should be as 00:00:20 (hh:mm:ss) plz help my scipt are.......................................................................................................... Time Left: var myTime = 20; function countDown() { document.form.seconds.value = myTime; if (myTime == 0) { location.href="trivia1.php"; } else if (myTime > 0) { myTime--; setTimeout("countDown()",1000); } } countDown();
banner in ajax   (187 Views)
Hi all.. i want to create a banner in my website using asp.net and ajax.. banner will consist of many banners and have the paging under the banner that moving y itself.. what we call it i cannot find any other example yet because i dont know the name of that application..
javascript or ajax which one?   (157 Views)
hello :-)i want to have your opinion.im going to design a site for a car showroom .which includes a search form,the problem im facing is that there are two combo box one for the make and one for the model.so when the user selects the make the model combo box will load the related models. suppose if i choose ford ,in the combo box below the models Mustang,focus will be loaded and once the user clicks the search button the result will be displayed I was told to use ajax but i have no clue of AJAX at all,is there any way to make it happen by using only javascript ,php and sql to have the combo box working This post has been edited by deathmeat: 03 March 2011 - 12:56 PM
text on hover...   (108 Views)
I have found this random image generator. It works well enough for my needs, but now I need the image that this code below generates to have an opportunity to present some simple text to describe what the image it. Basically, if the image is that of a shoe then the text that appears upon hoovering on image would say "jimmy cho' shoes". can someone help me I have tried be keep messing it up.
How do I make a div visible and then invisible   (115 Views)
I understand how to make a div (table) invisible and then visible on a timer.. What I want to do is add a counter to my code and make the table flash 3 times and then stop with the table visible. all my code does right now is make the table flash on and off every 1 second. This is what I have right now: function magic() { var d = document.getElementById('MagicTable'); if (d.style.display == "none") d.style.display = "block"; else d.style.display = "none"; window.setInterval("magic()", 1000); } This post has been edited by spotilator: 30 October 2010 - 09:00 AM
Whats wrong with this while loop?   (124 Views)
while(frames['ghfa'].contentDocument===""); I can't figure it out : / Its basically just supposed to idle while the frame is empty
Thank you   (126 Views)
Thanks
Remove value from input text   (108 Views)
Plz tell me, how to remove particular value from input text in jsp by using javascript. function findSeat() { alert("hi") document.getElementById("sam").value.removeChild(SEW1); alert("remove") } By Himmat
Question about variables   (144 Views)
Hi all; i have script below i would like to ask why there var step=1; outside the function works but inside not anyone explain me pls
worked in one file, not in the other???   (157 Views)
Try to bring it up inside the tags! Some Title And with external script! Simply link it in to your page by doing this... Well that's all for now! Hope it helps you...
How to output java var in html on php page? - JavaScript Help   (137 Views)
Hi.How can i write this. I have a page in a iframe it gets the contents of div from parent page, and outputs it to the title of a window script. I cant get to output the javascript var it only shows as +windowtitle+ .here is my code: (The problem is with window title it outputs as +windowtitle+ ) var windowtitle = document.getElementById(\''.$username.'id\').innerHTML; // i also used plain text to test this but still get +windowtitle+ var url_destination = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\'; var url_ajax = \'http://'.$host.'/chat/'.$username.'/'.$profemail2.'/\'; var online = "CHAT ONLINE"; var offline = \'CHAT OFFLINE\'; document.write(\'\'); ()
Google Dynamic Maps V3 cant place inside div?   (153 Views)
html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } function initialize() { var myOptions = { center: new google.maps.LatLng(51.510559,-0.128431), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } This is the working code for the map im trying to implement into my website. The problem i am getting is that when i place it inside of my col div it will not appear yet if it is not inside of the col div it will display, please look below. Maps - source Google The CSS for both the map and the col are as follows; #col{ background-color:grey; float:left; margin-left:3%; padding:10px; width: 42%; -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; border-radius: 8px; } #map_canvas { height: 100% }
Javascript innerText Span issue   (126 Views)
I'm quite new to javascript, but not at all new to programming. I've been working on an extension in google chrome and I've run into a rather odd problem. Basically I have an html snippet that looks like this Total Questions: Answers Found: Click here to load questions There are two possible states, in one I want the whole QuestionsAnswers div to be hidden and the ClickToLoad to be visible, and in the other I want QuestionsAnswer to be visible and the two spans (questionNumber, answerNumber) to contain the releveant numbers, and ClickToLoad to be hidden. I tried to implement that like this: function AppropriateVisual() { if (!localStorage.QuestionList) { document.getElementById('ClickToLoad').style.display="inline"; document.getElementById('QuestionsAnswers').style.display="none"; } else { document.getElementById('ClickToLoad').style.display="hide"; document.getElementById('QuestionsAnswers').style.display="inline"; document.getElementById('questionNumber').innerText=localStorage.QuestionList.length; if (localStorage.AnswerList) document.getElementById('answerNumber').innerText=localStorage.AnswerList.length; else document.getElementById('answerNumber').innerText="0"; //error here } } The first part works. If there is no QuestionList then only the appropriate elements are shown. However if the reverse is true, both QuestionsAnswers and ClickToLoad are shown. Weirder, the browser reports an error at the marked line saying answerNumber doesn't exist. Furthermore, inspection of the elements on the page show that whenever I set the inner text of questionNumber, answerNumber ceases to exist. What terrible thing have I done
$.getJSON and Global Variables   (132 Views)
I use the following code to retrieve a json file into my code. Temp=new Array(); $.getJSON("document.json", function(data) { console.log(data); x = data.readings.length; for(i=0;i
event handler named clear_click that clears text boxes   (99 Views)
pls help. i am having a dickens of a time figuring out how to add an event handler that clears my text fields when the clear button is clicked. this is the code that ive done but to no avail... thanks pls advise var $ = function (id) { return document.getElementById(id); } var calculate_click = function () { var investment = parseFloat( $("investment").value ); var annualRate = parseFloat( $("rate").value ); var years = parseInt( $("years").value ); $("futureValue").value = ""; if (isNaN(investment) || investment 20) { alert("Annual rate must be a valid number\nand less than or equal to 20."); } else if(isNaN(years) || years > 50) { alert("Years must be a valid number\nand less than or equal to 50."); } else { var monthlyRate = annualRate / 12 / 100; var months = years * 12; var futureValue = 0; for ( i = 1; i
Calling Web Services from independent browser using javascript   (132 Views)
, I'm trying to call some web services only using javascript from a html page. I succeeded on doind this in IE with the use of the behavior:url(webservice.htc); (technique founded in the microsft site) but when i'm going to try ...
Re: How to see source code as rendered (not the script)   (130 Views)
On Jul 2, 3:41 pm, "V S Rawat" wrote: > When I run a javascript in ff 2.0.0.4, the "view source" shows the > javascript that I had put in the html file that is being rendered. Which is ...
formatnumber   (287 Views)
How can I convert the number 123456789 to 123,456,789
Re: [ANN]: NNTP Server slow downs.   (109 Views)
As much as I have liked your windows3.1 for its foresight of network capability. and disliked windows 95. I think your windows Dot Windows thing has reached the known edge of the universe. =========== May God decide on eradication of ...
Take a look at the corrective pack for Microsoft Internet Explorer   (102 Views)
...
Right click and get "copy link address" on javascript redirect   (136 Views)
So here's my situation, I have a div that is clickable and redirects to a page using the window.location.href method. I'm not using anchor tags because within the div, there are other links that can be clicked. So I'm using the onclick redirect for the div, then using stopPropagation to prevent the redirect when links are clicked. The problem is, I would like the javascript redirect to also work like a link. So that when you right click it, you are given the option to copy the link address, as this is significantly more convenient for myself and my users, rather than having to click it first and then copy the URL. Does anyone know how this can be accomplished This post has been edited by itdoell: 30 November 2011 - 04:07 PM
Layering between two JQuery image effects.   (114 Views)
Ok.. i'll start at the beginning so those reading this understand where im at.. My website has a large banner, that rotates between several hardcoded images with a fading effect... This works very well and im very pleased with the result.. (see the onmouseover demo (lower left) from DynamicDrive) I also added an image magnifier Jquery script to the page as well.. Click on the thumbnails and the magnified image fades in from the original image to the center of the screen. Ok.. now my problem.. In Internet Explorer, this combo works.. the large banner stays at the back, and the magnified image, appears ontop... BUT.. in Google Chrome (& Apple Safari) - its the opposite. The banner remains topmost and the magnified image apears above everything else but behind the large banner.. Is there anyway to force Chrome to understand which is which I rather like Chrome and don't want to move back to IE.. Cheers! PS:: I'll just quick that the whole sha-bang works exactly right in Frontpage Preview as well.. so.. TBH i think it's Google Chrome's problem.. But I'd like to know how to solve this This post has been edited by Saldash: 29 September 2009 - 03:01 AM
introducing collapsible pannel   (89 Views)
I have introduced javascript to enable and disalbe particular checkboxes on selection on radio buttons. But i want the checkboxes to appear on the page only when a particular checkbox is checked. Please guide me the way to do so. regards, SHivane Contact us function Validate(){ var name=document.loginForm.fname var mail=document.loginForm.email var sadd=document.loginForm.sadd var mobile=document.loginForm.mobile if ((name.value==null)||(name.value=="")){ alert("Please Enter User Name") //uid.focus() return false } if ((mail.value==null)||(mail.value=="")){ alert("Please Enter Email Address") //pwd.focus() return false } if ((sadd.value==null)||(sadd.value=="")){ alert("Please Enter Street Address") //pwd.focus() return false } if ((mobile.value==null)||(mobile.value=="")){ alert("Please Enter Mobile Number") //pwd.focus() return false } else { return true } } function disableall(){ resedential(true) commercial(true) } function resedential(val){ document.getElementById("ip1").disabled=val; document.getElementById("ip2").disabled=val; document.getElementById("ip3").disabled=val; document.getElementById("ip4").disabled=val; document.getElementById("ip5").disabled=val; document.getElementById("ip6").disabled=val; document.getElementById("ip7").disabled=val; document.getElementById("ip8").disabled=val; document.getElementById("ip9").disabled=val; } function commercial(val){ document.getElementById("ip10").disabled=val; document.getElementById("ip11").disabled=val; document.getElementById("ip12").disabled=val; document.getElementById("ip13").disabled=val; document.getElementById("ip14").disabled=val; document.getElementById("ip15").disabled=val; document.getElementById("ip16").disabled=val; } function resedentialEn(){ commercial(true) resedential(false) } function commercialEn(){ resedential(true) commercial(false) } Contact us First Name Last Name Email Address Street Address Suburb State Postal Code Phone# Mobile Type of Property RESIDENTIAL (HOUSE,UNIT,TOWNHOUSE,CARS,BOATS ETC) COMMERCIAL (OFFICE,RETAIL,STRATA,FACTORY ETC) RESIDENTIAL CARPET CLEANING CAR SEAT UPHOLSTERY BLINDS LEATHER MATRESSES OTHER(SPECIFY) RUGS Commercial CARPET CLEANING PARTICIAN OFFICE CHAIRS VINYL OTHER(SPECIFY) LEATHER Aditional STAIN TREATMENT WATER/FLOOD SERVICES CARPET PROTECTION ODOUR REMOVAL UPHOLSTERY PROTECTION PET STAINS/SMELL Best Contact method PHONE MOBILE EMAIL Comments / Questions The fields marked with () are mandatory fields