How to create an href link....???

5 views
Skip to first unread message

Dave

unread,
Aug 1, 2006, 1:31:26 AM8/1/06
to Google Web Toolkit
Hi,

I want to create an href link in my page....The current Hyperlink
class only allows links to the sections of the same or current
page.....I want to create a link that allows to go some other site or
somewhere else.....like we usually do in our HTML pages. Can anyone
help me in this ???

Regards
Dave.

Mat Gessel

unread,
Aug 1, 2006, 1:46:56 AM8/1/06
to Google-We...@googlegroups.com
You can create external links with a HTML widget, e.g.
new HTML("Go to <a href='google.com'>Google</a>");

or an internal link with escaped quotes:
new HTML("Go to <a href=\"#myAnchor\">my anchor</a>");

or a not-terribly-useful event handler:
new HTML("Click for an <a onclick=\"alert('Alert!');\">alert</a>");

--
Mat Gessel
http://www.asquare.net

Dave

unread,
Aug 1, 2006, 2:20:03 AM8/1/06
to Google Web Toolkit
Thanks Mat. It really served my purpose. Thanks a lot

wodaxia

unread,
Aug 10, 2006, 12:37:28 AM8/10/06
to Google Web Toolkit
Well the problem is that doesn't work correctly. For example, the
current URL is
http://localhost:8888/com.google.sample.HelloWorld/HelloWorld.html
and then i place one link to the google like that:Go to <a
href='google.com'>Google</a>
When i press the hyperlink , the page go to :
http://localhost:8888/com.google.sample.HelloWorld/HelloWorld.html
http://localhost:8888/com.google.sample.HelloWorld/google.com while in
fact i just want to visit to the http://google.com

Frank van Puffelen

unread,
Aug 10, 2006, 7:18:13 AM8/10/06
to Google Web Toolkit
Did it occur to you to put http://google.com in the href then? So: <a
href='http://google.com'>Google</a>.

Marcos Araujo Sobrinho

unread,
Aug 10, 2006, 10:14:20 AM8/10/06
to Google-We...@googlegroups.com

hmm
try to do something like that:

Go to <a href='http://google.com'>Google</a>

:)

-----Mensagem original-----
De: Google-We...@googlegroups.com
[mailto:Google-We...@googlegroups.com]Em nome de wodaxia
Enviada em: quinta-feira, 10 de agosto de 2006 01:37
Para: Google Web Toolkit
Assunto: Re: How to create an href link....???
Reply all
Reply to author
Forward
0 new messages