Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 10:37 AM
Joe Kraft
Guest
 
Posts: n/a
Default Help with Remote Scripting on Safari

I'm hoping that someone can help me out before I lose what color I
have left in my hair. I'm developing a website that relies on quite a
bit of remote scripting (see code below) so I can process things
without reloading the page. Anyway, everything works fine on IE and
Netscape for both the Mac and PC, and I do get the right results in
Safari for the Mac (ie, the item is added to the basket) but it also
opens the download manager window and shows that it is trying to
download the file that I'm using to process things on the server side.

Does anyone know a way to stop Safari's download manager from popping
up?


<CODE>
function callToServer(formName, formType) {
if (!document.createElement) {return true};
var IFrameDoc;
var URL = 'setBasket.aspx' + buildQueryString(formName);
if (!IFrameObj && document.createElement) {
// create the IFrame and assign a reference to the
// object to our global variable IFrameObj.
// this will only happen the first time
// callToServer() is called
var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','RSIFrame');
tempIFrame.style.border='0px';
tempIFrame.style.width='0px';
tempIFrame.style.height='0px';
IFrameObj = document.body.appendChild(tempIFrame);

if (document.frames) {
// this is for IE5 Mac, because it will only
// allow access to the document object
// of the IFrame if we access it through
// the document.frames array
IFrameObj = document.frames['RSIFrame'];
}
}

if (navigator.userAgent.indexOf('Gecko') !=-1
&& !IFrameObj.contentDocument) {
// we have to give NS6 a fraction of a second
// to recognize the new IFrame
setTimeout('callToServer()',10);
return false;
}

if (IFrameObj.contentDocument) {
// For NS6
IFrameDoc = IFrameObj.contentDocument;
} else if (IFrameObj.contentWindow) {
// For IE5.5 and IE6
IFrameDoc = IFrameObj.contentWindow.document;
} else if (IFrameObj.document) {
// For IE5
IFrameDoc = IFrameObj.document;
} else {
return true;
}
IFrameDoc.location.replace(URL);
return false;
}
</CODE>
  #2  
Old July 23rd, 2005, 04:45 PM
alexdavidson007
Guest
 
Posts: n/a
Default Re: Help with Remote Scripting on Safari

This probably won't help you much, but i am having the same problem on
another site, when an iframe calls up an ad. If you have any more info
on this, it would be much apreciated.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.