View Full Version : Formatting font query

05-29-2012, 08:47 PM

I have a basic Web chat script that combines JS and ASP. I am trying to format a snippet of code so that I can change the font size, nothing else.

Part of the chat uses a couple of ASP snippets:


<%= getMsg("logout.no_longer_on") %></p> in a file called 'expired.asp' and this:

} // > function onUsersChanged(..)

* This user has logged off.
function onLoggedOff() {
alert('<%= getMsg("logout.no_longer_on") %>');
parent.location.replace('<%= LOGGED_OUT_PAGE %>');

// -->

in a file called 'message.asp'.

These two snippets draw on this:
# logout screen
logout.no_longer_on=You are no longer logged on. Thank you for your visit. which is contained in another file called 'messages.en' in order to thank the visitor who is logging off.

What I would like to do it font-format this: You are no longer logged on. Thank you for your visit., but I am not sure how to do it.

Thanks for any advice.

Old Pedant
05-29-2012, 10:14 PM
Okay, for starters, you can't format alert( ) output.

You should probably stop using alert( ) as soon as possible, anyway, as some browsers now give users the option to turn off alerts.

But in any case, the code for

<p><%= getMsg("logout.no_longer_on") %></p>

is easy. Just do it *right* using, CSS.

<p style="font-weight: bold;"><%= getMsg("logout.no_longer_on") %></p>

or, even better,

<p className="ImportantMessage"><%= getMsg("logout.no_longer_on") %></p>

and then supply a style for that class in your <style> section of the page.

05-29-2012, 11:10 PM
That's great stuff, Old Pedant - thank you!

(I don't really know what the 'alert' was there for. I downloaded the files - the author stated they were available to be customised - but even without modification I couldn't see one of the 'alert' dialogue boxes pop up anywhere).

I have now removed it as you suggested, and it works fine without it.

Thanks again.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum