struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raible, Matt" <Matt_Rai...@cable.comcast.com>
Subject RE: Javascript & bean:message
Date Wed, 22 Jan 2003 13:10:49 GMT
Just to share another JavaScript tip I learned recently...

If I have an <a href="" onclick="" /> and I need to stop the "href" from
doing anything, I've often used href="#" or href="javascript://".  The
problem with # is that it sometimes causes the page to go to the top, and
javascript:// can look like a JavaScript error to the user (in the bottom
left of the screen, on the status bar).  I found that using href="?" works
pretty good and seems to alleviate both of the above issues.

I discovered this over at http://webfx.nu when I implemented the help tool
tip (http://www.webfx.nu/dhtml/helptip/helptip.html) into my application.

HTH,

Matt

> -----Original Message-----
> From: Thomas CORNET [mailto:thomas@cornet.name]
> Sent: Wednesday, January 22, 2003 6:02 AM
> To: Struts Users Mailing List
> Subject: RE: Javascript & bean:message
> 
> 
> 
> I know.. It's just a long time coding habit that is hard to lose   ;-)
> 
> At 05:46 22/01/2003 -0700, you wrote:
> >FYI...
> >
> >in an onclick event, you do not need to prefix the method name with
> >javascript:
> >
> >;-)
> >
> > > -----Original Message-----
> > > From: Thomas CORNET [mailto:thomas@cornet.name]
> > > Sent: Wednesday, January 22, 2003 5:39 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: Javascript & bean:message
> > >
> > >
> > >
> > > Yes it is possible. I had something like this :
> > >
> > > <input type=checkbox name="all"
> > > onClick="JavaScript:selectAll(<bean:write
> > > name="recherche" property="nbresults" />);">
> > >
> > > and it's working well :)
> > >
> > > Thomas
> > >
> > > At 12:31 22/01/2003 +0000, you wrote:
> > > >Is it possible to have a <bean:message> tag as a parameter
> > > to a javscript
> > > >method?
> > > >
> > > >ie.
> > > >         onchange="javascript:myFunction(<bean:message
> > > >key='button.search'/>)" />
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >*************************************************************
> > > *******************************
> > > >" This message contains information that may be privileged
> > > or confidential
> > > >and
> > > >is the property of the Cap Gemini Ernst & Young Group. It is
> > > intended only
> > > >for
> > > >the person to whom it is addressed. If you are not the
> > > intended recipient,
> > > >you
> > > >are not authorized to read, print, retain, copy,
> > > disseminate, distribute,
> > > >or use
> > > >this message or any part thereof. If you receive this
> > > message in error,
> > > >please
> > > >notify the sender immediately and delete all copies of this
> > > message ".
> > > >*************************************************************
> > > *******************************
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> > >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
> >
> >
> >--
> >To unsubscribe, e-mail:   
<mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message