Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

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
 
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>
 

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.
 
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.
 

MoLaker

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
 
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.
 
Try for getting started in ASP.

From ASP101 is an example of how to write to a text file:

From ASP101 is an example of how to read from a text file:

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.
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.
 

xwb
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
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top