15,121 Topics
| |
Hi, practicing some javascript tasks and need some help with how to use a for loop to go through an array (which has 10 integers entered by the user). The for loop is to check if there are any duplicates of numbers and then i need to remove the duplicates. … | |
I'm adding class through script to `<strong></strong>` ` background-color:transparent;` is OK in chrome and firefox but in IE adds black color around image **menu_bg.png** How to remove black background of image? **script** $("#navlist li a").hover(function() { $(this).parent().find('strong').addClass("hover"); }); **CSS** .hover{ display: inline-block; position:absolute; background: url(images/menu_bg.png) center no-repeat; background-color:transparent; } **HTML** … | |
I am using the [jQuery validation](http://docs.jquery.com/Plugins/Validation) plug in on a website I am creating. The validation works, and the messages are set, however when they get displayed on my webpage they have line breaks. I only display one message at a time so I dont know why a single message … | |
I've got a photo gallery button on my website. I've got one button that looks like a forward arrow, which works fine and a back arrow, which does nothing. Also clicking on the thumbnail to view a larger one works fine. Everything is fine except for the back arrow. Here … | |
I have the following code that I'm trying to modify so that the speed of the ball will slowly increase over time. Never done any JavaScript coding for animations before so it is quite new to me so any help would be great thanks. <html> <head> <title>Interactive Game</title> <script language="JavaScript"> … | |
I am just starting to load ajax. Whats supposed to happen is when you click on the submit button, the contents of a php file will be put in the paragraph. The problem is that it ouputs undefined. Here is the code: ajax.php <html> <head> <title>Welcome to our ajax page</title> … | |
Hi I am trying to validate a form with different type of message for different error, but you can see [Click Here](http://cbsecsnip.in/csnip/form.php) the problem. Please guide me in solving this problem... Partial Code of form.php- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> … | |
hi i have a form which has 5 textboxes i want to add the values of all this 5 text boxes and place the result in total text box automatically how do i do this pls giv me some code | |
Hi all, I have a new website that has a portfolio page. Currently, the code is such: <input type="image" src="_images/01.png" id="01" alt="" onclick="document.getElementById('outputDiv').innerHTML = '<section class=gallery><img src=_images/img01.jpg>' + '<p>Image name - by Photographer</p></section>';" /> This seems extremely cumbersome and is impractical for a site that could have many images on … | |
Hi, I have multiple divs inside a div. I am using jquery event.ctrlKey to select inner divs on ctrl click. It is working, but there is one problem. When I click on inner div elements, it selects parent div also(it gives blue border showing as selected for parent div). When … | |
Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for JavaScript! It uses a words file, on the bottom of this post you will see a small example of a few words. The source … | |
i want key code for b+n combined, so that function works only when first b key is pressed and then n is pressed happens. if only n is pressed another function should happen. Plz help thanks | |
i ve created database called useradmin where the username and password is stored and created a login form too. everything is fine with code and the interface. when i tried to login with false username a message is displayed saying invalid. but when username corrrect and enter wrong password their … | |
Hello..! I just want to show an error message if user left text box blank. Here is my code on form.php, I really can find the problem... <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Your Valuable Suggestion</title> <link rel="stylesheet" type="text/css" href="view.css" media="all"> <script type="text/javascript" src="view.js"></script> <script type="text/javascript"> function notEmpty(elem, helperMsg){ alert("Out"); … | |
Hi! Do you know how to get elements which text is selected my mouse? e.g.: Several paragraphs in a html file. You select text with your mouse, and you get all "p" elements which have parts of the selected text. Regards | |
I want to add clip animation on mouse over to list using jquery my menu structure is, <ul id="menu"> <li><a class="" href="about.php">About Us</a></li> <li><a class="" href="services.php">Services</a></li> <li><a class="" href="works.php">Works</a></li> <li><a class="" href="clients.php">Clients</a></li> <li><a class="" href="contact.php">Contact Us</a></li> </ul> I want to create like [this](http://jsfiddle.net/bazmegakapa/Hftpc/15/) | |
<html> <head> <title>Hell WOrld</title> </head> <body> <form method = "get" action = "index.html"> <input type = "text" name = "username" /> <input type = "submit" value = "submit"> </form> <script type = "text/javascript"> document.getElementByName("username").onsubmit = alert("Hello World"); </script> </body> </html> In the code, when ever you click the submit button, … | |
Hi all, I wonder if you can help me again with some more json. I have this json fragment: cars_data={ "haveAlook": { "xmlns:fo": "http://www.w3.org/1999/XSL/Format", "xmlns:inlineData": "Lookup", "CategoryAttributes": { "attOne": "MyattOne", "attTwo": "MyattTwo", "attThree": "MyattThree", "attFour": "MyattFour", "attFive": "MyattFive", "attSix": "MyattSix", "attSeven": "MyattSeven" }, "TheThumbnails": { "thumb1": "first.png", "thumb2": "second.png", "thumb3": … | |
i am developing mobile web app for conducting survey in html5. i need to save user responses in file preferably in csv format. How can do it. i am stuck with storing part.......... please please help me. I cannot use activex for dat purpose coz app needs to work on … | |
Hi, so practicing some web development code and the part im stuck on is when a button is clicked it changes to picture and the caption is supposed to change. However no matter what i try the caption remains the same. The following is part of the code i have. … | |
I am trying to write current website url in a frame using javascript. Butt my methods does not working... What I want to do is to write the current url path into this code instead of "CURRENT+WEBSITE+URL+HERE" text. My current iframe code: `<iframe allowtransparency='true' frameborder='0' height='600px' id='web search' marginheight='0' marginwidth='0' … | |
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 … | |
<!DOCTYPE html> <html> <body> <h3> Send review request to test@something.com:</h3> <script type="text/javascript"> function FormValidator(theForm) { // check to see if the field is blank if (theForm.sname.value == "") { alert("Sandbox name should not be blank"); theForm.sname.focus(); return (false); } // require at least 3 characters be entered if (theForm.sname.value.length < … | |
Hi chaps, I wonder if you can help me with this. I have the following script: $(document).ready(function(){ init_get_data(); }); var cars_data; function init_get_data(){ my_data={"data1":{"-xmlns:fo":"http://www.w3.org/1999/XSL/Format","-xmlns:inlineData":"Lookup","TheAttributes":{"-price":"Price","-other_attribute":"other_value"... console.log(my_data.data1.TheAttributes.price); } Being very new to json I am trying to write on the firebug console to check how to get the values out of the … | |
For below code I want scrollbar that can scroll content inside div **#inner_content**. I have tried lots of scrollbars, but, nothing works. I have purchased [this](http://codecanyon.net/item/rollbar-jquery-scrollbar-plugin/2113353) scrollbar which is also not working for my code. Suggest scrollbar which will work! Help me please... <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"</script> <script type="text/javascript" src="http://code.jquery.com/ui/1.8.22/jquery-ui.min.js"></script> <script … | |
Hi there, I am in a bit of a situation here trying to prevent the browser from following a link within a <a> This is the html code: <a href="#" onclick="changeImage(this,'/folder/images/23.jpg');"> <img src="/folder/images/23_thumb.jpg" alt=""> <span>this is it</span> <h3>This is it</h3> <p class="caption">lorem ipsum...</p> </a> and here's the script: function changeImage(calledFrom, … | |
Hi, I am looking for a blur effect banner/ header script. Can anyone help me? Something like: [URL="http://www.ferron-pharma.com/?q=en"]http://www.ferron-pharma.com/?q=en[/URL] Automatically it should change the header every 3 seconds with blur effect. However the user can change it manually if they press certain areas. | |
Could you guys help Is there a script or way you can use to check if a page has been view before with the users browsers with using the a:visited then change color on like any page you land on it will tell you which urls were visted hence changing … |
The End.