PDA

View Full Version : JavaScript vs. Blind Man's Bluff


jessegut
03-08-2004, 08:32 PM
[Moderators note: Threadname modified to read JavaScript rather than Java (While Java is a full programming language, JavaScript is a browser-centric scripting language. They have syntax simularities and a similar name, thats all)]

Dear All,

I am completely and totaly Java ignorant, nor can I spell, but that's another issue.

Problem: I want to add a free news wire service to my web page.
The news wire service updates on a daily basis for free. They say, all you have to do is copy, paste, and personalize a particular Java Script to your page.

Here is the script I am using:

<script language="JavaScript1.1" src="HTTP://finance.news.prweb.com/js/index.php?expand=y&limit=20"></script><script language="JavaScript1.1">
<!--
var channel_begin = '<span style="font-size: 9.0pt"><font color="#000000">';
var item_begin = '<BR>';
var item_end = '<BR>';
var channel_end = '';
var list_begin = '<ul>';
var list_end = '</ul>';
var link_target = '_blank';
var show_title = false;

// Error message for unsupported browsers.

if(!(window.channels)) { document.write('Sorry! Your browser is unable to retrieve JavaScript channels.') }

// -->

</script><script language="JavaScript1.1" src="HTTP://www.prweb.com/js/channel_renderer.js"></script><noscript>Sorry! Your browser is unable to retrieve PRWEB.COM JavaScript news feed.</noscript>

SINCE A PICTURE IS SOMETIMES WORH A THOUSAND WORDS
THE LINK IS http://www.erijes.com/finance.html

If you go to the link you can see that the title of each news release is very, very hard to see. The script must be picking up something in my css or something.

How can I get this new alien Java Script to disregard the css and let me add font and color changes to the news release headlines?

Thanks for sharing your brains in advance!

pascal
03-09-2004, 06:38 AM
It is probably in the JS files that are being loaded. Wich are, I think, on their server.


uhmmmm, lets see.
Sincs the gray parts are you links, you can change them by putting this in the <head> section:

<style type="text/css">
a{
color: red;}
</style>

It worked for me, if I preview it.

jessegut
03-09-2004, 07:33 AM
Pascal,

Thank's for your help.

I placed the code you suggested between <head> and </head> at the top of the page, but it didn't change anything.

Have I placed your code in the wrong spot?

http://www.erijes.com/finance.html

Thanks again.

Jessegut

jessegut
03-09-2004, 07:48 AM
Pascal,

Please disregard my last note. I just figured out what I needed to do.

Once again,

Thanks a million!

Jessegut

pascal
03-09-2004, 07:52 AM
---
What I saw in your source:

<P class="text"><span style="font-size: 9.0pt"><font color="FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;Erijes Communications<BR>
&nbsp;&nbsp;&nbsp;&nbsp;536 Fifth Street<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Suite One<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Brooklyn, NY 11215<BR>
&nbsp;&nbsp;&nbsp;&nbsp;USA<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Phone: 718 - 832 - 8785<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Fax: 718 - 832 - 6445<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Email: <a href="mailto:contact_us@erijes.com"><span style="font-size:9.0pt">contact_us@erijes.com </a><BR><BR>
<BR><BR>
Why all the Non-Breaking Spaces?
If you would just add a left-margin too the <p> tag, it's al lot easyer.
Like this:

<P class="text" style="margin-left: 20px;"><span style="font-size: 9.0pt"><font color="FFFFFF">
Erijes Communications<BR>
536 Fifth Street<BR>
Suite One<BR>
Brooklyn, NY 11215<BR>
USA<BR>
Phone: 718 - 832 - 8785<BR>
Fax: 718 - 832 - 6445<BR>
Email: <a href="mailto:contact_us@erijes.com">
<span style="font-size:9.0pt">contact_us@erijes.com </a><BR><BR>
<BR><BR>

</body>
</html>

---

Bye,
Pascal

jessegut
03-09-2004, 12:02 PM
Pascal,

Thanks for the tip. I'll use it!

Jessegut