|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hy guys,
I'm new in working with javascript and html and i have some problems with the next code: <HTML> <HEAD><SCRIPT LANGUAGE="JavaScript"> <!-- Begin var scrl = " Welcome to my home page!Hope you like it "; function scrlsts() { scrl = scrl.substring(1, scrl.length) + scrl.substring(0, 1); document.title = scrl; setTimeout("scrlsts()", 300); } // End --> </script> </HEAD> <BODY onLoad="scrlsts()"> <FRAMESET cols="20%, 50%"> <FRAME src="meniu.html" frameborder="no"> <FRAME src="center.html" frameborder="no"> <nofram</html> </HTML> And the problem is when i'm making a previu it only make "Welcome..." working and it doesn't take into consideration the framset.My quetion is why? Thanks for helping me. Bye |
|
#2
|
|||
|
|||
|
When declaring a frameset in html, you cant use the body tag, because that is for frameless documents. You use <frameset>...</frameset>
Here's a working example. You can call the function on loading the frameset obviously. <HTML> <HEAD><SCRIPT LANGUAGE="JavaScript"> <!-- Begin var scrl = " Welcome to my home page!Hope you like it "; function scrlsts() { scrl = scrl.substring(1, scrl.length) + scrl.substring(0, 1); document.title = scrl; setTimeout("scrlsts()", 300); } // End --> </script> </HEAD> <FRAMESET cols="20%, 50%" onLoad="scrlsts()"> <FRAME src="meniu.html" frameborder="no"> <FRAME src="center.html" frameborder="no"> </FRAMESET> </HTML> |
|
#3
|
|||
|
|||
|
Thanks a lot for the answer.
Can i add you as a buddy?I'm new here. Have a nice day, Oana. |
|
#4
|
|||
|
|||
|
No problem, add me as a buddy. :-)
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > probelms with body on load |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|