Sorry Al,
You'd use it like:
safeEmailBold("james.laugesen", "gmail.com", "LAUGESEN, ", "James");
Notice the 4 values, 1 per parameter of that function...
So "LAUGESEN, " is what you want to be bold, and "James" is the non-bold.

Also I think it'd be worth a couple of hours of your time to just play through the JS tutorials on www.w3schools.com.
JS is just programming, so it'll be knowledge you'll undoubtly be glad to have and I'm sure you're enjoy it - since you're nerdy enough to be posting the WSG after all =8-P

Cheers

On 14/06/06, Al Kendall <[EMAIL PROTECTED]> wrote:
Hi James,
              Yes I did notice the extra parameter, but I don't understand what or how it works.
Do I need to add additional script to make that parameter work.    Yes as I said before I'm
a 'dummy' when it comes to JS.

Al


On 6/13/06, James Laugesen < [EMAIL PROTECTED]> wrote:
Al, notice I added an extra parameter to your function:
safeEmailBold(name, domain, boldDisplay, normalDisplay )

It's not a perfect solution, I just wanted to make a somewhat cleaner _javascript_ function for you to play with.

J

On 13/06/06, Al Kendall < [EMAIL PROTECTED]> wrote:
Hi James,
              Thanks for that, unfortunately it's still not working properly.   It bolds the
whole name as well as adding the word 'undefined' after the name which is bold
after i added the css .EmailLink {font-weight:bold;}

I'll wait until you get your "nicer" script working... here's the other half of my script

<script type=
'text/_javascript_'>safeEmailBold('shirazman','hotmail.com','BUCHANAN, Mark (Buck) ')</script


>

Thanks James

Al


On 6/13/06, James Laugesen <[EMAIL PROTECTED]> wrote:
Hi Al, something like this:

function safeEmailBold(name, domain, boldDisplay, normalDisplay)
{
    var emailLink='<a href="" name +'@'+ domain +' class="EmailLink">';
    emailLink+='<b>' + boldDisplay +'</b>'+ normalDisplay;
    emailLink+='</a>';
    document.write(emailLink);
}

But you inspired me to write a "nicer" solution so I'll post a link to that in a minute when I've finished.

J

On 13/06/06, Al Kendall <[EMAIL PROTECTED]> wrote:
Thanks James,
                      Being very new to _javascript_ I have little idea on how to accomplish your
sujestion.   My aim is to have just the surname bold.   (ie: BUCHANAN)

You sujest I add css to the safemail function.   The only css I can add to it and get working
bolds the who name (surname, christian & nick name)  [see sample script]    If you can
show me how I can just have the surname bold i'd appreciate it others wise I'll have to try
something else.

function safemailbold(name, domain, display) {

displayed=(typeof(display)=="undefined") ? name+"@"+domain : display
document.write('<a href="" + name + '@' + domain + ' class="bold">' + displayed + '</a>');
}


Cheers!!
Al



On 6/12/06, James Laugesen < [EMAIL PROTECTED]> wrote:
Hi Al, it doesn't make sense to be performing formatting inside the script like that, think about what you're really trying to acheive.

I'd at least do something like:
safemail('shirazman',' hotmail.com','BUCHANAN', 'Mark (Buck)')
and the safemail function does semanticly nice html, with css for the bold'ness.

J



On 12/06/06, Lachlan Hunt <[EMAIL PROTECTED]> wrote:
David Dixon wrote:
> Hi Al,
>
> Someone might be able to correct me, if my info is not totally accurate,
> but if memory serves the following applies:
>
> The <b> tag is deprecated in XHTML 1.0, and not allowed in strict

No it is not deprecated.  It is declared in the XHTML 1.0 Strict DTD.
http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_b

> The <strong> tag is perfectly valid in XHTML, but in strict, it cannot
> be a direct child of the body tag, nesting it in a div/span/p etc though
> should be fine.

That is not the problem, the problem is the way in which it is used
within the script element.

This explanation applies to HTML:
http://www.htmlhelp.com/tools/validator/problems.html#script

For XHTML, you need to use a CDATA section as I explained in my previous
post.  For backwards compatibility (i.e. serving XHTML as text/html) you
should use a combination of both techniques)

--
Lachlan Hunt
http://lachy.id.au/


******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



--
Cheers!

Al Kendall

******************************************************

The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



--
Cheers!

Al Kendall
******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



--
Cheers!

Al Kendall
******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************


******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to