To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Tools > Misc Tools

Misc Tools Discussion regarding tools that don't have their own forum.

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-27-2005, 01:31 PM   #1
autocolismo
Senior Member
 
autocolismo's Avatar
 
Join Date: Sep 2002
Location: Portugal
Posts: 174
marquee

yo,

i'm starting to $_GET an Heart Attack .
It's a SMALL problem with an marquee.

The thing is: i have a site where i use a marquee, the whole site is in index.php in wich i include other files as needed. When i click a link the marquee start's again at position "0" (of course).
So it's a little boring seeing it starting all over again.

I'm tired of reanding and searching. The best thing so far is setting scrollLeft.

Code:
<marquee name="test" id="test" scrollAmount="2" scrollLeft="<?php echo $_GET['pos'];?>">marquee text</marquee>
But this doesn't work, the marquee goes to the position desired, then right back to the begining.

After 15547898 beers i saw the light...
I could set scrollAmount to that desired value, at the first move the marquee goes to the desired position the set the scrollAmount to "2" again.

It should work.
But how do i make it work??? :s
something like this:
Code:
<script language="javascript">
pos(<?php echo $_GET['pos'];?>);


function pos(ya) {

	if (test.scrollLeft < ya) {
	test.scrollAmount = ya
	} 
// after the marquee moves set the scrollAmount back to 2
test.scrollAmount = 2;
//doesn't work... of course :s
}
</script>
If anyone can help me i would apreciate, untill then i'll keep drinking to find a solution
__________________
..:oOOoo::..
autocolismo is offline   Reply With Quote
Old 07-04-2005, 10:34 AM   #2
autocolismo
Senior Member
 
autocolismo's Avatar
 
Join Date: Sep 2002
Location: Portugal
Posts: 174
Found a solution
Example:

Code:
<script language="JavaScript" type="text/JavaScript">
function MM_goToURL() {
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function move(x) {
mar.scrollAmount = x;
}

setTimeout('move("<?php echo $_GET['u'];?>")',0100);
setTimeout('move("2")',0200);

</script>
<marquee name="mar" id="mar">lkjlskaj dlkjasldk joaius duh ilhgvljfg lifusdliuh flgjhlkshdlfj gjgçlskdhf dugh ugh iuhoiuh ohbdsoifbgi oi h siudhfoi goiuhsiouhd foiuh giu hsdoifuhio suhgiosudfhgoiusdh ioguhds oiuhsdfihg sgsdf gsdfg sf</marquee>
<a href="#" onMouseUp="MM_goToURL('parent','<?php echo $_SERVER['PHP_SELF'];?>?u='+mar.scrollLeft);return document.MM_returnValue">test link</a>
__________________
..:oOOoo::..
autocolismo is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 10:48 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.