.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Falklands War: 1982- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #1  
Old June 1st, 2008, 08:10 AM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Spell Guide Beta-0

Quote:
Zentar said:
The concept is great and I like that it does searches for specified spell requirements, but I get this message when using it on my MAC "Exception while loading: TypeError: Null value". I am part of the 75%.
That is because the code requires that the browser has support for the XSLTProcessor. KHTML, which is being used by Konqueror and Safari, does not. I think that support for MSIE can be added quite easily by adding the following code snippet from the XMLHttpRequest Wikipedia page: Code:
/**
* Bridge XMLHTTP to XMLHttpRequest in pre-7.0 Internet Explorers
*/
if( typeof XMLHttpRequest == "undefined" ) XMLHttpRequest = function()
{
try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
throw new Error("This browser does not support XMLHttpRequest or XMLHTTP.")
};

I didn't get to test it, though.

Unless KHTML implements XSLTProcessor support, this page won't work for Konqueror and Safari. But in case Snoddasmannen wants to add support for them, I think that a cross-browser wrapper library named Sarissa takes care to add just this functionality for browsers.
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote
  #2  
Old June 1st, 2008, 05:08 PM

Snoddasmannen Snoddasmannen is offline
Private
 
Join Date: Nov 2007
Posts: 35
Thanks: 7
Thanked 20 Times in 5 Posts
Snoddasmannen is on a distinguished road
Default Re: Spell Guide Beta-0

lch, does IE really have XSLTProcessor, or some ActiveX equivalent? If not it will take more than wrapping around XHR :/

Anyway, if I'm going to spend some time making this thing work for everybody then I think I might as well just move all the logic to the server side, with a simple form interface. Not many will be able to tell the difference, and even fewer care about it Plus I really dislike browser specific workarounds ... I'm happy that this code is running in both Opera and FF without any iffery.

But instead of working on the spell guide, I spent time rewriting my map generator instead. Now with fractals If it gets good, I'll release the source.
Reply With Quote
  #3  
Old June 2nd, 2008, 07:49 AM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Spell Guide Beta-0

Quote:
Snoddasmannen said:
lch, does IE really have XSLTProcessor, or some ActiveX equivalent? If not it will take more than wrapping around XHR :/
I honestly have no idea about MSIE, I'm on Linux. Maybe the Microsoft FAQ can help you on that. Here's a code listing how to do the same transformation on both the Gecko engine and Internet Explorer: http://michael-steiner.net/JavaScript_XSLT.php

For perfect wrapping in any JavaScript browser, I guess you should use Sarissa like I wrote before.

Quote:
Snoddasmannen said:
But instead of working on the spell guide, I spent time rewriting my map generator instead. Now with fractals If it gets good, I'll release the source.
Hurry up then!
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 10:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2026, Shrapnel Games, Inc. - All Rights Reserved.