Logged Out
Create an Account
Login:
Password:

Forgot your password?
javascript help: text scroll area

javascript help: text scroll area
[Back to Index]  [Bottom of Thread]
Thread Tags
Primary: [Advanced Layout]
Secondary: None
looking at http://agonalbreath.dkpsystem.com/news.php for example there is a scroll area that shows text according to the persons rank.. i'm bad at javascript so i don't know how its calling the rank in the javascript and how u make the text scroll so any direction to a site or help would be appreciated

--
designer of http://aszune.dkpsystem.com
Scrolling text is fairly simple to do. There are several free scripts around as well as tutorials.

As for doing it by rank that is part of the dkpsystem.com architecture. Look in the advanced layouts page in the list of "Layout File Commands/Syntax" you will see "<!-- System:IfRank:XXX -->" and "<!--System:EndIfRank-->" there with an explanation.

So once you have the javascript you could do something like this:

<!-- System:IfRank:1 -->
<div id="rank1">

</div>
<!--System:EndIfRank-->
<!-- System:IfRank:2 -->
<div id="rank2">

</div>
<!--System:EndIfRank-->
<!-- System:IfRank:3 -->
<div id="rank3">

</div>
<!--System:EndIfRank-->
<!-- System:IfRank:4 -->
<div id="rank4">

</div>
<!--System:EndIfRank-->

So forth and so on up to the whatever number of ranks you have.
While you can script your scrolling text... there is an HTML object called Marqee that does this for you.

Thus there would be no coding involved. Using the System:IfRank examples that Kriknosnah gave... instead of creating a DIV, just create a MARQUEE.


For more info on the Marqee, including some examples, look at:

http://msdn2.microsoft.com/en-us/library/ms535851.aspx

This will show you all Properties of the object too... such as styles you can apply, etc.

Do not use MARQUEE.

MARQUEE was a tag that microsoft made up for IE. The MARQUEE tags are not a W3C standard and as such will not work in all browsers. And of the browsers that do support it each have differences in how you should use it.
While you are correct that the Marquee Element was designed by MS, and isn't a standard, it is also the most Noob friendly implementation of the effect.

Furthermore, it does work in IE (currently 90% of the Browser market) as well as Firefox... both Windows and MAC versions. I'm unsure of Safari, so all your non-FF Mac users might be out of luck. I also believe it works in Opera.

Unless your Guildies are using some obscure version of a Browser for Linux or something, the vast majority (if not likely all of them) will have browsers that work just fine with Marquee.

Therefore, with the above being a fairly solid fact, I'd suggest you feel free to use a Marquee tool for your site. (Now if you were an E-Commerce site, I'd HIGHLY suggest otherwise. In this case however, you should be fairly safe to use it).

I'm not one to avoid user friendly tools for the sake of avoidance. It should be scenerio specific. In a Business, it would be unwise to use the Marquee because you have potential to lose customer accessibility to your site, which (while perhaps a small margin of customers) is a poor business practice. In this case however, you need to consider the real-life implications of using the Marquee... the negatives are minimal, if at all.


On the flip side... if you are adamant about being W3C strict, then you are stuck with either Scripting or Flash... neither of which are DHTML Noob friendly. Still, if you want to check out a decent script, look at this:

http://www.javascriptkit.com/script/script2/sequentialtext.shtml

There are others that are also True Marquee scripts, but I just found this on short notice. Feel free to google stuff.
Your right it does appear that it has become some what common amongst the more widely use browsers (at least the most recent versions) and as such could be used. But I would add a warning as there are no standards you may find a big difference in how each displays it.

Further as W3C has instructions on how to disable it in browsers I am guessing most die hard designers may have that setup.

Further you have to address the issue of what happens when W3C decides it's time to implement the next version of HTML standards and it has it own MARQUEE tag, and it works entirely differnt from all the current ones. That could create a big mess.

I would lean towards a javascript solution just avoid the headach.
Heehee... Geeks Gone Wild!

borkjev... you bored with our Computer Nerd conversation yet?

To continue it... The thing about W3C, is that they aren't likely to approve the next standard anytime soon. For starters, they're still reviewing CSS3 standards that were first introduced in 2002. (or as they aren't even considered standards yet, they are still up for approval to "become" standards that can then be voted on)

So fear of a sudden change in specs is kinda far fetched. First, they need to be approved of, then voted on... and aside from the CSS3 having a mention of marquee styles for standard text objects, there's no Marquee tag even mentioned in any of the HTML, DHTML or CSS standards.

Therefore, you can be confident that the Marquee Element won't become a W3C standard for quite sometime.

As for designers disabling them... they can only disable them if they access to the webcode... which in this case is being designed by someone who wants it.

However, the key argument I do have to agree with is that display can vary based on the type of browser. That said, I can say that (provided you use the basic functions of the marquee) IE and Firefox and Opera display it in a very similar if not identical manner. (A couple of variance issues include image display within a marquee). Those 3 are a HUGE portion of the Browser market. Given the likely user of the DKPSystem website... I'm willing to wager that there shouldn't be too much fear (if at all) that any of your site visitors won't be able to view your marquee.

Besides, in most cases where a marquee isn't rendered, the end result is static text (as opposed to no text at all). This is not a too troublesome concern.

As a result, I'd say that unless you have a solid understanding of javascript as an end-user... I'd still stick with the Marquee tag.
Quote by Noblekain
Heehee... Geeks Gone Wild!

borkjev... you bored with our Computer Nerd conversation yet?


LOL

Quote by Noblekain

As for designers disabling them... they can only disable them if they access to the webcode... which in this case is being designed by someone who wants it.


Actually it easier than that, you can setup your own style sheet for the browser and there is a way to force individual styles to comply 100% with W3C standards. I can't remember how it's done but I am sure it in on their site.

You have to forgive my insistance on W3C compliance. I have been coding since at least the late 90's may be longer and things like marquee have come and gone in the past. And all it takes is one new browser version and your ingenius design is now completely usless. You should see my code from some of the first sites I did (I keep all my code) most of it is completely unrecognisable.

Quote by Noblekain

they're still reviewing CSS3 standards that were first introduced in 2002. (or as they aren't even considered standards yet, they are still up for approval to "become" standards that can then be voted on)


I did know this was next and it has been long overdue. If they don't changed it too much this will bring in styles that allow for basic geometric shapes, drop shadows and a a variety of other handy tricks that currently have to be done by graphics or ingenius codeing.
Quote
Actually it easier than that, you can setup your own style sheet for the browser and there is a way to force individual styles to comply 100% with W3C standards. I can't remember how it's done but I am sure it in on their site.


You learn something new everyday. I never realized this was possible... though of course, I haven't spent "too much" time reviewing IE7 changes or the latest FF changes. That's pretty cool, and I need to look into this. I'd love to enforce some of my own, on plenty of sites.


Quote
You have to forgive my insistance on W3C compliance. I have been coding since at least the late 90's may be longer and things like marquee have come and gone in the past. And all it takes is one new browser version and your ingenius design is now completely usless. You should see my code from some of the first sites I did (I keep all my code) most of it is completely unrecognisable.


Heehee, I do know what you mean. I've been coding DHTML/ASP since 99 and much of my stuff is... well, I just look back and go "What was I thinking?!" all the time. Heck, some of my webcode from a year ago, I say the same thing.

I must admit though, that I have a different mentality than most when in regards to standards. I'm all for them , and find them entirely important... but I think conditions allow for rules to be broken if the risk is right. MS deisgns a LOT of DHTML coding for their browser which isn't usable anywhere else... but it makes life SOooooo much easier in many areas, and sometimes adds some stellar functionality.

Obviously, Marquee is an archaic example of that... Still, it's become a standard in it's own right... just like 'Noob' is a gaming lingo standard because it's been widely adopted.

I predominantly code for IE 6.5+ compliance as I write B-to-B applications where I can enforce the Browser type. However, I understand W3C compliance as all my apps aren't totally B-to-B apps. Still, it gives me a bent toward situational rules. If the risk isn't as bad as the gain... go for it. Just be aware of what the risk IS.
btw i didn't use the scroll text code since it wasn't important but you can have your discussion of which i don't get a thing

--
designer of http://aszune.dkpsystem.com
Quote by borkjev
btw i didn't use the scroll text code since it wasn't important but you can have your discussion of which i don't get a thing


LOL

Well fine then we will . No, really this light compared to some other forums I use. Just hope it helps someone. One thing I know is that by the time you are done with your site you will come back here and will be like oh? OH! thats what they ment by that. It happens to me every time I undertake some major project that is going to have some insane new concept in it and when I finally get it all to work I realize what some tutorial or post by someone else ment by some incomprehendable bit of instruction.
well i never ever used HTML/javascript/css before this site and i don't study any of those nor webdesign or anything so i don't and wont' have a clue what you are talking about i just see from others learn and do

--
designer of http://aszune.dkpsystem.com
Quote by borkjev
i just see from others learn and do


Well it looks like you know my entire history of how I learned to program.

Truthfully hands on is the best way to learn it and once you get half a grasp of html and css you will begin to look for use full techniques in other, true, programing languages (php asp mysql ect.) like you did with javascript. You'll be a web techie in no time.



[Back to Index]  [Top of Thread]