Javascript

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentJavascript

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old January 10th, 2012, 06:36 PM
zipster1967 zipster1967 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 1 zipster1967 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 19 m 57 sec
Reputation Power: 0
Form values not being passed to javascript

For some reason none pf the values from my form are appearing in my java-script I am not sure what I am doing wrong but I could really use a hint.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="keywords" content="Javascript login form for IRC using PJirc" />
<meta name="author" content="Trent Perez: trentjp@perezcomputer.com" />
<title>Enchatment Java Login</title>
<!--[if IE]>
<style type="text/css">
#theform #pt4 {
	padding: 2em 1em 1em 1em;
	}
</style>
<![endif]-->
<link rel="stylesheet" type="text/css" href="IRCloginform.css" /></style>
<script type="text/javascript" src="ircchat.js">
</script>
</head>
<body>
<h1 class="title">Enchatment Chat Home</h1>
 <h2 class="subtitle">Chat Client (May take up to a minute to load)</h2>
<h2 class="subtitle2">NOTE: If your Popup blocker is stopping Chat opening hold down Ctrl key while clicking Connect</h2>
<form id="theform" name="theform" action="javascript:send(nick,passwd,userid,chan,showtime,s  howjoin,showpart,showquit,fname,fsize,nnick1,nnick  2,nnick3,nnick4,nnick5)" enctype="multipart/form-data" method="post">
	<fieldset id="pt1">
		<label for="nick">Nickname</label>
		<input type="text" id="nick" tabindex="1" />
	<label for="userid">Gender/Orientation</label>
		<select name="userid" tabindex="3">
		    <option value="Male selected="selected"">Male</option>
			<option value="Female">Female</option>
			<option value="Bi-Male">Bi-Male</option>
			<option value="Bi-Female">Bi-Female</option>
			<option value="TS-Male">Transsexual Male</option>
			<option value="TS-Female">Transsexual Female</option>
		</select>
	</fieldset>
	<fieldset id="pt2">
		<label for="password">Password</label>
		<input type="password" id="passwd" tabindex="2" />
		<label for="chan">Channel to join</label>
		<select name="chan" tabindex="4">
		<option value="#Sweetoasis" selected="selected">#Sweetoasis</option>
		<option value="#Sweetoasis_Help">#Sweetoasis_Help</option>
		<option value="#Sweetoasis_Radio">#Sweetoasis_Radio</option>
		</select>
	</fieldset>
	<fieldset id="pt3">
	<div id="buttoncontainer">
	    <button type="button" name="submit" value="submit" class="css3button" onclick="send(nick,passwd,userid,chan,showtime,showjoin,sho  wpart,showquit,fname,fsize,nnick1,nnick2,nnick3,nn  ick4,nnick5)">Connect</button>
	</div>
	</fieldset>
	<fieldset id="pt4">
		<h2 class="subtitle">Advanced Settings (Not Required)</h2>
	</fieldset>
	<fieldset id="pt5">
		<label for="showtime"><input type="checkbox" id="showtime" name="showtime" tabindex="5"/>Show Time Stamps</label>
		<label for="showjoin"><input type="checkbox" id="showjoin" name="showjoin" tabindex="7"/>Show Joins</label>
		<label for="fname">Font Name/Size</ label>
		    <select name="fname" tabindex="9">
			    <option value="monospaced">Monospaced</option>
				<option value="dialog">Dialog</option>
				<option value="dialog Input">Monospaced</option>
				<option value="sanserif">SanSerif</option>
				<option value="serif">Serif</option>
				<option value="verdana">Verdana</option>
			</select>
			<select name="fsize" tabindex="10">
				<option value="10">10</option>
				<option value="11">11</option>
				<option value="12">12</option>
				<option value="13">13</option>
				<option value="14" selected="selected">14</option>
				<option value="15">15</option>
				<option value="16">16</option>
			</select>
	</fieldset>
	<fieldset id="pt6">
		<label for="showpart"><input type="checkbox" id="showpart" name="showpart" tabindex="6"/>Show Parts</label>
		<label for="showquit"><input type="checkbox" id="showquit" name="showquit" tabindex="8"/>Show Quits</label>
	</fieldset>
	<fieldset id="pt7">
	  <label for="notified">Notify me if any of the following nicks login</label>
		<input type="text" id="nnick1" tabindex="11" />
		<input type="text" id="nnick2" tabindex="12" />
		<input type="text" id="nnick3" tabindex="13" />
		<input type="text" id="nnick4" tabindex="14" />
		<input type="text" id="nnick5" tabindex="15" />
	</fieldset>
	<fieldset id="pt8">
	<ul>
	  <li class="whitebold">We hope your visit here is rewarding as you make friends. </li>
	  <li class="whitebold">To promote an enjoyable experience, please follow these simple rules.  </li>
	  <li class="red">* No one UNDER age 18 is allowed on this site. Period. By law, you are NOT permitted to enter here. </li>
	  <li class="white">* NO Flooding or Spamming (advertising) of any kind.</li>
	  <li class="white">* No Pedophilia, you will be reported.</li>
	</ul>
	</fieldset>
	<div id="copyright">All web page content Copyright &copy 2010-2013, Perez Computer Services.</div>
</form>
</body>
</html>

Below is the java-script file that is suppose to be doing the parameter construction.
Code:
var nick = "GuestUser"
var userid = "Male"
var chan = "#sweetoasis"
var showtime = "true"
var showjoin = "true"
var showpart = "true"
var showquit = "true"
var nick = document.theform.nick.value 
var userid = document.theform.userid.value
var chan = document.theform.chan.value
var showtime = document.theform.showtime.value
var showjoin = document.theform.showjoin.value
var showpart = document.theform.showpart.value
var showquit = document.theform.showquit.value
function send(nick,passwd,userid,chan,showtime,showjoin,sho  wpart,showquit,fname,fsize,nnick1,nnick2,nnick3,nn  ick4,nnick5) { 
if (document.theform.nick.value == null || document.theform.nick.value == "JavaLoser") {  
} 
if (document.theform.userid.value == null || document.theform.userid.value == "" || document.theform.userid.value == "Please Type A User ID") { 
alert('You must put in a userid before u can enter') 
return false 
} 
var nick = document.theform.nick.value 
var userid = document.theform.userid.value
var chan = document.theform.chan.value
var showtime = document.theform.showtime.value
var showjoin = document.theform.showjoin.value
var showpart = document.theform.showpart.value
var showquit = document.theform.showquit.value
var commandnumber = 1
win=window.open("","IRC Java Login by Zippy[D]","resizable=yes") 
win.document.write('<html><head><title>Java By Zippy[D]</title></head>') 
win.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#000000">') 
win.document.write('<applet code=IRCApplet.class archive="irc.jar" width="100%" height="100%">')
win.document.write('<param name="nick" value="'+nick+'">')
win.document.write('<param name="name" value="IRC/Java By Zippy[D]">')
win.document.write('<param name="host" value="irc.sweetoasistochat.com">')
win.document.write('<param name="port" value="6667">')
win.document.write('<param name="gui" value="pixx">')
win.document.write('<param name="quitmessage" value="I was using pjIRC">')
win.document.write('<param name="userid" value="'+userid+'">')
win.document.write('<param name="style:sourcecolorrule1" value="all all 0=ffffff 1=000000 2=00009a 3=009000 4=ff0000 5=9a0000 6=9f009f 7=ff7f00 8=ffff00 9=00ff00 10=00908f 11=00ffff 12=0000ff 13=ff00ff 14=7f7f7f 15=cfd0cf">')
win.document.write('<param name="style:bitmapsmileys" value="true">')
win.document.write('<param name="style:smiley1" value=":) img/sourire.gif">')
win.document.write('<param name="style:smiley2" value=":-) img/sourire.gif">')
win.document.write('<param name="style:smiley3" value=":-D img/content.gif">')
win.document.write('<param name="style:smiley4" value=":D img/content.gif">')
win.document.write('<param name="style:smiley5" value=":-d img/content.gif">')
win.document.write('<param name="style:smiley6" value=":d img/content.gif">')
win.document.write('<param name="style:smiley7" value=":-P img/langue.gif">')
win.document.write('<param name="style:smiley8" value=":p img/langue.gif">')
win.document.write('<param name="style:smiley9" value=":-p img/langue.gif">')
win.document.write('<param name="style:smiley10" value=":p img/langue.gif">')
win.document.write('<param name="style:smiley11" value=";-) img/clin-oeuil.gif">')
win.document.write('<param name="style:smiley12" value=";) img/clin-oeuil.gif">')
win.document.write('<param name="style:smiley13" value=";-P img/clin-oeuil-langue.gif">')
win.document.write('<param name="style:smiley14" value="; img/clin-oeuil-langue.gif">')
win.document.write('<param name="style:smiley15" value=";-p img/clin-oeuil-langue.gif">')
win.document.write('<param name="style:smiley16" value=";p img/clin-oeuil-langue.gif">')
win.document.write('<param name="style:smiley17" value="(H) img/cool.gif">')
win.document.write('<param name="style:smiley18" value="(h) img/cool.gif">')
win.document.write('<param name="style:smiley19" value="(A) img/ange.gif">')
win.document.write('<param name="style:smiley20" value="(a) img/ange.gif">')
win.document.write('<param name="style:smiley21" value="(6) img/disable.gif">')
win.document.write('<param name="style:smiley22" value=":-O img/OH-2.gif">')
win.document.write('<param name="style:smiley23" value=":O img/OH-2.gif">')
win.document.write('<param name="style:smiley24" value=":-o img/OH-2.gif">')
win.document.write('<param name="style:smiley25" value=":o img/OH-2.gif">')
win.document.write('<param name="style:smiley26" value=":-| img/mecontent.gif">')
win.document.write('<param name="style:smiley27" value=":| img/mecontent.gif">')
win.document.write('<param name="style:smiley28" value=":-@ img/enerve2.gif">')
win.document.write('<param name="style:smiley29" value=":@ img/enerve2.gif">')
win.document.write('<param name="style:smiley30" value=":-S img/roll-eyes.gif">')
win.document.write('<param name="style:smiley31" value=":S img/roll-eyes.gif">')
win.document.write('<param name="style:smiley32" value=":-s img/roll-eyes.gif">')
win.document.write('<param name="style:smiley33" value=":s img/roll-eyes.gif">')
win.document.write('<param name="style:smiley34" value=":-( img/triste.gif">')
win.document.write('<param name="style:smiley35" value=":( img/triste.gif">')
win.document.write('<param name="style:smiley36" value=":'+"'"+'( img/pleure.gif">')
win.document.write('<param name="style:smiley37" value=":'+"'"+'-( img/pleure.gif">')
win.document.write('<param name="style:smiley38" value="(GRR) img/argh.gif">')
win.document.write('<param name="style:smiley39" value="(grr) img/argh.gif">')
win.document.write('<param name="style:smiley40" value=":$ img/rouge.gif">')
win.document.write('<param name="style:smiley41" value=":-$ img/rouge.gif">')
win.document.write('<param name="style:smiley42" value="(K) img/kiss.gif">')
win.document.write('<param name="style:smiley43" value="(k) img/kiss.gif">')
win.document.write('<param name="style:smiley44" value="(F) img/flower.gif">')
win.document.write('<param name="style:smiley45" value="(f) img/flower.gif">')
win.document.write('<param name="style:smiley46" value="(L) img/heart.gif">')
win.document.write('<param name="style:smiley47" value="(l) img/heart.gif">')
win.document.write('<param name="style:smiley48" value="(U) img/b-heart.gif">')
win.document.write('<param name="style:smiley49" value="(u) img/b-heart.gif">')
win.document.write('<param name="style:smiley50" value="(:L) img/love.gif">')
win.document.write('<param name="style:smiley51" value="(:l) img/love.gif">')
win.document.write('<param name="style:smiley52" value="(B) img/beer.gif">')
win.document.write('<param name="style:smiley53" value="(b) img/beer.gif">')
win.document.write('<param name="style:smiley54" value="(D) img/drink.gif">')
win.document.write('<param name="style:smiley55" value="(d) img/drink.gif">')
win.document.write('<param name="style:smiley56" value="(CI) img/cig.gif">')
win.document.write('<param name="style:smiley57" value="(ci) img/cig.gif">')
win.document.write('<param name="style:smiley58" value="(Z) img/male.gif">')
win.document.write('<param name="style:smiley59" value="(z) img/male.gif">')
win.document.write('<param name="style:smiley60" value="(X) img/fem.gif">')
win.document.write('<param name="style:smiley61" value="(x) img/fem.gif">')
win.document.write('<param name="style:smiley62" value="(S) img/night.gif">')
win.document.write('<param name="style:smiley63" value="(s) img/night.gif">')
win.document.write('<param name="style:smiley64" value="(ZZ) img/sleep.gif">')
win.document.write('<param name="style:smiley65" value="(zz) img/sleep.gif">')
win.document.write('<param name="style:smiley66" value="(*) img/star.gif">')
win.document.write('<param name="style:smiley67" value="(Y) img/thumb-up.gif">')
win.document.write('<param name="style:smiley68" value="(y) img/thumb-up.gif">')
win.document.write('<param name="style:smiley69" value="(N) img/thumb-down.gif">')
win.document.write('<param name="style:smiley70" value="(n) img/thumb-down.gif">')
win.document.write('<param name="style:smiley71" value="(G) img/present.gif">')
win.document.write('<param name="style:smiley72" value="(g) img/present.gif">')
win.document.write('<param name="highlight" value="true">')
win.document.write('<param name="pixx:helppage" value="http://www.pjirc.com">')
win.document.write('<param name="pixx:highlight" value="true">')
win.document.write('<param name="pixx:highlightnick" value="true">')
win.document.write('<param name="pixx:highlightcolor" value="11">')
win.document.write('<param name="pixx:showconnect" value="true">')
win.document.write('<param name="pixx:showabout" value="false">')
if (document.theform.showtime.checked == "true")
{ 
win.document.write('<param name="pixx:timestamp" value="true">')
} 
else
{
win.document.write('<param name="pixx:timestamp" value="false">')
}
if (document.theform.showjoin.checked == "true")
{ 
win.document.write('<param name="pixx:showchannelnickjoin" value="true">')
}
else
{
win.document.write('<param name="pixx:showchannelnickjoin" value="false">')
}
if (document.theform.showpart.checked == "true")
{
win.document.write('<param name="pixx:showchannelnickpart" value="true">')
}
else
{
win.document.write('<param name="pixx:showchannelnickpart" value="false">')
}
if (document.theform.showquit.checked == "true")
{
win.document.write('<param name="pixx:showchannelnickquit" value="true">')
}
else
{
win.document.write('<param name="pixx:showchannelnickquit" value="false">')
} 
win.document.write('<param name="pixx:showhelp" value="true">')
win.document.write('<param name="pixx:nickfield" value="true">')
win.document.write('<param name="pixx:styleselector" value="true">')
win.document.write('<param name="pixx:setfontonstyle" value="true">')
win.document.write('<param name="pixx:color0" value="000000">')
win.document.write('<param name="pixx:color1" value="FFFFFF">')
win.document.write('<param name="pixx:color5" value="000000">')
win.document.write('<param name="pixx:color6" value="000000">')
win.document.write('<param name="pixx:color8" value="FF0000">')
win.document.write('<param name="pixx:color10" value="CC0000">')
win.document.write('<param name="pixx:color11" value="008800">')
win.document.write('<param name="pixx:color12" value="0044FF">')
if (document.theform.passwd.value != null && document.theform.passwd.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="IDENTIFY '+document.theform.passwd.value+'">')
commandnumber += 1
}
if (document.login.nnick1.value != null && document.theform.nnick1.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="WATCH +'+document.theform.nnick1.value+'">')
commandnumber += 1
}
if (document.theform.nnick2.value != null && document.theform.nnick2.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="WATCH +'+document.theform.nnick2.value+'">')
commandnumber += 1
}
if (document.theform.nnick3.value != null && document.theform.nnick3.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="WATCH +'+document.theform.nnick3.value+'">')
commandnumber += 1
}
if (document.theform.nnick4.value != null && document.theform.nnick4.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="WATCH +'+document.theform.nnick4.value+'">')
commandnumber += 1
}
if (document.theform.nnick5.value != null && document.theform.nnick5.value != "")
{ 
win.document.write('<param name="command'+commandnumber+'" value="WATCH +'+document.theform.nnick5.value+'">')
commandnumber += 1
}
if (chan != null && chan != "" && chan != "none" && chan != "None")
{ 
win.document.write('<param name="command'+commandnumber+'" value="JOIN '+chan+'">')
commandnumber += 1
}
if (chan == null || chan == "" || chan == "none" || chan == "None")
{ 
win.document.write('<param name="command'+commandnumber+'" value="LIST">')
commandnumber += 1
}
win.document.write('<param name="style:sourcefontrule1" value="all all '+document.theform.fname.value+' '+document.theform.fsize.value+'">')
win.document.write('</applet>')
win.document.write('</body>') 
win.document.write('</html>') 
win.document.close()
alert("Javascript is running")
return true 
} 

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentJavascript > Form values not being passed to javascript


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap