293 Posted Topics
Re: First I want to tell u if u want the whole page to refresh, then there is no need to use ajax. U just have to write a function which will load ur page every pireod of time.. Ajax is used to update small portion of the page in background … | |
Re: Again silly mistake. You have define [CODE]var CreditCardInfo = document.getElementById("CreditCardInfo");[/CODE] inside the if-block and u are using it in else-block. define [CODE]var CreditCardInfo = document.getElementById("CreditCardInfo");[/CODE] above if-block. [CODE]function CheckForCreditCard(el) { var CreditCardInfo = document.getElementById("CreditCardInfo"); if (el.options[2].selected == true) { CreditCardInfo.style.visibility = "visible"; } else if (el.options[2].selected == false) CreditCardInfo.style.visibility = … | |
Re: I think you have t just send color-vlaue to database through ajax. If so you have to send a asyncronous request to the server using ajax techonolgy. This can be done after you have chaged the color of the layer successfully. here is the simple ajax code to send data … | |
Re: Global variables should be avoided, because imagine u have 4000 lines of code, in which u have define many functions to perform different tasks, and also u have a global variable which is used nearly by evey function, and everything is working fine. Now if you want to define a … | |
Re: did you close ur <script> tag with </script> check this out. And post code if still no works. | |
Re: [CODE]var uid = ( function(){ var id=0; return function(){ return id++ ; }; } )(); var newId = uid();[/CODE] to get new id use above code | |
Re: Hi thosecars82, First of all Pop menu cannot be implemented with CSS only. CSS is only used for giving looks to HTML elements. But one thing is true if u use CSS and Javascript together then u can do anything u want to do on web page. To develope ur … | |
Re: fork make copies of same program. So every time it asking for input. Use a flag variable to take in put: [CODE]int main(){ char command[100]; char* parameters[100]; int status; int input_flag = 0; while(TRUE){ /*repeat forever*/ type_command(); /*display prompt on the screen*/ init_params(parameters); if(input_flag==0) read_command(command,parameters); /*read input from terminal*/ if(fork()!=0){ … | |
Re: For first 2 lines i.e: [B]var useTabKey = 1; [/B] // 1 = enable tab-key feature / 0 = no tab-key [B]var tabbedMode = 1;[/B] since these are global variables u can easily change there value. for third part to change, find out on which event that function is called, … | |
Re: may this will work: [CODE] function swap_array(int **after, int **before) { int **temp = after; after = before; before = temp; } [/CODE] I have not checked it. Hope it will work. | |
Re: The function should be like this : [CODE] function CheckForCreditCard() if document.getElementById("divCreditCardInfo").options3.selected == true) { var CreditCardInfo = document.getElementById("CreditCardInfo"); CreditCardInfo.style.visibility = "visible"; } [/CODE] You should first get a refrence for any document element before setting any properties. I.E done by: [CODE]var CreditCardInfo = document.getElementById("CreditCardInfo");[/CODE] | |
Re: check if u have added any CSS class in which u have set property like position: absolute; for the two divs. check it out | |
Re: for looping u can use this way: [CODE] while(1) { cout<< "Is the user scheduled for work today? (Y/N)"/n; cin>> ScheduledIn; ScheduledIn = toupper(ScheduledIn) if (ScheduledIn !='Y' || ScheduledIn != 'N') { cout<< "Please enter a correct value"/n ; } else { break; } } ////Here start witting other validations … | |
Re: check this link: [url]http://www.kourbatov.com/faq/browsern.htm[/url] | |
Re: Why u are converting a char to int, you can compare char same as u compare int. | |
Re: First tell which type on Link List you are using: Singly, Doubly, Circular etc.. | |
Re: Use YUI lib ([url]http://developer.yahoo.com/yui[/url]) for modifing parametes, becoze yahoo developers already had done this for us. So read the Dom API([url]http://developer.yahoo.com/yui/docs/module_dom.html[/url]) in YUI. I have used it and checked it on IE, Firefox, safari, opera | |
Re: Or u can use Yahoo user Interface (YUI), it contains many amazing controls including calendar. [url]http://developer.yahoo.com/yui/[/url] | |
Re: use [icode]setTimeout("function_name();", time(in milisec));[/icode] forx example you have a function which fires ajax request every 1 sec. So use it this way: [code]function funAjax() { //Code to send the ajax request setTimeout("funAjax();", 1000); }[/code] After every 1 sec function funAjax will be called. | |
Re: To make web page independent of screen size, You should always make all the component of webpage in percentage size. for exp: <div id = "mydiv" style="height: 20%; widht:30%"> and so on. In this way if the screen is small or big it will adjust acording to the percentage given … | |
Re: When you want to send an Ajax request? On each selection or after all the selection. What exactly you want to know? Give us little more details so that we can help u. | |
Re: You can declare a global variable to check weather the link is visible or not. So that you can toggle the appearance of links by clicking on above link. Your function will look like that: var flag = 0; function hideShowLinks() { if(flag == 0) { //code to show the … | |
Re: Another one: Give man a fish he will keep it for next day. Teach a man how to fish he will keep that fish for another next day. | |
Re: try this function: One way is to char * get_filename(char *path) { char filename[30]; int len = strlen(path); char *fromLast = path + (len -1); int i = 0; while(*fromLast != '/') { fromLast --; } strcpy(filename, fromLast); return filename; } | |
Re: use onclick- event of first listbox to write js code to make second listbox visible. [icode]listbox2.Attribute.style="visible";[/icode] | |
Re: U have defne an array of 10 nodes i.e. node arr[10]. But while looping in main() u are using for in wrong way i.e. for (i=10; i>=0; i++) here i should be initialized to 9 as the length of array is 10 (0-9). and also u have to decrement i … | |
Re: Why are u printing 1's every time u find a number in certain range. U just count them first (as suggested by Ancient Dragon) and at last print them one by one i.e printf("There are %d numbers in Range (0-20)", sum1); - - and so on | |
Re: To calculate the average time spend by user on the page you can get the time when user enter your site and when exits your site. When user login store time when user logout or close the window you can store end time. To get time when user close the … | |
Re: char *p = NULL; Because p is a pointer so it should not be pointing to anything hence NULL. If you want to nitialize pointer, initialize it with valid address; like: char *name = "ABCD"; char *p = name; | |
Re: Tipically a char is 8-bit long, and most significant bit(MSB) represent the sign value. If MSB is 0, it means positive and if MSB is 1, it means negative. So only last 7 bits (out of 8 bits) are used to store the actule char value. And total number of … | |
Re: Try this as ur default contructor signature: BloodDonor(int id=0,string name=" ",string bGroup=" ",string hPhone=" ",string mPhone="", Address myAdd={0,0,0,"",""}); | |
Hi guys, I need to understand the concept of inheritance in Oops. Can any one explain with real life example the use of inheritence to enhance a super class. It will be very helfull to me if you can explain me the use of inheritence to build a simple car. … | |
Re: I think you must choose .bmp file instead of jpg, as jpg files are difficiult to read and hence write. On the other hand .bmp files are easy to read and write. But they take much more strorage as compared to jpg files (no compression in .bmp files). you should … | |
Re: #include <stdio.h> int main() { char ca[10]; ca[0] = 'H'; ca[1] = 'e'; ca[2] = 'l'; ca[3] = 'l'; ca[4] = 'o'; ca[5] = '\0'; for(int i=4; i>= 0 ; i--) printf("%c", ca[i]); //printf("%s", ca[5],ca[4],ca[3],ca[2],ca[1],ca[0]); getchar(); return 0; } ca[i] is a character type, you have to print them in … | |
Re: For the first program your using cin to take name from the user which may cause problem when user puts spaces between firstname and lastname. Try to enter name without spaces. | |
Hi, I am doing a project on finger print authentication. I am using finger print bitmap(4-bit). can any one help me with how to trace all the rigids on finger print so that i can find minutiae points for creating my template database. any links are also valuable.. Thanks. | |
Re: First of all you do what you want, the processor will always treate any data as Binary i.e. 0101010010001 etc. It does not read hexa numbers. Any way if want your wish to be true then start developing your own Processor. | |
Re: first find the length of the string(str) say len. then [code=c] for(int i=0;i<len;i++) { for(int j=i+1;j<len;j++) { if(str[i]>str[j]) temp=str[i]; str[i]=str[j]; str[j]=temp; } } [/code] | |
hi, please any one tell me what is function overloading and overriding. and next one is on O.S. one more que. what is the difference between process and thread thanks!! | |
Re: say the is stored in a array of char say str[], knw find the length of the string say len. kow u have to count no. of words. a word will always start with a space( ' ' ), so start with taking a variable say flag which will monitor … | |
Hi, I had almost completed my program of Analog clock with tC++. but i got stuck, when any arm of the clock is over another arm it erase the other arm when it passess by. I try to redraw that arm but it looks very bad as it start blinking … | |
I have just started C++, i have problem in understanding virtual functions. can anybody tells me what are v.f. and most important what is there importance in C++. Thanks |
The End.