473,770 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with safari

2 New Member
Problem description:
Clients working with an apple computer with the safari browser are experiencing problems with brokerage orders.
When the client wants to enter a stock order, the order entry screen displays 31-12-2005 as date.
When the client presses the OK button, it states that the entered date is wrong.
When the client changes the date to 31-12-2006, the application says the date is wrong.
If he uses the firefox browser he has no problems.

Expand|Select|Wrap|Line Numbers
  1. // createstockorder.js
  2. Onload.prototype.createstockorderbuttons = function createstockorderfunc() {
  3.     Buttons.add('okNewOrder', './imgs/ok_new_order.gif');
  4.     Buttons.add('okToPortfolio', './imgs/ok_to_portfolio.gif');
  5.     Buttons.add('okSend', './imgs/ok_send.gif');
  6.     Buttons.add('ignoreWarnings', './imgs/ignore_warnings.gif');
  7.     Buttons.setDefault('okSend');
  8.     // set focus
  9.     focusField(document.forms[0]);    
  10. }
  11.  
  12. function setFormOptions(form , maxContinuousDay, maxContinuousMonth, maxContinuousYear ) {
  13.     setDayOrder(form,true, maxContinuousDay, maxContinuousMonth, maxContinuousYear);
  14.     setIndicationLimit(form);
  15. }
  16. //modified for problem PR011707
  17. var maxContinuousDate;  // It is added for creating date for maximum allowed continuous untill value
  18. function setDayOrder(form, isOnLoad , maxContinuousDay, maxContinuousMonth, maxContinuousYear ) {
  19.     maxContinuousDate = new Date(maxContinuousYear,maxContinuousMonth -1,maxContinuousDay);
  20.     if (findElementById("indicationUntil").checked) {
  21.       // Default set to end of next month STBIB 1301 & FAT247    
  22.       enableField(form["periodDay"]);
  23.       enableField(form["periodMonth"]);
  24.       enableField(form["periodYear"]);
  25.       if(! isOnLoad && form["periodDay"].value == ""){
  26.           form["periodDay"].value = maxContinuousDay;
  27.           form["periodMonth"].value = maxContinuousMonth;
  28.           form["periodYear"].value =  maxContinuousYear;    
  29.       }  
  30.             form.periodDay.focus();
  31.      } else {
  32.        form["periodDay"].value = "";
  33.         form["periodMonth"].value = "";
  34.         form["periodYear"].value = "";    
  35.       disableField(form["periodDay"]);
  36.       disableField(form["periodMonth"]);
  37.       disableField(form["periodYear"]);
  38.      }
  39. }
  40.  
  41. function setIndicationLimit(form) {
  42.     if (findElementById("indicationLimited").checked ) {
  43.         enableField(form.limitRate);
  44.         enableField(form.limitDecimals);
  45.         form.limitRate.focus();
  46.     } else {
  47.         form["limitRate"].value = "";
  48.         form["limitDecimals"].value = "";
  49.         disableField(form.limitRate);
  50.         disableField(form.limitDecimals);         
  51.     }
  52. }
  53.  
  54. function checkForm(form) {            
  55.     var validator = new Validator();
  56.     validator.setErrorMessages(errors);    
  57.  
  58.     // First normalise some fields
  59.     if (findElementById("indicationLimited").checked) {
  60.         Helper.trimNumberLeft(form["limitRate"]);
  61.     }
  62.  
  63.       validator.addRule({
  64.           label: fields.indicationBuySell, 
  65.           fieldname: "indicationBuySell", 
  66.           required: true, 
  67.           include: ["BUY","SELL"],
  68.           value: Helper.createRadioValue(form["indicationBuySell"]),
  69.           errorMessages: {required:JSALERT_INDICATION_BUY_SELL_NOT_SELECTED}
  70.       });  
  71.  
  72.     validator.addRule({
  73.           label:fields.quantity, 
  74.           fieldname:"quantity",
  75.           format:"digits",
  76.           required:true,
  77.           minvalue:0,
  78.           exclude:0,
  79.           maxlength:6,
  80.           errorMessages: {
  81.               format:JSALERT_QUANTITY_INVALID,
  82.               required:JSALERT_QUANTITY_INVALID,
  83.               exclude:JSALERT_QUANTITY_INVALID,
  84.               minvalue:JSALERT_QUANTITY_INVALID
  85.           }
  86.       });    
  87.  
  88.       validator.addRule({
  89.           label: fields.indicationLimit, 
  90.           fieldname: "indicationLimit", 
  91.           required: true, 
  92.           include: ["BEST","LIMIT"],
  93.           value: Helper.createRadioValue(form["indicationLimit"]),
  94.           errorMessages: {required:JSALERT_INDICATION_LIMIT_NOT_SELECTED}
  95.       });      
  96.  
  97.       validator.addRule({
  98.           label:fields.limitRateInt, 
  99.           fieldname:"limitrate",
  100.           format:"limitrate",
  101.           required:true,
  102.           value: Helper.createLimitRate(form["limitRate"].value, form["limitDecimals"].value),
  103.           exclude: 0,
  104.           minvalue: 0,
  105.           when: (findElementById("indicationLimited").checked),
  106.           errorMessages: {
  107.              required:JSALERT_INDICATION_LIMIT_INVALID,
  108.               exclude:JSALERT_INDICATION_LIMIT_INVALID,
  109.               minvalue:JSALERT_INDICATION_LIMIT_INVALID,
  110.               format:JSALERT_INDICATION_LIMIT_INVALID
  111.           }
  112.       });
  113.  
  114.       validator.addRule({
  115.           label: fields.indicationDayOrder, 
  116.           fieldname:"indicationDayOrder", 
  117.           required:true, 
  118.           include:["DAY","CONTINUE"],
  119.           value:Helper.createRadioValue(form["indicationDayOrder"]),
  120.           errorMessages: {required:JSALERT_INDICATION_DAYORDER_NOT_SELECTED}
  121.       });
  122.  
  123.     var today = Helper.createDate(todayday, todaymonth, todayyear);        
  124.     //modified for problem PR011707
  125.     var valDate = Helper.createDate(maxContinuousDate.getDate(), (maxContinuousDate.getMonth() + 1), maxContinuousDate.getFullYear());    
  126.     var periodDate = Helper.createDate(form["periodDay"].value, form["periodMonth"].value, form["periodYear"].value);        
  127.  
  128.     // requireds and digits only 
  129.       validator.addRule({
  130.           label: fields.periodDate, 
  131.           fieldname:"periodDay",
  132.         required:true,
  133.         format: 'datedigits',
  134.           when: (findElementById("indicationUntil").checked),
  135.           errorMessages: {
  136.               required:JSALERT_PERIOD_REQUIRED,
  137.               format:JSALERT_PERIOD_NOT_NUMERIC
  138.           }
  139.       });    
  140.       validator.addRule({
  141.           label: fields.periodDate, 
  142.           fieldname:"periodMonth",
  143.         required:true,
  144.         format: 'datedigits',
  145.           when: (findElementById("indicationUntil").checked),
  146.           errorMessages: {
  147.               required:JSALERT_PERIOD_REQUIRED,
  148.               format:JSALERT_PERIOD_NOT_NUMERIC
  149.           }
  150.       });              
  151.       validator.addRule({
  152.           label: fields.periodDate, 
  153.           fieldname:"periodYear",
  154.         required:true,
  155.         minlength:4,
  156.         format: 'datedigits',
  157.           when: (findElementById("indicationUntil").checked),
  158.           errorMessages: {
  159.               required:JSALERT_PERIOD_REQUIRED,
  160.               minlength:JSALERT_PERIOD_INVALID,
  161.               format:JSALERT_PERIOD_NOT_NUMERIC
  162.           }
  163.       });                    
  164.     //modified for problem PR011707
  165.     // valid full date
  166.      validator.addRule({
  167.           label: fields.periodDate, 
  168.           fieldname:"periodDay",
  169.           format:'date',
  170.           value: periodDate,
  171.           exclude:today,
  172.           minvalue:today,
  173.           maxvalue:valDate,
  174.           when: (findElementById("indicationUntil").checked),
  175.           errorMessages: {
  176.               format:JSALERT_PERIOD_INVALID,
  177.               minvalue:JSALERT_PERIOD_TOO_EARLY, 
  178.               maxvalue:JSALERT_PERIOD_NOT_WITHIN_BOUNDS, 
  179.               exclude:JSALERT_PERIOD_IS_TODAY
  180.           }
  181.       }); 
  182.  
  183.     return validator.validate(form);
  184. }
Jan 23 '08 #1
1 1359
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

So, which error message pops up?
Jan 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4086
by: Josh Renaud | last post by:
I'm working on a site and ran into a little trouble with Safari. Here are the relevant links: page: http://www.joshrenaud.com/fredbear/contact.html css: http://www.joshrenaud.com/fredbear/stylesheets/style.css (both have successfully passed the relevant validators) The problem is that the Feedback table breaks out of the containing div. I
5
12351
by: Josh Renaud | last post by:
I'm still trying to solve a problem I have experienced in Safari. This is my third post on the subject. I'm hoping someone can shed some light. The problem is that, in Safari, a table with no specified width inside a containing div with a specified width seems to break out of that div when margins are applied to the table. It seems the table's width defaults to 100% of the parent div. But when I apply left and right margins to the...
2
6482
by: Martin Honnen | last post by:
I was playing around with canvas support in recent Safari, Mozilla and Opera (only version 9 preview) but run into issues with Safari related to the very old DOM Level 0 Image object for preloading images. When doing e.g. var img = new Image(); img.onload = function (evt) { alert(this); }; img.src = 'whatever.gif';
34
3875
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
2
2993
by: darren | last post by:
I have a small Javascript problem with that mutch love web browser safari, I tested the code on all other browsers PC (Win) and Linux and IE on the mac and it seams to work ok, but for some reason it will not work with safari. function domywindows() { //alert('test'); mywondows = window.open('writeme.html','TellAFriend','width=450,height=600'); mywondows.document.write("<html>");
8
1679
by: dd | last post by:
Hi, I've discovered a scenario where Safari 1.3 (I need to make my stuff compliant with 1.3+) gets confused about the scope of local variables WITHIN functions that were created in dynamic script blocks. I've made this example where function def has a local i variable in a loop, and it calls function abc which also has a local i variable in a loop. What happens is that Safari is not respecting the scope and is allowing the called...
1
1662
by: Bigpond News Server | last post by:
I have built a website that uses frames and a heavy reliance on Java Script to modify framesets, frames and load pages on the fly. The site works fine when using the PC version of Internet Explorer and Firefox. The Mac version of Firefox works fine as well. The Mac based Safari is giving me a headache. Safari works fine while browsing the site. A problem arises on Safari when the back button is pressed taking the user to the previous...
3
1554
by: Amir Michail | last post by:
Hi, I have bookmarklets with a # in their urls but safari changes the # to %23. And unfortunately, the bookmarklet does not work with %23. You need to change it back manually to #. Any workarounds? Amir
4
4012
by: fredsterss | last post by:
Hello all, built a simple site using a CMS combining MySQL for the back end and PHP to display it all. I have an admin page that has a form comprising of several textareas so the client can update the contents of the site himself. Any formatting - eg. user line breaks - is inserted into the database and works a-ok. However, when using Safari (I'm running OS X 10.5.1 and Safari 3.0.4), all the line-ends - ie. where the text wraps in the...
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.