I'm using Joris' google search API:

import be.boulevart.google.ajaxapi.search.news.data.GoogleNewsItem;
import be.boulevart.google.ajaxapi.search.news.GoogleNewsSearch;
import be.boulevart.google.events.GoogleApiEvent;
import be.boulevart.google.events.GoogleAPIErrorEvent;
import be.boulevart.google.ajaxapi.search.GoogleSearchResult;

var googleNewsSearch:GoogleNewsSearch=new GoogleNewsSearch();
googleNewsSearch.search("Theft",0,"d","Los Angeles","en");
googleNewsSearch
.addEventListener(GoogleApiEvent.NEWS_SEARCH_RESULT,onWebResults);
googleNewsSearch
.addEventListener(GoogleAPIErrorEvent.API_ERROR,onAPIError);


function onWebResults(e:GoogleApiEvent):void {
        var resultObject:GoogleSearchResult=e.data as GoogleSearchResult;
trace("Estimated Number of Results: "+resultObject.estimatedNumResults);
        trace("Current page index: "+resultObject.currentPageIndex);
        trace("Number of pages: "+resultObject.numPages);

        for each (var result:GoogleNewsItem in resultObject.results) {
                trace(result.title, result.url);
searchResults.htmlText = searchResults.htmlText +result.title, result.url;

        }
}

function onAPIError(evt:GoogleAPIErrorEvent):void {
trace("An API error has occured: " + evt.responseDetails, "responseStatus was: " + evt.responseStatus);
}




--
Carl Welch
http://www.carlwelch.com
http://blog.jointjam.com
[email protected]
805.403.4819





On Jun 5, 2009, at 5:50 PM, Karl DeSaulniers wrote:

Can we see your code where you assigning the URL?

Sent from losPhone

On Jun 5, 2009, at 6:33 PM, Carl Welch <[email protected]> wrote:

Hi Guys & Gals,

I am having a hard time getting htmlText to link their hrefs properly.

example here:
http://www.carlwelch.com/searchTest.html

I have the href target set to "_blank", but when the link is selected, my server address (http://www.carlwelch.com/) gets added to the beginning of the url, like this:

http://www.carlwelch.com/http%3A%2F%2Fwww.metnews.com%2Farticles%2F2009%2Fhanl060309.htm

... how can I prevent this from happening???


Thanks!!
--
Carl Welch
http://www.carlwelch.com
http://blog.jointjam.com
[email protected]
805.403.4819





_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to