New Posts  All Forums:Forum Nav:

JavaScript help

post #1 of 6
Thread Starter 
I made a simple website for a college assignment and the next assignment requires me to use 3 examples of JavaScript in the site.

I have 2 examples so far, on brings up a message box upon clicking a button and the other displays the date and time the page was last updated, onto the point...

I am trying to get a message to scroll in the status bar of the web browser, this is the code i found on the net.

<Script Language="JavaScript">
var msg="Games 'R Us - Home"
var space="... ..."
var pos=0;
function ScrollMessage()
{
window.status=msg.substring(pos,msglength)+space+
msg.substring(0, pos);
pos++;
if (pos>msg.length) pos=0;
window.setTimeout("ScrollMessage()", 200);
}
ScrollMessage();
</script>


what is wrong with the code?

i have gotten it from a few different sources so i can not figure out why it will not work, where abouts on my page do i need to put it? I'm editing in notepad as i dont have dreamweaver at home and i'm a HTML and JS noob so this is quite advanced for me. I gotta hand in this piece of work in the morning to pass the course so i beg for fast help.

thanks in advance.
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
post #2 of 6
Bump for tudj, since I see no reason why this should not work. Rather confused here, myself.
Morpheus Mini
(7 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700T SN970 GTX 960 Crucial CT102464BF160B 
Hard DriveOSAudio
Samsung 850 Evo M.2 Windows 10 Pro MOTU Audio Express 
  hide details  
Reply
Morpheus Mini
(7 items)
 
  
CPUMotherboardGraphicsRAM
i7-6700T SN970 GTX 960 Crucial CT102464BF160B 
Hard DriveOSAudio
Samsung 850 Evo M.2 Windows 10 Pro MOTU Audio Express 
  hide details  
Reply
post #3 of 6
Thread Starter 
ok i fixed it.
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
post #4 of 6
Actually new browsers are disabling the abilty to change that text. Phishers use this method to hide link locations. I have seen a few work-arounds, but in general newer browsers will ignore (by default at least) any status text that you set.

Lets hear it for low-life scum ruining something else for the rest of us.
Main Rig
(15 items)
 
  
Reply
Main Rig
(15 items)
 
  
Reply
post #5 of 6
Thread Starter 
Quote:
Originally Posted by BFRD View Post
Actually new browsers are disabling the abilty to change that text. Phishers use this method to hide link locations. I have seen a few work-arounds, but in general newer browsers will ignore (by default at least) any status text that you set.

Lets hear it for low-life scum ruining something else for the rest of us.
well i got it working eventually, still baffled at why it wouldnt work for so long as i still dont know what changed, i just tried it over and over.
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
TudjBox.
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68V Gen3 PRO Sapphire Radeon HD7970 Corsair Vengeance 1866 
Hard DriveHard DriveOptical DriveCooling
OCZ Vertex II Samsung F3 1TB Sony DVD-RW Thermalright Silver Arrow 
OSMonitorKeyboardPower
Windows 7 x64 iiyama ProLite 24" 16:9 Filco Ninja Majestouch-2 Corsair HX620 
CaseMouseMouse PadAudio
Antec P182 G5 SteelSeries Cambridge Audio DAC Magic 
  hide details  
Reply
post #6 of 6
I'd be interested to see your code - as it isn't "supposed" to work.
Main Rig
(15 items)
 
  
Reply
Main Rig
(15 items)
 
  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding