|
|
| Author |
Message |
Cobi Lurker

Joined: 30 Dec 2003 Posts: 121 Location: IRC
|
Posted: Jun 03, 2004 12:29am Post subject: JS help |
|
|
I'm not sure if this is the correct place to post, but i am tring to get a javascript code that will let users add a pjirc java applet in their website with just <SCRIPT language="javascript" src="http://winbots.org/html/javajs.php?chan=THEIR-CHANNEL"></Script> kinda like searchirc's stats javascripts...
| Code: | document.write ("<BASE HREF=\"http://winbots.org/html\"><applet code=IRCApplet.class archive=\"http://winbots.org/html/irc.jar,http://winbots.org/html/pixx.jar\" width=100% height=100%><param name=\"CABINETS\" value=\"http://winbots.org/html/irc.cab,http://winbots.org/html/securedirc.cab,http://winbots.org/html/pixx.cab\"><param name=\"nick\" value=\"Java\"><param name=\"alternatenick\" value=\"Java???\"><param name=\"name\" value=\"Java User\"><param name=\"host\" value=\"irc.winbots.org\"><param name=\"gui\" value=\"pixx\"><param name=\"command1\" value=\"join #<?php echo $_GET['chan']; ?>\"><param name=\"quitmessage\" value=\"PJIRC forever!\"><param name=\"asl\" value=\"true\"><param name=\"useinfo\" value=\"true\"><param name=\"style:bitmapsmileys\" value=\"true\"><param name=\"style:smiley1\" value=\":\) http://winbots.org/html/img/sourire.gif\"><param name=\"style:smiley2\" value=\":-\) http://winbots.org/html/img/sourire.gif\"><param name=\"style:smiley3\" value=\":-D http://winbots.org/html/img/content.gif\"><param name=\"style:smiley4\" value=\":d http://winbots.org/html/img/content.gif\"><param name=\"style:smiley5\" value=\":-O http://winbots.org/html/img/OH-2.gif\"><param name=\"style:smiley6\" value=\":o http://winbots.org/html/img/OH-1.gif\"><param name=\"style:smiley7\" value=\":-P http://winbots.org/html/img/langue.gif\"><param name=\"style:smiley8\" value=\":p http://winbots.org/html/img/langue.gif\"><param name=\"style:smiley9\" value=\";-\) http://winbots.org/html/img/clin-oeuil.gif\"><param name=\"style:smiley10\" value=\";\) http://winbots.org/html/img/clin-oeuil.gif\"><param name=\"style:smiley11\" value=\":-\( http://winbots.org/html/img/triste.gif\"><param name=\"style:smiley12\" value=\":\( http://winbots.org/html/img/triste.gif\"><param name=\"style:smiley13\" value=\":-| http://winbots.org/html/img/OH-3.gif\"><param name=\"style:smiley14\" value=\":| http://winbots.org/html/img/OH-3.gif\"><param name=\"style:smiley15\" value=\":'\( http://winbots.org/html/img/pleure.gif\"><param name=\"style:smiley16\" value=\":$ http://winbots.org/html/img/rouge.gif\"><param name=\"style:smiley17\" value=\":-$ http://winbots.org/html/img/rouge.gif\"><param name=\"style:smiley18\" value=\"(H) http://winbots.org/html/img/cool.gif\"><param name=\"style:smiley19\" value=\"(h) http://winbots.org/html/img/cool.gif\"><param name=\"style:smiley20\" value=\":-@ http://winbots.org/html/img/enerve1.gif\"><param name=\"style:smiley21\" value=\":@ http://winbots.org/html/img/enerve2.gif\"><param name=\"style:smiley22\" value=\":-S http://winbots.org/html/img/roll-eyes.gif\"><param name=\"style:smiley23\" value=\":s http://winbots.org/html/img/roll-eyes.gif\"><param name=\"style:backgroundimage\" value=\"true\"><param name=\"style:backgroundimage1\" value=\"all all 0 http://winbots.org/html/background.gif\"><param name=\"style:sourcefontrule1\" value=\"all all Serif 12\"><param name=\"style:floatingasl\" value=\"true\"><param name=\"pixx:timestamp\" value=\"true\"><param name=\"pixx:highlight\" value=\"true\"><param name=\"pixx:highlightnick\" value=\"true\"><param name=\"pixx:nickfield\" value=\"true\"><param name=\"pixx:styleselector\" value=\"true\"><param name=\"pixx:setfontonstyle\" value=\"true\"></applet></BASE>")
|
is that correct? i dont know much about java script |
|
| Back to top |
|
 |
Plasma Newbie

Joined: 10 Dec 2003 Posts: 63
|
Posted: Jun 03, 2004 8:16pm Post subject: |
|
|
| Seems alright (bit messy!) with the php side, but im sure you need to include <script language="JavaScript"> at the top of the script, then </script> at the end, so the src tag works correctly when outputting the page. |
|
| Back to top |
|
 |
Cobi Lurker

Joined: 30 Dec 2003 Posts: 121 Location: IRC
|
Posted: Jun 03, 2004 8:55pm Post subject: |
|
|
why would i need the <script> tags if it is going to be a script source
| Quote: | | <SCRIPT language="javascript" src="http://winbots.org/html/javajs.php?chan=THEIR-CHANNEL"></Script> |
|
|
| Back to top |
|
 |
Plasma Newbie

Joined: 10 Dec 2003 Posts: 63
|
Posted: Jun 03, 2004 9:44pm Post subject: |
|
|
What exactally was the problem anyway? Also your missing a semicolen ( at the end of the file after the closing bracket. |
|
| Back to top |
|
 |
Cobi Lurker

Joined: 30 Dec 2003 Posts: 121 Location: IRC
|
Posted: Jun 04, 2004 9:51am Post subject: |
|
|
| it didn't seem to work :S that was the prob |
|
| Back to top |
|
 |
codemastr Idler

Joined: 05 Feb 2004 Posts: 353
|
Posted: Jun 04, 2004 10:10pm Post subject: |
|
|
Someone needs to learn something called "good programming style."
That code is incredibly ugly! Line breaks are your friend! And don't use so many \". If you are using it so much, then just use ' instead if \". ' is perfectly legal for HTML code.
Yours:
| Code: |
document.write ("<BASE HREF=\"http://winbots.org/html\"><applet code=IRCApplet.class archive=\"http://winbots.org/html/irc.jar,http://winbots.org/html/pixx.jar\" width=100% height=100%><param name=\"CABINETS\"
value=\"http://winbots.org/html/irc.cab,http://winbots.org/html/securedirc.cab,http://winbots.org/html/pixx.cab\">
...
|
mine:
| Code: |
document.write ("
<BASE HREF='http://winbots.org/html'>
<applet
code=IRCApplet.class
archive='http://winbots.org/html/irc.jar,http://winbots.org/html/pixx.jar'
width='100%'
height='100%'
>
<param
name='CABINETS'
value='http://winbots.org/html/irc.cab,http://winbots.org/html/securedirc.cab,http://winbots.org/html/pixx.cab'
>
...
|
See how much easier mine is to read?
Also note, when using a percentage for the size, it is REQUIRED that you enclose it in quotes. height=100% is NOT legal HTML. |
|
| Back to top |
|
 |
|