Updating table widths in JavaScript

I have this code:
<td colspan=3 align=center>
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.JavaScript.value = "true";
document.QuestionEntry.Target.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.tmpl>
<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,helvetica 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,helvetica size=1>');
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;width:200;height20;">');

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.desktopstreaming.com/partners/images/1x1.gif" width=1 height=3><br>
<font face=verdana,arial,helvetica 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
LVL 29
coreybryantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZvonkoSystems architectCommented:
How about this:

<html>
<head>
<base href="http://broker.desktopstreaming.com/">
<script language="JavaScript">
<!--
function setJS() {
document.QuestionEntry.JavaScript.value = "true";
document.QuestionEntry.Target.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.tmpl>
<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/images/smartbox_bg.gif">
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=356 background="partners/images/1x1.gif">

<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="partners/images/ds_pb_a_top_shadow.gif" width=356 height=7></td>
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#c5c5c5><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#f3f3f3><img src="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="partners/images/1x1.gif" width=1 height=3><br>');

document.write('<font face=verdana,arial,helvetica size=2><b><i>Choose your agent and click the button to

proceed.</i></b></font><br>');
document.write('<img src="partners/images/1x1.gif" width=1 height=10><br></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><center><font face=verdana,arial,helvetica size=1>');
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;width:200;height20;">');

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_white.gif" width=60 height=61 border=0></center></td>');
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=3><br>
<font face=verdana,arial,helvetica size=2><b><i>Click button below to start a demo.</i></b></font><br>
<img src="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="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="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.gif" width=1 height=1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="partners/images/g2a_pb_smartbox_tag.gif" width=180 height=29 alt="Powered by GoToAssist"></td>
</tr>
</table>
</form>


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
coreybryantAuthor Commented:
The still seems to stretch the cell out more than 190 pixels in width..  And I get a JS error as well

-Corey
0
ZvonkoSystems architectCommented:
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.JavaScript.value = "true";
document.QuestionEntry.Target.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.tmpl>
<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/images/smartbox_bg.gif">
<tr>
<td align=center>
<table cellpadding=0 cellspacing=0 border=0 width=190 background="partners/images/1x1.gif">

<tr>
<td height=30></td>
</tr>
<tr>
<td colspan=9><img src="partners/images/ds_pb_a_top_shadow.gif" width=190 height=7></td>
</tr>
<tr>
<td bgcolor=#aaaaaa><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#c5c5c5><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#f3f3f3><img src="partners/images/1x1.gif" 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.gif" width=1 height=3><br>');

document.write('<font face=verdana,arial,helvetica size=2><b><i>Choose your agent and click the button to

proceed.</i></b></font><br>');
document.write('<img src="partners/images/1x1.gif" width=1 height=10><br></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td valign=middle><center><font face=verdana,arial,helvetica size=1>');
document.write('<select name="ExpertKeys" style="font: normal 9 verdana,arial,helvetica;width:200;height20;">');

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_white.gif" width=60 height=61 border=0></center></td>');
document.write('</tr>');
//-->
</script>
<noscript>
<tr>
<td align=middle><img src="broker.desktopstreaming.com/partners/images/1x1.gif" width=1 height=3><br>
<font face=verdana,arial,helvetica size=2><b><i>Click button below to start a demo.</i></b></font><br>
<img src="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="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="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#e9e9e9><img src="partners/images/1x1.gif" width=1 height=1></td>
<td bgcolor=#dadada><img src="partners/images/1x1.gif" width=1 height=1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="partners/images/g2a_pb_smartbox_tag.gif" width=180 height=29 alt="Powered by GoToAssist"></td>

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

coreybryantAuthor Commented:
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
0
ZvonkoSystems architectCommented:
This line has an error because the line is broken by newlines:


document.write('<font face=verdana,arial,helvetica size=2><b><i>Choose your agent and click the button to

proceed.</i></b></font><br>');

0
coreybryantAuthor Commented:
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
0
coreybryantAuthor Commented:
Never mind.  one of the includes was moved

-Corey
0
ZvonkoSystems architectCommented:
Thanks for points.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.