gerkintrigg Posted December 28, 2010 Share Posted December 28, 2010 Hi Forum! I have been creating a demo for a new bit of software I've written, and it works fine in everything except Safari. The URL is: http://www.manteya.com/demo/index.php so if anyone has any idea why the ajax script stops after step 2, then please let me know. Thanks, Neil Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/ Share on other sites More sharing options...
BlueSkyIS Posted December 28, 2010 Share Posted December 28, 2010 i don't see any ajax on that page. do you mean Javascript? or is the ajax in an external .js file? anyway, there are some thing wrong with the HTML syntax that might cause problems. the most obvious that jumps out is the repeated use of id nav_link. all id's must be unique on a page. there is also a close </a> without an open, and various errors related to tags and the document type. but i suspect the repeated use of id='nav_link' might be the primary problem. Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152288 Share on other sites More sharing options...
gerkintrigg Posted December 28, 2010 Author Share Posted December 28, 2010 Thanks for that - I changed the id tags into classes and it now seems to be working. Thanks a lot for that. I'm not sure where the </a> tag was... but thanks anyway. I notice that W3C doesn't like my Ajax script at all... Might have to do something about that. Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152312 Share on other sites More sharing options...
the182guy Posted December 29, 2010 Share Posted December 29, 2010 It doesn't feel like AJAX, it just feels like a traditional page load because the browser appears to scroll to the top of the page on click through of the demo. What actually happens is the large image is destroyed and for a moment the page resizes itself and that causes the scroll up effect. To solve that put the demo in a containing div that has a height equal to the height of the big graphics. Also it would look good if you faded in the next image. Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152685 Share on other sites More sharing options...
gerkintrigg Posted December 29, 2010 Author Share Posted December 29, 2010 Good advice about the div restraints... Fading in sounds fun - how'd I do that? Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152733 Share on other sites More sharing options...
gerkintrigg Posted December 29, 2010 Author Share Posted December 29, 2010 and which browser are you using? Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152738 Share on other sites More sharing options...
the182guy Posted December 29, 2010 Share Posted December 29, 2010 Firefox 3.6, the same thing happens in Chrome but only on the first step. Fade is is very easy using jQuery: http://api.jquery.com/fadeIn/ Not sure how it would look with the images being a fair size, might need to preload them and use a loading gif. Quote Link to comment https://forums.phpfreaks.com/topic/222836-ajax-not-workingin-safari/#findComment-1152755 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.