1

Im trying to connect to a tcp socket using xmlsocket:

    var xmls = new XMLSocket();

    function connect() {
        xmls.onConnect = function(success) {
            if(success)
                connected = true;
        };
        xmls.connect("localhost", 18757);
    };

    setTimeout(connect, 1500);

but when the browser tries to perform xmls.connect I get the exception:

Uncaught TypeError: Object # has no method 'SetVariable' __XMLSocket.connect

I guess because it tries to do:

    __flash.SetVariable("__serverPort",port);

I tried to find the problem but I can't find something about it and Im clueless with flash. any ideas?


Alternative to iframe for giving purchaser information and allowing purchaser to input whether item was bought on another website?

I need some help and out-of-the-box thinking, because I'm genuinely stumped.

I'm making a gift registry website (like for wedding registries). The idea is that the person making the gift registry can add items from anywhere on the web (say, target.com). Then, when someone wants to buy them an item off the registry, they come to our website, find an item, click on the link and are taken to the product page (on target.com) and buy the gift.

The problem is that we need to know if the product was actually purchased so the gift isn't purchased multiple times. Also, we need to give the purchaser the address of the person for whom they're buying a gift.

Here's what we'd like to do:

Unfortunately, the only way I can think of how to do this is through an iframe, which doesn't work with many large retailers (like Amazon and Wal-Mart), which have blocked iframes for legitimate security reasons. Another option is opening two new browser windows, but that's just ugly.

So, what else can I do? Any brilliant JavaScript/css/php or whatever solutions out there?

4

0 回答 0