- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
42 Posted Topics
Re: Try using jQuery carousel. Check [url]http://www.ajaxdaddy.com/demo-jquery-carousel.html[/url] | |
Re: Hi mikulucky, It seems the IE assigns 'Auto' as the default margin for the div. You could set the default margin-left as 0. The script would look like. [ICODE] $(document).ready(function() { var $left = $('#content .inner2'); $left.css('marginLeft',0); $('#bottomright a').click(function() { $left.animate({ marginLeft: parseInt($left.css('marginLeft'),10) == 0?$left.outerWidth():0 }); }); return true; }); … | |
Re: Hi try this... [CODE] <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#myTextBox').click(function(){ $('#myTextBox').val(""); }); $('#myTextBox').blur(function(){ var currentText = $('#myTextBox').val(); if(currentText == "") { $('#myTextBox').val("Enter text"); } }); }); </script> </head> <body> <input type="text" id="myTextBox" value="Enter text"> </body> [/CODE] | |
| |
Re: Hi, Your code seem to be working fine. Are you getting Javascript any errors? If any please check your error console. Also is there any use of passing the two parameters to the function. | |
Re: Try this... [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Shopping Calculation</title> <script type = "text/javascript" > /* <![CDATA[ */ function CalcShopping(promt) { promt = parseFloat(promt) if (promt <= 25) { var calcLess = promt + 1.50; window.alert("Your total charge for … | |
Re: Use [CODE] position:absolute; [/CODE] in your style. | |
Re: Not sure about that.One way maybe is to loop individual letters in the string and check whether its numeric or not. | |
Re: dipakatcvrca, as arrgh said frames aren't the right solution. Its like making your site more vulnerable and going back in time. "Hope fully this will work for web developers" this ain't true. | |
Re: Maybe try like this.. [CODE] $("h2 em").html(largeAlt); [/CODE] | |
Re: To make the options selected by default, use the attribute selected="selected" like.. [CODE] <select> <option selected="selected"></option> </select> [/CODE] You will have to check which all options need to have selected attribute before adding to it. | |
Re: You have to be clear what you are going to build. Ask your colleagues maybe.. | |
Re: Try.. [CODE] <cfscript> myString = "123456789ABC66HYIGG"; myStringLength = len(trim(myString)); breakPosition = 5; while(breakPosition < myStringLength) { myString = insert("-",myString,breakPosition); breakPosition = breakPosition + 6; } </cfscript> <cfoutput>#myString#</cfoutput> [/CODE] | |
Re: Try this... [CODE] <body> <div> Newspaper<br> <select id="newspaper" NAME="newspaper" style="width:350px" onchange="disable(this)"> <option value="null"></option> <option value="news1">news1</option> </select> <br><br> Magazine/Trade<br> <select id="magazine" NAME="magazine" style="width:250px" onchange="disable(this)"> <option value="null" ></option> <option value="magazine1">magazine1</option> </select> <br><br> Web<br> <select id="web" NAME="web" style="width:250px" onchange="disable(this)"> <option value="null" ></option> <option value="web1">web1</option> </select> <br><br> TV<br> <select id="tv" NAME="tv" style="width:250px" onchange="disable(this)"> <option … | |
Re: Not clear what your requirement is. Selecting state from the drop down should make selected what? | |
Re: Try this..Not sure whether thats what you require. [CODE] <script type="text/javascript"> function toggleDiv() { var boxChecked = document.getElementById("other").checked; var myDiv = document.getElementById("details"); boxChecked ?myDiv.style.display="block":myDiv.style.display="none"; } </script> <label class="checks"> <input type="checkbox" name="Other" id="other" onchange="toggleDiv()" /> Other</label> <div id="details" class="checks" style="display:none"> <label > <input type="text" name"details" size="30" />Please Explain</label> </div> [/CODE] | |
Re: Not sure daviddoria, but you could parse the XML in javascript. | |
Re: LogicWeb I'm not sure but if you are using any other js frame work, conflict may occur..Try declaring this at top of your script [CODE] <script> var $j = jQuery.noConflict(); </script> [/CODE] and.. Now use $j instead of jQuery in your code like $j("#id").click(); Not sure whether that works,but anyway … | |
Re: Iam not sure whether that will work. Try querying the name of the images and keep it in an hidden field.You can then loop the list and change the images according to it. | |
Re: You could create a login system for registered users. | |
Re: tcollins412, this seems to be resolved in your thread [url]http://www.daniweb.com/forums/thread331589-2.html[/url] | |
Re: Try this. Not sure whether that's what you need. [CODE] <body> <div id='countdiv'>0</div><br/> <input type="button" id="incrementBtn" onclick="increasecounter();" value="Increment"></br> <div id='time'></div> <div id='score'></div><br/> <input type='button' value='reset' onclick="reset()"> </body> <script> numcount=0; t=setTimeout("test()",3000); document.getElementById("incrementBtn").disabled=false; timer_on = 1; function increasecounter() { timer_on = 1; numcount++; document.getElementById('countdiv').innerHTML=numcount; t=setTimeout("test()",3000); } function test() { if(timer_on) { timer_on=0; … | |
Re: [CODE] <script type="text/javascript"> if (window.XMLHttpRequest) xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","test.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; myXml = xmlDoc.documentElement.getElementsByTagName("post"); var userValue = myXml[0].getElementsByTagName("user")[0].childNodes[0].nodeValue; var contentValue = myXml[0].getElementsByTagName("content")[0].childNodes[0].nodeValue; alert(userValue +","+ contentValue); </script> [/CODE] | |
Re: The code seems to be getting the id of the object in both firefox and IE.Try alerting it.Check what you are getting. [CODE] <script> function callPicture(ID) { alert(ID.id); } </script> [/CODE] | |
Re: Don't know whether that works for you. What does the '.value' in the onclick mean? [CODE] <form method="post"> <input type="text" onclick="SelectAll(this.id)" onkeypress="return isNumber(event)" maxlength=2 style="width:3em; text-align:center;" id="quantity_ <?php echo $fetch['id']; ?>" value="1"> <a onclick="Add(<?php echo $fetch['id']; ?>,quantity_<?php echo $fetch['id']; ?>);" href="#">Add</a> </form> [/CODE] | |
![]() | Re: You can call a function to display the div. [CODE] <body> <a href = "javascript:void(0)" onclick = "showPolicy()">Click here.</a> <div id="light" style="display:none;"> <!-- Add your content here. --> This is the content/policy. </div> </body> <script type="text/javascript"> function showPolicy() { document.getElementById('light').style.display = 'block'; } </script> [/CODE] |
Re: Try calling the function Toggledivs() on onclick in the tag like onclick="func1();Toggledivs();" [CODE] function Toggledivs() { $("#divUnit").show("slow"); } [/CODE] | |
Re: Could you please post your code. | |
Re: [CODE] <script type="text/javascript"> var str = "TEST'S "; var finalStr = str.replace("'","'"); </script> [/CODE] | |
Re: Maybe.. [CODE]if(server_msg.replace(/^\s+|\s+$/g, '') == "null")[/CODE] | |
Re: Are you trying to submit the form or just redirecting?Can you tell what p is?textbox? | |
Re: a. List the name of part and price. [CODE] SELECT pname,price FROM parts [/CODE] b. List the names of the supplier that list both p1(part1) and p2 (part2). [CODE] SELECT s.sname FROM suppliers s INNER JOIN supply su ON s.s = su.s WHERE su.p IN ('p1','p2') [/CODE] | |
Re: Try this..check whether it works for you.. [CODE] <script> function setOptions(chosen) { var selbox = document.form1.Iunit; selbox.options.length = 0; if (chosen == " ") { selbox.options[selbox.options.length] = new Option('Please select one of the options above first',' '); } if (chosen == "1") { selbox.options[selbox.options.length] = new Option('Milimeters','mm'); selbox.options[selbox.options.length] = new … | |
Re: Try with this while appending the response data to the div,don't know whether that works..[CODE]$('#dorants').html(data);[/CODE] | |
Re: Try this..check whether it works for you...[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> body { margin-left: 25%; margin-right: 25%; } h1 { font-family: jokerman; text-align: center; } td { border-style: outset; border-width: 5px; border-color: gray; font-family: courier new; } </style> </head> <body> <h1>Multiplication Table</h1> <br … | |
Re: You cannot disable the back button, but you can redirect to previous page using javascript. [CODE] page = new String(history.forward()); if(page="undefined") { } else { location.href = history.forward(); } [/CODE] | |
Re: Try this..check whether it works for you. [CODE] <html> <head> <script type="text/javascript"> function validateFormOnSubmit(theForm) { var reason = ""; reason += validateUsername(theForm.username)+'<br/>'; reason += validatePassword(theForm.pwd)+'<br/>'; reason += validateEmail(theForm.email)+'<br/>'; reason += validatePhone(theForm.phone)+'<br/>'; reason += validateEmpty(theForm.from); if (reason != "") { document.getElementById('box1').style.visibility= 'visible'; document.getElementById('box1').innerHTML = reason ; return false; } return true; … | |
Re: A little change to catherine sea code. Think the textarea should be displayed when the checkbox is checked. [CODE] function showtxtarea(id) { if (document.getElementById("checkbox1").checked == true) { document.getElementById(id).style.display = 'block'; } else { document.getElementById(id).style.display = 'none'; } } [/CODE] | |
Re: Ya..You need only one jQuery js. Why would you use another jQuery. | |
| |
Re: You could keep your ajax response page in a common folder and append the path to the URL. Like declare path = ../jsp/ URL=#path#ajaxResponse.jsp?variable=var Iam not sure whether thats correct. |
The End.