Thread: Another Java-Script Question
Results 1 to 5 of 5
Related
-
scroll images using java script Forum: Javascript Forum
Replies: 25 -
Drop down menus with java script Forum: Javascript Forum
Replies: 2 -
java scroll bar script? Forum: Website Scripts Forum
Replies: 1 -
Java email script & W3C.org Forum: Javascript Forum
Replies: 5 -
Other scripts Dhtml / java script Forum: Javascript Forum
Replies: 13
-
10-24-2003, 09:57 PM #1
Another Java-Script Question
I found a layer type kinda code at htmlgoodies, but I can't seem to import this poll:
<! // Begin Pollhost.com Poll Code //>
<form method=post action=http://poll.pollhost.com/vote.cgi>
<table border=0 width=150 height="340" bgcolor=#FFFFFF cellspacing=0 cellpadding=2 style="border-collapse: collapse" bordercolor="#111111" background="poll.jpg">
<tr><td colspan=2 align=top valign="top" height="64"><font face="Verdana" size=-1 color="#000000"><b>Should Ronaldo 7 have a FORUM for everybody to discuss?</b></td></tr>
<tr><td width=5 height="39"><input type=radio name=answer value=1></td>
<td height="39"><font face="Verdana" size=-1 color="#000000">Yes, that would be great!</td></tr>
<tr><td width=5 height="45"><input type=radio name=answer value=2></td>
<td height="45"><font face="Verdana" size=-1 color="#000000">No, I don't think I will have time to discuss in there...</td></tr>
<tr><td colspan=2 height="153" valign="top">
<input type=hidden name=font_color value=000000>
<input type=hidden name=font_face value="Verdana">
<input type=hidden name=background value=EEEEEE>
<input type=hidden name=bars value=Red>
<input type=hidden name=poll value=1066954355>
<input type=hidden name=username value=geek987>
<center><input type=submit value=Vote> <input type=submit name=view value=View>
</center>
</td></tr>
</table></form>
<! // End Pollhost.com Poll Code //>function layer()
{
document.body.insertAdjacentHTML('BeforeEnd', '<DIV STYLE="position:absolute; TOP:35px;
LEFT:410px" ID="TheTip"><table><tr><td>I want the stuff in here</td></tr></table></DIV>');
}
-
10-25-2003, 11:12 AM #2bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there Cris987,
I have slightly altered the code to get it to work.
One reason for this was that...
insertAdjacentHTML() is not cross browser compatable,
so I have used document.getElementById('thetip').innerHTMLinstead.
Also the code needed to be entirely on one line, and the word don't
caused a problem and took a while to locate...
it needed to be coded like this don\'t.
I was not sure how you wanted to call the function...
I have used window.onload=layer; but you can remove
this and use <a href="javascript:layer()" >•Ronaldo 7</a>
which will initiate it with a click.Code:<html> <head> <style type="text/css"> <!-- div#thetip { position:absolute; top:35px; left:410px; } table { font-family:verdana; font-size:13px; color:#000000; } //--> </style> <script type="text/javascript"> <!-- function layer() { document.getElementById('thetip').innerHTML='<form method="post" action="http://poll.pollhost.com/vote.cgi"><table border="0" width="150" height="340" bgcolor="#ffffff" cellspacing="0" cellpadding="2"style="border-collapse: collapse" bordercolor="#111111" background="poll.jpg"><tr><td colspan="2" align="top" valign="top" height="64"><b>Should Ronaldo 7 have a FORUM for everybody to discuss?</b></td></tr><tr><td width="5" height="39"><input type="radio" name="answer" value="1"></td><td height="39">Yes, that would be great!</td></tr><tr><td width="5" height="45"><input type="radio" name="answer" value="2"></td><td height="45">No, I don\'t think I will have time to discuss in there...</td></tr><tr><td colspan="2" height="153" valign="top"><input type="hidden" name="font_color" value="000000"><input type="hidden" name="font_face" value="verdana"><input type="hidden" name="background" value="eeeeee"><input type="hidden" name="bars" value="red"><input type="hidden" name="poll" value="1066954355"><input type="hidden" name="username" value="geek987"><center><input type="submit" value="Vote"> <input type="submit" name="view" value="View"></center></td></tr></table>'; } window.onload=layer; //--> </script> </head> <body > <div id="thetip"><div> </body> </html>
thead
-
10-25-2003, 01:12 PM #3
Originally Posted by coothead
it doesn't work. Can you tell me wat's wrong?
-
10-25-2003, 02:07 PM #4bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there Cris987,
Basically what you did wrong was to try and combine two scripts
I have made the necessary modifications..
Just 'copy an paste' this code and it will be OK.
All you have to do then is adjust the position.
Code:<html> <head> <title>Ronaldo 7 -- An Unofficial Cristiano Ronaldo Website</title> <style type="text/css"> <!-- a, a:link { color:#000000 ; text-decoration: none; } a:visited { color:#000000 ; text-decoration: none; } a:active { color:#000000 ; text-decoration: none; } a:hover { color:#000000 ; text-decoration: underline; } div#thetip { position:absolute; top:100px; left:610px; } table#layer { font-family:verdana; font-size:13px; color:#000000; } --> </style> <script type="text/javascript"> <!-- function layer() { document.getElementById('thetip').innerHTML='<form method="post" action="http://poll.pollhost.com/vote.cgi"><table id="layer" border="0" width="150" height="340" bgcolor="#ffffff" cellspacing="0" cellpadding="2"style="border-collapse: collapse" bordercolor="#111111" background="poll.jpg"><tr><td colspan="2" align="top" valign="top" height="64"><b>Should Ronaldo 7 have a FORUM for everybody to discuss?</b></td></tr><tr><td width="5" height="39"><input type="radio" name="answer" value="1"></td><td height="39">Yes, that would be great!</td></tr><tr><td width="5" height="45"><input type="radio" name="answer" value="2"></td><td height="45">No, I don\'t think I will have time to discuss in there...</td></tr><tr><td colspan="2" height="153" valign="top"><input type="hidden" name="font_color" value="000000"><input type="hidden" name="font_face" value="verdana"><input type="hidden" name="background" value="eeeeee"><input type="hidden" name="bars" value="red"><input type="hidden" name="poll" value="1066954355"><input type="hidden" name="username" value="geek987"><center><input type="submit" value="Vote"> <input type="submit" name="view" value="View"></center></td></tr></table>'; } //--> </script> <script type="text/javascript"> <!-- // Following COPYRIGHT c1997 Dennis & Family. All Rights Reserved. function snapIn(jumpSpaces,position) { var msg = "Welcome to Ronaldo 7 !"; var out = ""; for (var i=0; i<position; i++) { out += msg.charAt(i) } for (i=1;i<jumpSpaces;i++) { out += " " } out += msg.charAt(position); window.status = out; if (jumpSpaces <= 1) { position++; if (msg.charAt(position) == ' ') { position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) { jumpSpaces *= .09 } else { jumpSpaces-- } if (position != msg.length) { var cmd = "snapIn(" + jumpSpaces + "," + position + ")"; window.setTimeout(cmd,10); } return true } //--> </script> </head> <body topmargin="0" leftmargin="0" onLoad="snapIn(50,0);layer();"> <div id="thetip"></div> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber1"> <tr> <td colspan="3" width="600"> <img border="0" src="top.jpg" width="600" height="65"></td> </tr> <tr> <td valign="top" width="110"> <font face="Verdana"> <map name="FPMap0"> <area href="home.htm" shape="rect" coords="41, 20, 109, 68"> <area href="News/news_index.htm" shape="rect" coords="42, 66, 109, 109"> <area href="Profile/profile_index.htm" shape="rect" coords="45, 141, 109, 182"> <area href="Gallery/gallery_index.htm" shape="rect" coords="44, 181, 109, 221"> <area href="Downloads/downloads_index.htm" shape="rect" coords="44, 255, 109, 304"> <area href="About/about_index.htm" shape="rect" coords="44, 303, 109, 344"> </map> <img border="0" src="menu.jpg" width="110" height="380" usemap="#FPMap0"></font> </td> <td valign="top" width="17"> </td> <td valign="top" width="473"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="471" id="AutoNumber2"> <tr> <td width="313"> </td> <td width="8"> </td> <td width="150"> </td> </tr> <tr> <td width="313" background="barbg.jpg"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt"> - Latest News -</font></td> <td width="8"> </td> <td width="150" background="barbg.jpg"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt"> - Next Match -</font></td> </tr> <tr> <td width="313"> </td> <td width="8"> </td> <td width="150"> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="474"> <tr> <td width="80" valign="top"><font face="Verdana"> <img border="0" src="News/news_avatar_manchester.jpg" width="80" height="96"></font></td> <td width="7" valign="top"></td> <td width="225" valign="top"> <font face="Verdana" style="font-size: 8pt"> <b> Ronaldo Will Go Court<br> <br> </b>The FA have confirmed Manchester United and Arsenal's response to misconduct charges......<br> <br> <a href="News/news_16_10_03.htm">Full Story>>></a></font></td> <td width="9" valign="top"> </td> <td width="153" valign="top"> <p align="center"><font face="Verdana"> <img border="0" src="premier.jpg" width="47" height="44"><br> <br> <span style="font-size: 8pt">Fulham @ Man Utd<br> 18.10.03</span></font></td> </tr> <tr> <td width="80" valign="top"> </td> <td width="7" valign="top"> </td> <td width="225" valign="top"> </td> <td width="9" valign="top"> </td> <td width="153" valign="top"> </td> </tr> <td width="80" valign="top"><font face="Verdana"> <img border="0" src="News/news_avatar_fletcher.jpg" width="80" height="96"></font></td> <td width="7" valign="top"></td> <td width="225" valign="top"> <font face="Verdana" style="font-size: 8pt"> <b> Ronaldo Faces Competition<br> <br> </b>The emerge of Darren Fletcher has seen Ronaldo out of the starting eleven......<br> <br> <a href="News/news_07_10_03.htm">Full Story>>></a></font></td> <td width="9" valign="top"> </td></a></font></td> <td width="153" valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="151" id="AutoNumber3"> <tr> <td width="151" background="barbg.jpg" valign="top"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt">- Updates -</font></td> </tr> <tr> <td width="151" align="left"><img src="white.jpg"><br>   <font face="Verdana" style="font-size: 8pt"><a href="Gallery/gallery_index.htm"><font color="gray">-  Match Photos (19/10)</font></a></font> </tr> <tr> <td width="151" align="left">   <font face="Verdana" style="font-size: 8pt"><a href="Downloads/downloads_index.htm"><font color="gray">-  Wallpapers (17/10)</font></a></font> </tr> <tr> <td width="151" align="left">   <font face="Verdana" style="font-size: 8pt"><a href="Downloads/downloads_index.htm"><font color="gray">-  IE Toolbar (12/10)</font></a></font> </tr> <tr><td width="151" align="left"> </table> </td> </tr> <tr> <td width="80" valign="top"> </td> <td width="7" valign="top"> </td> <td width="225" valign="top"> </td> <td width="9" valign="top"> </td> <td width="153" valign="top"> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="473"> <tr> <td background="barbg.jpg" width="473"> <font color="#FFFFFF" face="Verdana" style="font-size: 8pt"> - Links -</font></td> </tr> <tr> <td width="473"> </td> </tr> </table> <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="477"> <tr> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://saints.sporthk.net"><img border="0" src="http://saints.sporthk.net/image/logo.gif" width="88" height="31"></a><!-- START OF ADDME LINK --> </font></td> <td width=""><p align="center"><a target="_blank" href="http://www.manutdonline.org"> <img border="0" src="http://www.manutdonline.org/promo/115_25_rvn.gif" width="88" height="19"></a></td> <td width=""><p align="center"> <a target="_blank" href="http://red-devil-rvn.hk.st/"> <img border="0" src="http://hk.geocities.com/jacky_thp/logo/logo2.gif" width="88" height="31"></a></td> <td width=""><p align="center"><a target="_blank" href="http://www.ryangiggs.cc"> <img border="0" src="http://www.ryangiggs.cc/version1/links/link_but02.gif" width="88" height="19"></a></td> </tr> <tr> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://hk.geocities.com/west_ham_26/"><img border="0" src="http://hk.geocities.com/west_ham_26/banner6.gif" width="88" height="31"></a><!-- START OF ADDME LINK --> </font></td> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://www.jade-eyes.org/cristiano/"><img border="0" src="http://www.jade-eyes.org/cristiano/link1.png" width="88" height="31"></a><!-- START OF ADDME LINK --> </font></td> <td width=""><p align="center"><a target="_blank" href="http://www.addme.com"><img src="http://www.addme.com/button.gif" alt="AddMe.com, *ree web site submission and promotion to the search engines" width="88" height="31" border="0"></a></td> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://owen.sporthk.net"><img border="0" src="http://owen.sporthk.net/banner/logo01.gif" width="88" height="31"></a> </font></td> </tr> <tr> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://www.ensport.com"><img border="0" src="http://www.ensport.com/partner/enlogo.gif" width="88" height="31"></a> </font></td> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://diegoforlanonline.vze.com"><img border="0" src="forlansite.gif" width="88" height="31"></a> </font></td> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://www.e-soccer.com"><img border="0" src="http://www.e-soccer.com/images/esregistered_ani.gif" width="88" height="31"></a> </font></td> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://www.soccer-sites.com/"><img border="0" src="http://www.soccer-sites.com/link_account.asp?ac=12694" width="88" height="31" alt="www.soccer-sites.com, Click the logo to go to the *ree soccer only search engine."></a> </font></td> </tr> <tr> <td width=""><p align="center"><font face="Verdana" style="font-size: 8pt"><a target="_blank" href="http://www.owensfan.cjb.net"><img border="0" src="owensite.gif" width="88" height="31"></a> </font></td> </tr> </table> </td> </tr> </table> </body> </html><!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet> <script language="JavaScript" src="http://hk.geocities.com/js_source/ygIELib9.js?v3"></script><script language="JavaScript">var yviContents='http://hk.toto.geo.yahoo.com/toto?s=382076079&l=NE&b=1&t=1067105810';yviR='hk';yfiEA(0);</script><script language="JavaScript" src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="http://geocities.com/js_source/geov2.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?hk1067105810" alt="setstats" border="0" width="1" height="1"></noscript> <IMG SRC="http://geo.yahoo.com/serv?s=382076079&t=1067105810" ALT=1 WIDTH=1 HEIGHT=1> <!-- w36.geo.scd.yahoo.com compressed/chunked Sat Oct 25 11:16:50 PDT 2003 -->
cthead
-
10-25-2003, 09:38 PM #5
Originally Posted by coothead
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum