XMLHTTP not working in safari 5.1

This vbscript code does not work in safari 5.1.  It works fine in safari 6 and other browsers.

The page is at mysite.com/folder1/thispage.asp and is calling mysite.com/folder2/folder3/

I have a php on another domain and server calling the same thing by sending  a post and works fine as well.

Safari 5.1 just stops working at this point in the code.  In some cases, it downloads the asp page (just the rendered html).  When I take this out, all good.  I have tried loading this above all html and inside of html.  Same result.

      dim myData
		DataToSend = "d1=abc&d2=xyz"
		dim xmlhttp 
		set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
		xmlhttp.Open "POST","https://mysite.com/folder2/folder3/",false
		xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
		xmlhttp.send DataToSend
		Response.ContentType = "text"
		myData= xmlhttp.responseText
                Set xmlhttp = nothing

Open in new window

LVL 56
Scott Fell, EE MVEDeveloper & EE ModeratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
That doesn't make any sense.  That code runs on the server, not in Safari.  Any chance that the code that is being received is another complete page with <head> and <body> sections inside the <head> and <body> sections  of the main page?  Look at the 'View Source' and see if you're getting a properly formatted page when it works.
0
Scott Fell, EE MVEDeveloper & EE ModeratorAuthor Commented:
Yes, I was planning on checking that out today.   However, I created a wordpress plugin/function using the php version and it hits the same exact page from an outside domain and that works fine.  

Originally, I thought it might be a log in issue because of the way safari handles sessions and redirects.  But as I put breaks in my code, this is what I was able to isolate.  I just found a mac with safari 5 I can test more on today.  

I did try removing the response.write portion completely and moving the httppost above the html and  inside the html.  Even without writing the data it fails.  The incoming data is just a series of div's and tables without much white space.  I threw it in the validator and all good.  I even check the validation on the WP site and and found some old sql injection(not pertaining to what I did of course) but it still works.
0
Dave BaldwinFixer of ProblemsCommented:
I'm pretty sure that PHP and ASP will not generate 'exactly' the same code.  So the PHP version works and the ASP doesn't?
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Scott Fell, EE MVEDeveloper & EE ModeratorAuthor Commented:
The odd thing is it is only safari 5.1.  My client let me know and I confirmed it by finding a mac with 5.1.  It must be  the way xmlhttpost works on that browser.    I do want to test on some very plan content just to eliminate.  But the content it is loading is simply a series of h2 tags and tables and all validated.  I know there are multiple ways to send a  post and I may just use jquery ajax instead of classic asp.
0
Dave BaldwinFixer of ProblemsCommented:
It must be  the way xmlhttpost works on that browser

As I said above, it Can't be because the browser never sees that code.  That is run on the server.  The Only browser that will run any VBscript is Internet Explorer.  Even so, that code still runs on the server and not in the browser.  So it has to be something in the returned data, the content, that Safari 5.1 doesn't like.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott Fell, EE MVEDeveloper & EE ModeratorAuthor Commented:
yea, I will let you know when I test it out where the page it posts to will be just one word and nothing else.
0
Scott Fell, EE MVEDeveloper & EE ModeratorAuthor Commented:
This has been somewhat ongoing and I never figured it out although I stopped hearing complaints so I am just ignoring it.
0
Dave BaldwinFixer of ProblemsCommented:
Cool, thanks for the points.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.