Jump to content

naamabm

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About naamabm

  • Rank
    Newbie
  1. On my web I display configuration info, that user can edit, in a table.The correct user behavior should be to press Enter key after editing the field in order to set the changes. If he "leaves" the field without pressing Enter- the changes will be dismiss.In order to do that- I use "onkeyup" and "onblur""onkeyup"(1) set a flag that field's content has been changed(2) if the key is Enter (==13) , it sends the server a set request with the current value(*) also tried "onkeypress" or "onkeydown""onblur" - check the flag if the field's content has been changed. if so- send a refresh request to server that re-send current saved data (and erase user's changes).I recently noticed that while it works great in Chrome, on Explorer pressing the Enter key sets both events, and sometimes only the "onblur" event, thus ignores user's requests....Do you have any idea how to deal with it?THANKS!!!! -------------------------------------------------------code sample: <!-- Line LO freq --><tr><td><div id=div_lof_a><a href="manual.html#lof_mod" target="_blank">BUC LO Freq</a></div></td><td><div id=div_lof_select><input id="lof" value="" onkeyup="set_is_unsaved_change();if ((event.keyCode==13) && (div_img_no_touch.className=='no_touch_hide') && (is_positive_num(this))) {div_img_long_action.className='wait_img_show';div_img_no_touch.className='no_touch_show';updateStatusParams('query.fcgi','form_state=2&form_name=line_mod&field_name=lof&field_val='+this.value);reset_is_unsaved_change();}" onblur="if(is_set_unsaved_change()) {reset_is_unsaved_change();updateStatusParams('query.fcgi','form_state=1&form_name=line_mod');}"></div></td></tr>
  2. That is exactly what I do, and it seems that onBlur is the first:set_is_unsaved_change() ...... <!-- Line LO freq --><tr><td><div id=div_lof_a><a href="manual.html#lof_mod" target="_blank">BUC LO Freq</a></div></td><td><div id=div_lof_select><input id="lof" value="" onkeyup="set_is_unsaved_change();if ((event.keyCode==13) && (div_img_no_touch.className=='no_touch_hide') && (is_positive_num(this))) {div_img_long_action.className='wait_img_show';div_img_no_touch.className='no_touch_show';updateStatusParams('query.fcgi','form_state=2&form_name=line_mod&field_name=lof&field_val='+this.value);reset_is_unsaved_change();}" onblur="if(is_set_unsaved_change()) {reset_is_unsaved_change();updateStatusParams('query.fcgi','form_state=1&form_name=line_mod');}"></div></td></tr>...............
  3. On my web I display configuration info, that user can edit, in a table.The correct user behavior should be to press Enter key after editing the field in order to set the changes. If he "leaves" the field without pressing Enter- the changes will be dismiss.In order to do that- I use "onkeyup" and "onblur" "onkeyup"(1) set a flag that field's content has been changed(2) if the key is Enter (==13) , it sends the server a set request with the current value(*) also tried "onkeypress" or "onkeydown" "onblur" - check the flag if the field's content has been changed. if so- send a refresh request to server that re-send current saved data (and erase user's changes). I recently noticed that while it works great in Chrome, on Explorer pressing the Enter key sets both events, and sometimes only the "onblur" event, thus ignores user's requests.... Do you have any idea how to deal with it? THANKS!!!!
  4. Is there a way to remove (not disable and not delete) an option in a "select" list, and restore it later when needed?I have a form with many huge lists ("select" with many "options") that depend on eachother. I am dynamically updating the form through server, and wish to update the list values by sending a mask string. This way I could remove and restore the options without the need to pass the whole list again.I tried many ways but none work:* option.diabled="disabled" is not good because it is still shown* option.style.visibility='hidden' is not good because it is still taking a row* option=null is not good because I will not be able to restore itI need a method similar to the following one for remove/add fields in a form:remove:<field>.style.display='none';restore:<field>.style.display=block';Thank you!!!
  5. HiI know how to pass data from client side (html file) to server using CGI script (POST method).I also know how to re-create the html page from server side after receiving the data (using printf).However I want to write static pages on client side, and only to pass information (data) from server to client and other way around.1. How do I pass the data from the server side?2. How does the client side receive the data from the server?Thank youNaamap.s. I am working on embedded product with Linux as OS
  6. Hisuppose I have 2 html files open (in 2 different windows)Can I reach one file from the other using its url address?I need to reach its components (make something visible on page 2 when pressing a button on page 1)Thank you
  7. HiI have a page named "index.html".In my main html file I have 2 <iframe>.One of them present a html file while the other is empty.The html is called "top.html" and it is connected to a CGI file (called query.cgi)I need to create a link in "top.html" file (created by query.cgi) that when clicking on it will open a html file on the other iframe.Problem:because "top.html" is created and controlled by "query.cgi" I can't find a way to get the second iframe....parameters I have tried:document.url = undefineddocument.referrer = http://my_server/top.htmlwindow.location.href= http://my_server/query.cgiwindow.document.url = undefinedhow can I reach the main page??
×