Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009 |
| Replies: 3 Views: 384 Try this example:
<html>
<head>
<title>Handling onClick for links</title>
<script>
<!--
function confirmLink()
{ |
Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009 |
| Replies: 3 Views: 384 NO, both will behave differently if you click 'cancel' on confirmation dialog instead of clicking 'ok'.
Now its ur job to figure out something from this. |
Forum: JavaScript / DHTML / AJAX Aug 10th, 2009 |
| Replies: 3 Views: 458 Hope this little code will help you:
<html>
<head>
<style>
div#clock {
position: absolute;
border: 2px solid ccc;
background-color: c0f; |
Forum: JavaScript / DHTML / AJAX Jul 26th, 2009 |
| Replies: 18 Views: 1,295 This may work for you:
var dgebi = document.getElementById;
// This function takes elements not elements id.
error_appname(dgebi ('application_name'+i), dgebi ('erSpan' + i)); |
Forum: JavaScript / DHTML / AJAX Jul 25th, 2009 |
| Replies: 18 Views: 1,295 This can be done in many ways, but I will tell you easiest way:
Your function error_appname(inputField, erSpan), requires 2 argument, so maintain global arrays for those.
// Global arrays... |
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009 |
| Replies: 18 Views: 1,295 No problem bros....
Everybody starts with:
'printf(''Hello World");'
BEST OF LUCK! |
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009 |
| Replies: 18 Views: 1,295 Simple, pass the date element gl also in validation function
// Passing erSpan, so that we can easily show error message
gl.onblur= function() {error_appname(gl, erSpan)};
function... |
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009 |
| Replies: 18 Views: 1,295 Yes indeed you can.
Add a span element in every row in ur addRow() method
function addRow()
{
// Some of your code
gl.type = 'text'; |
Forum: JavaScript / DHTML / AJAX Jul 22nd, 2009 |
| Replies: 18 Views: 1,295 You assigned:
var dt=document.getElementById("application_doj" + iteration).value
dt has already got value. So pass only dt in isDate(dt).
function ValidateForm()
{
alert("hi... |
Forum: JavaScript / DHTML / AJAX Jul 9th, 2009 |
| Replies: 5 Views: 687 You are doing all the manipulation at server side, where javascript can not help you.
Sorry :( |
Forum: JavaScript / DHTML / AJAX Jul 4th, 2009 |
| Replies: 5 Views: 687 You can use this simple method to add new text boxes: -
/* container - HTML element in which textBox needs to be added
labelString - (optional) Label string for text box
textValue -... |
Forum: JavaScript / DHTML / AJAX Jun 5th, 2009 |
| Replies: 4 Views: 614 From servlet you send response as true or false. But at client end ie javascript the response will be string 'true' or 'false'. So u need to compare as something like this:
var result =... |
Forum: JavaScript / DHTML / AJAX May 25th, 2009 |
| Replies: 9 Views: 665 Hey, you can always have hidden input tag to which you can set values in form.
For example:-
<form action="page.php" method="post">
<input type='hidden' name='var1' value='param1'/>
... |
Forum: JavaScript / DHTML / AJAX May 24th, 2009 |
| Replies: 5 Views: 1,394 Hi essential,
I think he do not want root to be appended to body. |
Forum: JavaScript / DHTML / AJAX May 24th, 2009 |
| Replies: 5 Views: 1,394 getElementById() only works with document. To parse your HTML can use childNodes;
Modifying your code all little bit:
function parseHTML(html) {
var root = document.createElement("div");... |
Forum: JavaScript / DHTML / AJAX May 24th, 2009 |
| Replies: 12 Views: 827 You have to use getElementById() not only for company but all the other HTML element you are using in the code like: screenshot, url and line.
And You do not have to use different name from id's of... |
Forum: JavaScript / DHTML / AJAX May 23rd, 2009 |
| Replies: 12 Views: 827 Can we have some code from you |
Forum: JavaScript / DHTML / AJAX Mar 22nd, 2009 |
| Replies: 2 Views: 557 may this help you: http://developer.yahoo.com/yui/examples/carousel/csl_imagentext_source.html |
Forum: JavaScript / DHTML / AJAX Nov 29th, 2008 |
| Replies: 3 Views: 673 Simply you have to parse the server response manually.
For example you get this a client side:
responseText = "field1||fiel2||field||......";
Then using javascipt string-functions to... |
Forum: JavaScript / DHTML / AJAX Nov 29th, 2008 |
| Replies: 2 Views: 878 You have to just set the focus to the first input box after the page is loaded. And that can be done by simple javascript code.
Write an event-handler for <body onload="setInputFocus()">
... |
Forum: JavaScript / DHTML / AJAX Jul 10th, 2008 |
| Replies: 17 Views: 7,532 Above code is working fine on FF but on IE7 name attribute is not set at all.
I had modified the above code to work on both the browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
... |
Forum: JavaScript / DHTML / AJAX Jul 10th, 2008 |
| Replies: 17 Views: 7,532 Instead of changing name can't you change id of the element. This may help in both IE and FF. |
Forum: JavaScript / DHTML / AJAX Jul 9th, 2008 |
| Replies: 17 Views: 7,532 document.getElementsByName('hobby[1]')[0];
is not standard function avoid to use this. |
Forum: JavaScript / DHTML / AJAX Jul 9th, 2008 |
| Replies: 17 Views: 7,532 there are many DOM function to add/del new rows of to create objects. Better google!! |
Forum: JavaScript / DHTML / AJAX Jul 8th, 2008 |
| Replies: 5 Views: 1,200 Fetching paths from database would little lengthy, so its better to set the path manually:
var imgArr = new Array();
//width, height are the width and height of the image
imgArr[0] = new... |
Forum: JavaScript / DHTML / AJAX Jul 8th, 2008 |
| Replies: 5 Views: 1,200 You have to specify the path of the image. You have 2 options: 1. fetch the paths from database or 2. manually write the path for all the images. |
Forum: JavaScript / DHTML / AJAX Jul 8th, 2008 |
| Replies: 5 Views: 1,200 for second select option write a event-handler for onchange event.
like :
<select onchange='showImage(this)'>
.
.
.
</select> |
Forum: JavaScript / DHTML / AJAX Jul 8th, 2008 |
| Replies: 17 Views: 7,532 This may help u:
var inputs = document.getElementsByTagName("input");
var i;
for(i=0; i < inputs.length; i++)
inputs[i].name="my_name"; |
Forum: JavaScript / DHTML / AJAX Jun 27th, 2008 |
| Replies: 6 Views: 1,342 hey just want everythin to done here!!
Show some effort dude. |
Forum: JavaScript / DHTML / AJAX Jun 27th, 2008 |
| Replies: 3 Views: 1,364 please mark this thread as solved |
Forum: JavaScript / DHTML / AJAX Jun 26th, 2008 |
| Replies: 6 Views: 1,342 You know what makes ur life hell here.
Yes your Code itself. What the hell u have coded. No code tags.
As u r a new poster, I am solving ur problem.
Here is ur code that i modified (is this... |
Forum: JavaScript / DHTML / AJAX Jun 25th, 2008 |
| Replies: 3 Views: 1,364 Hey you can take the array of inputs and check wether it is 'text' type or not. If yes then change their values. here is the code
<script type="text/javascript">
function chalb()
{
var... |
Forum: JavaScript / DHTML / AJAX Jun 18th, 2008 |
| Replies: 6 Views: 882 Hi,
As far as I undersand, you need a admin page with which you can enter the artist info. And u want another page which will display all the mp3 uploaded for that artist.
If that is not the... |
Forum: JavaScript / DHTML / AJAX Jun 18th, 2008 |
| Replies: 6 Views: 882 Hi,
Have u done somthing for that or u want it be done right here. |
Forum: JavaScript / DHTML / AJAX May 28th, 2008 |
| Replies: 14 Views: 18,284 Why are not using YUI thats good, i have used it thats work fine: http://developer.yahoo.com/yui/examples/dragdrop/index.html |
Forum: JavaScript / DHTML / AJAX May 28th, 2008 |
| Replies: 14 Views: 18,284 I m sorry I did little mistake changing the get_val() function:
function get_val()
{
var text1 = document.getElementsById("mytextarea");
var text2 = document.getElementsById("mytextarea2");... |
Forum: JavaScript / DHTML / AJAX May 27th, 2008 |
| Replies: 14 Views: 18,284 Changing ur code for get_val() a little bit.
function get_val()
{
var text1 = document.getElementsById("mytextarea");
var text2 = document.getElementsById("mytextarea2");
text1.value =... |
Forum: JavaScript / DHTML / AJAX May 27th, 2008 |
| Replies: 14 Views: 18,284 Hi
I have changed ur code a little bit, I gave an id to textarea and in the function get_id() i have put the value of id:
<html>
<head>
<script type="text/javascript">
function get_id()
{ |
Forum: JavaScript / DHTML / AJAX May 26th, 2008 |
| Replies: 14 Views: 18,284 write this code inside your script-tag OR create a function which contains this code inside the script-tag. And call it when ever u want it. |
Forum: JavaScript / DHTML / AJAX May 26th, 2008 |
| Replies: 2 Views: 1,276 Again silly mistake. You have define var CreditCardInfo = document.getElementById("CreditCardInfo"); inside the if-block and u are using it in else-block.
define var CreditCardInfo =... |