OT Safari javascript problem

Devin Whalen devin-Gq53QDLGkWIleAitJ8REmdBPR1lH4CV8 at public.gmane.org
Thu Jan 13 16:50:18 UTC 2005


Hey,

Are there any web developers on this list that have experience with
Safari and javascript?  A client wants to run our web application on his
iMac in Safari but I am getting some strange problems.  First off how do
you view javascript errors?  Please tell me there is a js console!

Here is my js that is causing the problem:
//this function takes the form to submit and where to submit it
function submitTemp(form,where)
{
  form.target="tempSaveIframe";
  form.method="POST";
  form.action=where;
  form.submit(); 
}

This bascially just submits a form to an iframe referenced by the name
tempSaveIframe.  This works on IE,FireFox,Mozilla,Netscape and so on,
but it fails in Safari.  In safari it opens a new window.  Which seem to
tell me that it does not recognize the iframe as a target.

I put in some alerts like so:

//this function takes the form so submit and where to submit it
function submitTemp(form,where)
{
alert("Form is:"+form);
  form.target="tempSaveIframe";
alert("Form Target is:"+form.target);
alert("iframe is"+window.frames["tempSaveIframe"].name);
  form.method="POST";
  form.action=where;
  form.submit();
}

In Safari the first two alerts are fine but it then dies on the third
alert.  But since there seems to be no js console to let me know what
the error is, I don't know what to do.  Has anyone seen this before?
Does Safari handle iframes differently?

Thanks for any help or suggestions.

Later


-- 
Devin Whalen
Programmer
Synaptic Vision Inc
Phone-(416) 539-0801
Fax- (416) 539-8280
1179A King St. West
Toronto, Ontario
Suite 309 M6K 3C5
Home-(416) 653-3982


Take back the Web with FireFox....a browser you can trust
www.getfirefox.com

   .-.
   /v\    L   I   N   U   X
  // \\  
 /(   )\
  ^^-^^   

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list