Search Results

Showing results 1 to 40 of 186
Search took 0.01 seconds.
Search: Posts Made By: Luckychap ; Forum: JavaScript / DHTML / AJAX and child forums
Forum: JavaScript / DHTML / AJAX 30 Days Ago
Replies: 9
Views: 2,011
Posted By Luckychap
As I have explained how to get <script> tags. Say we have an array of tags 'scripts'.


var orginalSrc = "example.js", newSrc = "new.js";
// Looping through all the tags
for(var i = 0; i <...
Forum: JavaScript / DHTML / AJAX 30 Days Ago
Replies: 9
Views: 585
Posted By Luckychap
<table id='my_table'><tr><td></td><td></td></tr></table>

Now on body on load bind the 'onclick' event this way

The body html:

<script>
function init() {
var table =...
Forum: JavaScript / DHTML / AJAX 30 Days Ago
Replies: 9
Views: 585
Posted By Luckychap
I think calling of addText() on click is not correct.
Forum: JavaScript / DHTML / AJAX 30 Days Ago
Replies: 9
Views: 585
Posted By Luckychap
Is there any javascript error?
Forum: JavaScript / DHTML / AJAX 31 Days Ago
Replies: 9
Views: 585
Posted By Luckychap
here:


<script>
function addText(event){
//document.getElementById("insertid").value +=
//(event.srcElement || event.target).firstChild.nodeValue.toString();...
Forum: JavaScript / DHTML / AJAX 33 Days Ago
Replies: 9
Views: 585
Posted By Luckychap
This is because you are appending the new value always. You have to get the position of the carrot and do some string operation. here is a function to insert in between:-...
Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009
Replies: 8
Views: 608
Posted By Luckychap
Even better:

$(document).ready(function() {

$("ul.sc_menu a").click(function()
{
$('#content #mainbg #infobox #trackinfo').animate({opacity:"0"}, function(){
...
Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009
Replies: 8
Views: 608
Posted By Luckychap
May this help

$(document).ready(function() {

$("ul.sc_menu a").click(function()
{

$('#content #mainbg #infobox #trackinfo').animate({opacity:"0"});

$.post('projects-agent.php',...
Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009
Replies: 3
Views: 391
Posted By Luckychap
Try this example:


<html>
<head>
<title>Handling onClick for links</title>
<script>
<!--
function confirmLink()
{
Forum: JavaScript / DHTML / AJAX Oct 22nd, 2009
Replies: 3
Views: 391
Posted By Luckychap
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 Oct 22nd, 2009
Replies: 2
Views: 330
Posted By Luckychap
function getId() {
var table = document.getElementById('your-table-id');
var rows = table.getElementsByTagName('tr');
var newId;
if(rows && rows.length) {
var lastRowId =...
Forum: JavaScript / DHTML / AJAX Sep 3rd, 2009
Replies: 3
Views: 302
Posted By Luckychap
This code seems absolutely fine. But you need to check if function 'HandleResponseFlowButtonSize(response)' is called only once.
And also check if function 'getbuttonSize(id)' is called once for...
Forum: JavaScript / DHTML / AJAX Sep 2nd, 2009
Replies: 3
Views: 302
Posted By Luckychap
As you know Ajax is asynchronous, so your thinking is correct. The variable is set synchronously and respond is asynchronous(ajax). Check your code where the ajax request has completed for that...
Forum: JavaScript / DHTML / AJAX Sep 2nd, 2009
Replies: 2
Views: 358
Posted By Luckychap
There is no mechanism for bring content out of local domain with Ajax.
Forum: JavaScript / DHTML / AJAX Aug 19th, 2009
Replies: 9
Views: 708
Posted By Luckychap
Appreciated!
Thanks to all.
Forum: JavaScript / DHTML / AJAX Aug 19th, 2009
Replies: 9
Views: 708
Posted By Luckychap
We usually encounter this problem when working with embedded devices (settop boxes etc.) where there is very less memory. We need to free memory where ever its possible.
Forum: JavaScript / DHTML / AJAX Aug 19th, 2009
Replies: 9
Views: 708
Posted By Luckychap
Thanks gentlemen,

So, using 'delete' OR '[]' will delete all the items (and memory) associated with the array.

Please confirm this.
Forum: JavaScript / DHTML / AJAX Aug 19th, 2009
Replies: 9
Views: 708
Posted By Luckychap
Hi all,

I want help from all you wonderful guys. I want to know how can we free memory occupied by an Array. That means all the elements associated with this array should be deleted.

let say: ...
Forum: JavaScript / DHTML / AJAX Aug 11th, 2009
Replies: 22
Views: 1,081
Posted By Luckychap
Well if rowIndex is same always, then inpN.length can be used to set ids:


inpR.id = 'textBox_' + inpN.length + 1;


If this does not work, you have to use some sort of counter as suggested by...
Forum: JavaScript / DHTML / AJAX Aug 11th, 2009
Replies: 22
Views: 1,081
Posted By Luckychap
Sorry for typo it must be:


inpR.id = 'textBox_' + oRow.rowIndex+1
Forum: JavaScript / DHTML / AJAX Aug 11th, 2009
Replies: 22
Views: 1,081
Posted By Luckychap
If all is working fine then you can use rowIndex as generating id.


function add(oRow)
{
var selObj = oRow.getElementsByTagName('select')[0];
if(selObj[0].selected){...
Forum: JavaScript / DHTML / AJAX Aug 10th, 2009
Replies: 3
Views: 466
Posted By Luckychap
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 Aug 3rd, 2009
Replies: 2
Views: 375
Posted By Luckychap
I hope this will help you:


<html>
<script>
function callAll() {
for(var i = 0; i < 3; i++) {
window['myFunction' + i](i);
}
}
Forum: JavaScript / DHTML / AJAX Jul 30th, 2009
Replies: 2
Views: 718
Posted By Luckychap
OR use date comparing functions http://www.daniweb.com/forums/post876906.html#post876906
Forum: JavaScript / DHTML / AJAX Jul 30th, 2009
Replies: 2
Views: 718
Posted By Luckychap
The best and simple one be:
Do not show past dates at all.
Forum: JavaScript / DHTML / AJAX Jul 26th, 2009
Replies: 3
Views: 515
Posted By Luckychap
What do you mean by 'broken image'?
Forum: JavaScript / DHTML / AJAX Jul 26th, 2009
Replies: 18
Views: 1,326
Posted By Luckychap
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: 1
Views: 430
Posted By Luckychap
May because of position: relative as the modal background is pushing it offscreen. Try making it absolute.
Forum: JavaScript / DHTML / AJAX Jul 25th, 2009
Replies: 18
Views: 1,326
Posted By Luckychap
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,326
Posted By Luckychap
No problem bros....

Everybody starts with:

'printf(''Hello World");'

BEST OF LUCK!
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009
Replies: 18
Views: 1,326
Posted By Luckychap
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,326
Posted By Luckychap
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,326
Posted By Luckychap
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: 694
Posted By Luckychap
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: 694
Posted By Luckychap
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 Jul 4th, 2009
Replies: 1
Views: 476
Posted By Luckychap
use z-index css property to bring up your javascript menu.
Forum: JavaScript / DHTML / AJAX Jun 5th, 2009
Replies: 4
Solved: I have a form
Views: 617
Posted By Luckychap
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 Jun 2nd, 2009
Replies: 14
Views: 1,126
Posted By Luckychap
You have used so many tables in your HTML. I can only suggest you to re-check your HTML code. May be some <td> <tr> </td> </tr> tags are missing.
Forum: JavaScript / DHTML / AJAX May 26th, 2009
Replies: 12
Views: 1,477
Posted By Luckychap
Well Airshow,

I wrote these function on STB browsers, which do not support prototyping of predefined objects like Date.

But your effort is really appreciated.
Forum: JavaScript / DHTML / AJAX May 26th, 2009
Replies: 12
Views: 1,477
Posted By Luckychap
Date Comparison is really hard in javascript. So I wrote 2 very useful functions for the same. I think this is right time to post:


// Checks if 2 input dates are same
function areSame(date1,...
Showing results 1 to 40 of 186

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC