Jump to content

alleyCat

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by alleyCat

  1. sorry , i'm afraid that's not what i want.,...thank you anyway..
  2. Hi there, anybody has any suggestion of how to submit the form when user press enter, the form itself contains select field, the text fields submited when i press enter, however, the select fields don't go anywhere.
  3. The server side language I use tomahawk, you won't know that cos it's developed by my boss and is only used internally within the company. It's based on Perl
  4. it works now, my colleague just add try{} catch(e){} around my code, then it works!!!
  5. I think it's cool and useful, it helps a lot for browser script to communicate with server. but it's tedious too
  6. I use AJAX , which has javascript, xml, and server content
  7. I'm Jane, just passed by this category(usually i'm in javascript), think would be nice to know you guys too.
  8. Yes, using AJAX technology is perfect for developing chatting system on web. you can refer to it on this web page:http://www.dynamicajax.com/fr/AJAX_Driven_...71_290_291.htmlHope this helpsJane
  9. hi there, I'm developing an AJAX web chat system. I got all the data to the server page, also i'm able to insert data into database. however, i can't display data back to the display screen. Please help~~~~
  10. You can pass html content to an XML file by using POST method. Then you need a seperate server page where xml content is displayed. for example: xmlDoc.open("POST","your server page","true");xmlDoc.setRequestHeader("content-type","application/x-www-form-urlencoded");xmlDoc.onreadystatechange=handlesent;var param="media=1";xmlDoc.sent(param); Hope this helpsJane
  11. I think you can change position by using css.
  12. Hi anybody knows about error bubbling? which is used to prevent users from entering letters to an input field such as telephone box or calculator screen. cheers!
  13. hi, does anybody know how to hide the input value entered by user to a input field?
  14. Sorry, another question, how do you add the scroll bars in the page so that the code is displayed in the frame?
  15. Thank you Scott, I found out the problem, there is error in javascript in add2storage(), after I put eval() around the messy statement, then everything works
  16. Thank you very much scott100! Your code helps me a lot. However I get an error when I tried to do similar to yours. The error is : Object expected. My code is like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Calculator</title><style>input.btn{ color:#050; font-family:'trebuchet ms',helvetica,sans-serif; font-size:small; font-weight:bold; width: 30px; height: 30px;}</style><script type="text/javascript">//real calculator functions//declare two storage place//one for numbers, one for operators//clear screen & storage when user press "C" buttonfunction clear_screen() { document.getElementById("cal_screen").value=""; clear_storage();}function clear_storage() { document.getElementById("storage1").value = ""; document.getElementById("storage2").value = "";}//if the both storage is empty, add cal_screen value and operator to each storage,,,,,,,,,,,,,,//else update the storage1 to be the result of calculation by that operatorfunction add2storage1(op) { if(document.getElementById("storage1").value && document.getElementById("storage2").value) { document.getElementById("storage1").value = parseFloat(document.getElementById("storage1").value) document.getElementById("storage2").value parseFloat(document.getElementById("cal_screen").value); document.getElementById("storage2").value = op; } else { document.getElementById("storage1").value = document.getElementById("cal_screen").value; document.getElementById("storage2").value = op; }}//display number on the screen when user press it,,,,,,,function add2screen(val) { screenval=document.getElementById("cal_screen").value; screenval+=val; document.getElementById("cal_screen").value=screenval;}//calculate result when user press = button,function result() { document.getElementById("cal_screen").value = parseFloat(document.getElementById("storage1").value) document.getElementById("storage2").value parseFloat(document.getElementById("cal_screen").value);}</script></head><body><form name="calculator" action="" method="post" ><table><tr><td><input type = "text" name = "cal_screen" id = "cal_screen" size = "18"/> </td></tr></table><table><tr><td><input type = "button" name = "one" id = "one" value = "1" class = "btn" onClick = "add2screen(this.value)"/></td> <td><input type = "button" name = "two" id = "two" value = "2" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "three" id = "three" value = "3" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "add" id = "add" value = "+" class = "btn" onclick = "add2storage1(this.value)"/></td></tr><tr><td><input type = "button" name = "four" id = "four" value = "4" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "five" id = "five" value = "5" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "six" id = "six" value = "6" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "minus" id = "minus" value = "-" class = "btn" onclick = "add2storage1(this.value)"/></td></tr><tr><td><input type = "button" name = "seven" id = "seven" value = "7" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "eight" id = "eight" value = "8" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "nine" id = "nine" value = "9" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "time" id = "time" value = "x" class = "btn" onclick = "add2storage1(this.value)"/></td></tr><tr><td><input type = "button" name = "zero" id = "zero" value = "0" class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "point" id = "point" value = "." class = "btn" onclick = "add2screen(this.value)"/></td> <td><input type = "button" name = "eq" id = "eq" value = "=" class = "btn" onclick = "result(this.value)"/></td> <td><input type = "button" name = "divide" id = "divide" value = "/" class = "btn" onclick = "add2storage1(this.value)"/></td> <td><input type = "button" name = "clear_screen" id = "clear_screen" value = "C" class = "btn" onclick = "clear_screen()"/></td> <td><input type="hidden" id="storage1" /></td> <td><input type="hidden" id="storage2" /></td></tr></table></form></body></html>
  17. Hi there, could anybody there tell me what are the possible reasons for the error : Object expected, I have created objects to use. part of my code is like this:<form name="calculator" action="" method="post" ><table><tr><td><input type = "text" name = "screen" id = "screen" size = "18"/> </td></tr></table><table><tr><td><input type = "button" name = "one" id = "one" value = "1" class = "btn" onClick = "add2screen(this.value)"/></td></tr></table>it's a javascript calculator, whenever I click on a button, the error message pop up!
  18. Hi everyone! I'm developing a calculator using javascript. I have problem on storing the input field value for later on to refer to. That is when everytime user click on a button, that button's value would be stored in an array, when two values are collected, then perform the calculation depend on the operator been clicked.Could anybody give me idea on this?
  19. hi how to pass query string with one variable but more than one choices of value. eg: http://www.w3schools.com/index.html?id=20 or30
×
×
  • Create New...