×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

A way to use text in a marquee from another source
2

A way to use text in a marquee from another source

A way to use text in a marquee from another source

(OP)

Hi Guys

Is there a way around to use a marquee in front page but populate the text from a different source.

What we are trying to achieve is to publish a website from one location but when the "Events" that are being shown in the marquee change, we need to change that from a diffrent location to that where the site is published.

If not in FrontPage, can any suggest an alternative?

We are using FrontPage 2000.

Many thanks
KB

RE: A way to use text in a marquee from another source

Not too sure what you want.  Have a look at this.  You may be able to modify SetMarq to do what you want.  This has been written in VBScript but you can change it to javascript if that is your preferred language.

CODE

<html>

<head>
<title>Tek-tips qid=1445730</title>
<script language="vbscript">
sub B1_onclick
   SetMarq "the five"
end sub

sub B2_onclick
   SetMarq "boxing wizards"
end sub

sub B3_onClick
   SetMarq "jump quickly"
end sub

sub SetMarq (astr)
   set marq = document.getElementById ("fred")
   set newtext = document.createTextNode (astr)
   set oldtext = marq.firstChild
   marq.replaceChild newtext, oldtext
   set oldtext = nothing
end sub
</script>
</head>

<body>

<p>
<marquee name=fred id=fred>the quick</marquee></p>

<input type="button" value="the five" name="B1">
<input type="button" value="boxing wizards" name="B2">
<input type="button" value="jump quickly" name="B3">
</body>

</html>

RE: A way to use text in a marquee from another source

(OP)

Hi xwb

Thats a very impressive piece of code which I'm sure could be adapted but I do not think it will work in our scenario.

Perhaps I could explain that I maintain a website which is uploaded to a server. The index.htm page has a scrolling marquee generated by FrontPage 2000. So as an example we have "New event for February 2008..." in the marquee text.

That works ok but what we are trying to set up is something that can keep the marquee scrolling but allow somone else to change the text "New event for February 2008..." to some other wording without me having to do it.

This would be straight forward if we both had access to the web pages on the site but we don't and in any case, it is only the wording of that marquee that requires changing which may be frequently.

I hope that makes sense and thank you for your prompt reply.

RE: A way to use text in a marquee from another source

Quote:

we are trying to set up is something that can keep the marquee scrolling but allow somone else to change the text
The only way the marquee can be changed is to update the web page at the server then refresh the page at the browser.
Now, it may be possible to allow a 3rd party to change the marquee text using scripting like ASP or PHP.  You would have to have a script page which would allow the 3rd party to input the desired text, then have the page write that text to a text file on the server.  Then the page that displays the marquee (would also have to be .ASP or .PHP) could read the text file to get the marquee text.  But, it would still require refreshing of the page to get the new marquee text.

"Retired Programmer".  So, please be patient.

RE: A way to use text in a marquee from another source

(OP)

MoLaker

Quote:

Now, it may be possible to allow a 3rd party to change the marquee text using scripting like ASP or PHP.  You would have to have a script page which would allow the 3rd party to input the desired text, then have the page write that text to a text file on the server.

Thats the sort of thing we are looking for. Can you (or anyone else) point me in the right direction where I can find some examples to accomplish this?

Some guidance not the sollution would be most advantageous.

Thank you

RE: A way to use text in a marquee from another source

Does anyone have access to files on the server?  If someone has access to files on the server, it is quite easy to knock up an asp script to read the file and modify the current page.

They can just modify the file and the message will change.

RE: A way to use text in a marquee from another source

Try http://asp101.com/default.asp for getting started in ASP.

From ASP101 is an example of how to write to a text file:
http://asp101.com/samples/textfile_w.asp

From ASP101 is an example of how to read from a text file:
http://asp101.com/samples/textfile.asp

ASP will require basic understanding of VB scripting.  I'm not certain of your scripting skills, so you may have a good bit to learn.  There is an ASP forum which would be a good place to park for a while as you develop these skills.  http://www.tek-tips.com/threadminder.cfm?pid=333

ASP is server side scripting which produces the HTML required for a webpage on-the-fly.  The concept for your marquee project would be to create a webpage that allows the user to enter text and have that text stored on the server in the form of a text file.  The sample given only shows how to write text to a text file, not how to create the text initially.  The text in the example can be a variable instead of actual text as is shown.  The variable can be the result of a user entering text into a form.

Typically, the logged on user is anonymous.  And typically, that user does not have write permissions on the website.  This will have to be addressed.  Ideally, the user that is allowed to make marquee changes would NOT be anonymous, but you can provide some measure of security by not having a link to the marquee change page - just give only that person the URL.  The directory where the text file is written should be a special directory solely for that purpose since the anonymous user would have to have write permissions. There are better, more secure ways, but this would be a start.

"Retired Programmer".  So, please be patient.

RE: A way to use text in a marquee from another source

(OP)

xwb

Quote:

Does anyone have access to files on the server?
I can set up an FTP access if required for the particular user who would update the marquee.

MoLaker

Quote:

The concept for your marquee project would be to create a webpage that allows the user to enter text and have that text stored on the server in the form of a text file.
Now I am on the right track. My knowledge of html/php is fairly good but not had much to do with active server pages.

No problem, I'm willing to give it a go and thanks for the links on this thread.

You guys have given me some great pointers, worthy of a star guys.

My sincerest thanks

Lee

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close