coreybryant
asked on
Updating table widths in JavaScript
I have this code:
<td colspan=3 align=center>
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.Jav aScript.va lue = "true";
document.QuestionEntry.Tar get.value = "he/queryPost";
}
// Just in case the JS from the broker can't be loaded
function addOnlineReps() {
document.write('<option value="-1" selected>First available');
}
//-->
</script>
<script language="JavaScript" src="http://broker.gotoassist.com/servlet/com.ec.expertbroker.servlets.OnlineExpertsServlet?Portal=rockctech"></script>
<form action="http://broker.desktopstreaming.com/h/rockctech" method=get name=QuestionEntry>
<input type=hidden name=Portal value=rockctech>
<input type=hidden name=Target value=ds/queryPost>
<input type=hidden name=Template value=ds/onlineExperts.tmp l>
<input type=hidden name=JavaScript value=false>
<input type=hidden name=Form value=pbQuestionEntry>
<input type=hidden name=Question value="Start Session">
<input type=hidden name=Audience value="ie">
<table cellpadding=0 cellspacing=0 border=0 width=420 background="http://broker.desktopstreaming.com/partners/images/smartbox_bg.gif">
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=356 background="http://broker.desktopstreaming.com/partners/images/1x1.gif">
<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="http://broker.desktopstreaming.com/partners/images/ds_pb_a_top_shadow.gif" width=356 height=7></td>
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#c5c5c5><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#f3f3f3><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=114></td>
<td bgcolor=#ffffff align=center valign=top>
<table cellpadding=0 cellspacing=0 border=0 width=337>
<tr>
<td height=4></td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=337>
<script language="JavaScript">
<!--
document.write('<tr>');
document.write('<td colspan=2><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=3><br>');
document.write('<font face=verdana,arial,helveti ca size=2><b><i>Choose your agent and click the button to proceed.</i></b></font><br >');
document.write('<img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=10><br></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><font face=verdana,arial,helveti ca size=1>');
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;wi dth:200;he ight20;">' );
addOnlineReps(); // this will add some more options
document.write('</select>< /font></td >');
document.write('<td valign=middle><input type=image name="Click Here" value=submit onClick=setJS() src="http://broker.desktopstreaming.com/partners/images/ds_pb_smartbox_button_white.gif" width=60 height=61 border=0></td>');
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreami ng.com/par tners/imag es/1x1.gif " width=1 height=3><br>
<font face=verdana,arial,helveti ca size=2><b><i>Click button below to start a demo.</i></b></font><br>
<img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=10></td>
</tr>
<tr>
<td align=middle><input type=image name="Click Here" value=submit onClick=setJS() src="http://broker.desktopstreaming.com/partners/images/ds_pb_smartbox_button_white.gif" width=60 height=61 border=0></td>
</tr></noscript>
<tr>
<td height=8></td>
</tr>
</table>
</td>
<td bgcolor=#f3f3f3><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="http://broker.desktopstreaming.com/partners/images/g2a_pb_smartbox_tag.gif" width=180 height=29 alt="Powered by GoToAssist"></td>
</tr>
</table>
</form>
Now it needs to be about 190 pixels in width. Somewhere.. The dropdown box might need to be above the click here button but I am not certain how to do that & I am afraid of messing up the code.
Thanks!
-Corey
<td colspan=3 align=center>
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.Jav
document.QuestionEntry.Tar
}
// Just in case the JS from the broker can't be loaded
function addOnlineReps() {
document.write('<option value="-1" selected>First available');
}
//-->
</script>
<script language="JavaScript" src="http://broker.gotoassist.com/servlet/com.ec.expertbroker.servlets.OnlineExpertsServlet?Portal=rockctech"></script>
<form action="http://broker.desktopstreaming.com/h/rockctech" method=get name=QuestionEntry>
<input type=hidden name=Portal value=rockctech>
<input type=hidden name=Target value=ds/queryPost>
<input type=hidden name=Template value=ds/onlineExperts.tmp
<input type=hidden name=JavaScript value=false>
<input type=hidden name=Form value=pbQuestionEntry>
<input type=hidden name=Question value="Start Session">
<input type=hidden name=Audience value="ie">
<table cellpadding=0 cellspacing=0 border=0 width=420 background="http://broker.desktopstreaming.com/partners/images/smartbox_bg.gif">
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=356 background="http://broker.desktopstreaming.com/partners/images/1x1.gif">
<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="http://broker.desktopstreaming.com/partners/images/ds_pb_a_top_shadow.gif" width=356 height=7></td>
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#c5c5c5><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#f3f3f3><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=114></td>
<td bgcolor=#ffffff align=center valign=top>
<table cellpadding=0 cellspacing=0 border=0 width=337>
<tr>
<td height=4></td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=337>
<script language="JavaScript">
<!--
document.write('<tr>');
document.write('<td colspan=2><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=3><br>');
document.write('<font face=verdana,arial,helveti
document.write('<img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=10><br></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><font face=verdana,arial,helveti
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;wi
addOnlineReps(); // this will add some more options
document.write('</select><
document.write('<td valign=middle><input type=image name="Click Here" value=submit onClick=setJS() src="http://broker.desktopstreaming.com/partners/images/ds_pb_smartbox_button_white.gif" width=60 height=61 border=0></td>');
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreami
<font face=verdana,arial,helveti
<img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=10></td>
</tr>
<tr>
<td align=middle><input type=image name="Click Here" value=submit onClick=setJS() src="http://broker.desktopstreaming.com/partners/images/ds_pb_smartbox_button_white.gif" width=60 height=61 border=0></td>
</tr></noscript>
<tr>
<td height=8></td>
</tr>
</table>
</td>
<td bgcolor=#f3f3f3><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="http://broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="http://broker.desktopstreaming.com/partners/images/g2a_pb_smartbox_tag.gif" width=180 height=29 alt="Powered by GoToAssist"></td>
</tr>
</table>
</form>
Now it needs to be about 190 pixels in width. Somewhere.. The dropdown box might need to be above the click here button but I am not certain how to do that & I am afraid of messing up the code.
Thanks!
-Corey
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The table with is controled by the the width attibute where you multiple times use 337 pixel and also by the width of the gifs.
I do not get any script errors.
Is your page visible online?
<html>
<head>
<base href="http://broker.desktopstreaming.com/">
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.Jav aScript.va lue = "true";
document.QuestionEntry.Tar get.value = "he/queryPost";
}
// Just in case the JS from the broker can't be loaded
function addOnlineReps() {
document.write('<option value="-1" selected>First available');
}
//-->
</script>
<script language="JavaScript"
src="http://broker.gotoassist.com/servlet/com.ec.expertbroker.servlets.OnlineExpertsServlet?
Portal=rockctech"></script >
</head>
<body>
<table><tr>
<td colspan=3 align=center>
<form action="h/rockctech" method=get name=QuestionEntry>
<input type=hidden name=Portal value=rockctech>
<input type=hidden name=Target value=ds/queryPost>
<input type=hidden name=Template value=ds/onlineExperts.tmp l>
<input type=hidden name=JavaScript value=false>
<input type=hidden name=Form value=pbQuestionEntry>
<input type=hidden name=Question value="Start Session">
<input type=hidden name=Audience value="ie">
<table cellpadding=0 cellspacing=0 border=0 width=420 background="partners/image s/smartbox _bg.gif">
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=190 background="partners/image s/1x1.gif" >
<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="partners/images/ds_pb _a_top_sha dow.gif" width=190 height=7></td>
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#c5c5c5><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#f3f3f3><img src="partners/images/1x1.g if" width=1 height=114></td>
<td bgcolor=#ffffff align=center valign=top>
<table cellpadding=0 cellspacing=0 border=0 width=190>
<tr>
<td height=4></td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=90>
<script language="JavaScript">
<!--
document.write('<tr>');
document.write('<td colspan=2 ><img src="partners/images/1x1.g if" width=1 height=3><br>');
document.write('<font face=verdana,arial,helveti ca size=2><b><i>Choose your agent and click the button to
proceed.</i></b></font><br >');
document.write('<img src="partners/images/1x1.g if" width=1 height=10><br></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><center><fon t face=verdana,arial,helveti ca size=1>');
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;wi dth:200;he ight20;">' );
addOnlineReps(); // this will add some more options
document.write('</select>< /font><br> ');
document.write('<input type=image name="Click Here" value=submit onClick=setJS()
src="partners/images/ds_pb _smartbox_ button_whi te.gif" width=60 height=61 border=0></center></td>');
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreami ng.com/par tners/imag es/1x1.gif " width=1 height=3><br>
<font face=verdana,arial,helveti ca size=2><b><i>Click button below to start a demo.</i></b></font><br>
<img src="partners/images/1x1.g if" width=1 height=10></td>
</tr>
<tr>
<td align=middle><input type=image name="Click Here" value=submit onClick=setJS()
src="partners/images/ds_pb _smartbox_ button_whi te.gif" width=60 height=61 border=0></td>
</tr></noscript>
<tr>
<td height=8></td>
</tr>
</table>
</td>
<td bgcolor=#f3f3f3><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.g if" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.g if" width=1 height=1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="partners/images/g2a_p b_smartbox _tag.gif" width=180 height=29 alt="Powered by GoToAssist"></td>
I do not get any script errors.
Is your page visible online?
<html>
<head>
<base href="http://broker.desktopstreaming.com/">
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.Jav
document.QuestionEntry.Tar
}
// Just in case the JS from the broker can't be loaded
function addOnlineReps() {
document.write('<option value="-1" selected>First available');
}
//-->
</script>
<script language="JavaScript"
src="http://broker.gotoassist.com/servlet/com.ec.expertbroker.servlets.OnlineExpertsServlet?
Portal=rockctech"></script
</head>
<body>
<table><tr>
<td colspan=3 align=center>
<form action="h/rockctech" method=get name=QuestionEntry>
<input type=hidden name=Portal value=rockctech>
<input type=hidden name=Target value=ds/queryPost>
<input type=hidden name=Template value=ds/onlineExperts.tmp
<input type=hidden name=JavaScript value=false>
<input type=hidden name=Form value=pbQuestionEntry>
<input type=hidden name=Question value="Start Session">
<input type=hidden name=Audience value="ie">
<table cellpadding=0 cellspacing=0 border=0 width=420 background="partners/image
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=190 background="partners/image
<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="partners/images/ds_pb
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="partners/images/1x1.g
<td bgcolor=#c5c5c5><img src="partners/images/1x1.g
<td bgcolor=#dadada><img src="partners/images/1x1.g
<td bgcolor=#e9e9e9><img src="partners/images/1x1.g
<td bgcolor=#f3f3f3><img src="partners/images/1x1.g
<td bgcolor=#ffffff align=center valign=top>
<table cellpadding=0 cellspacing=0 border=0 width=190>
<tr>
<td height=4></td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=90>
<script language="JavaScript">
<!--
document.write('<tr>');
document.write('<td colspan=2 ><img src="partners/images/1x1.g
document.write('<font face=verdana,arial,helveti
proceed.</i></b></font><br
document.write('<img src="partners/images/1x1.g
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><center><fon
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;wi
addOnlineReps(); // this will add some more options
document.write('</select><
document.write('<input type=image name="Click Here" value=submit onClick=setJS()
src="partners/images/ds_pb
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreami
<font face=verdana,arial,helveti
<img src="partners/images/1x1.g
</tr>
<tr>
<td align=middle><input type=image name="Click Here" value=submit onClick=setJS()
src="partners/images/ds_pb
</tr></noscript>
<tr>
<td height=8></td>
</tr>
</table>
</td>
<td bgcolor=#f3f3f3><img src="partners/images/1x1.g
<td bgcolor=#e9e9e9><img src="partners/images/1x1.g
<td bgcolor=#dadada><img src="partners/images/1x1.g
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="partners/images/g2a_p
ASKER
Here it is: http://www.rockctech.com/rct1/default_copy(4).asp - what confuses me more is you have some of the script in the <HEAD>, I put it in the body because that is where the gotoassist people had it
-Corey
-Corey
This line has an error because the line is broken by newlines:
document.write('<font face=verdana,arial,helveti ca size=2><b><i>Choose your agent and click the button to
proceed.</i></b></font><br >');
document.write('<font face=verdana,arial,helveti
proceed.</i></b></font><br
ASKER
Fixed those two problems: http://www.rockctech.com/rct1/default_copy(4).asp - it seems to be working locally - as far as the width, but not on the server
-Corey
-Corey
ASKER
Never mind. one of the includes was moved
-Corey
-Corey
Thanks for points.
ASKER
-Corey