PDA

View Full Version : Java Script is driving me NUTS, 2 weeks worth of work! :( :( HELP!!!



tsvehla1220
01-30-2006, 08:12 AM
Im going crazy. I have this site im working on for a friend i have the whole thing done but i cant figure out ONE SMALL THING!

The website is www.****wallstreet.com/test/

You go there and there is a grid, your suppose to be able to click a spot on the grid and then it goes to the http://www.****wallstreet.com/test/Buy.html page and then there is a X and Y field. It doesnt Show what X and Y is on the field. The grid is 1000 x 1000 and i want to define which box on the grid they click.

Im missing something on my coding for some reason! :( :(

please help me figure out what it is im missing a deadline. I was doing it as a free good dead to a friend :(

cr3ative
01-30-2006, 09:50 AM
I do love your FAQ.


1. Whats the idea?
To Bring the whole adult industry together on one page for everyone on the internet to view! That way they dont have to search allover the internet to find a good site for themselves. There are so many sites online we thought the internet finally needed a site where you could go and see all of them on one page!


I don't think a million pixels will even scratch the top layer of the internet's seemingly infinite adult industry. :)

tsvehla1220
01-30-2006, 10:06 AM
Ya i know thats why i figured i would try. Do you have any idea what the problem is? Or if its even a java problem? It just wont post!! :( I even went to other websites to download their sites and see if i could figure out the problem.

I've been google'n everything and yahoo.com and been on forums and mIRC channels trying to figure it out but no one will reply :(

Its due tommorow....

jscheuer1
01-30-2006, 10:19 AM
It may simply be that post is not allowed on Yahoo at your current level of host services. I'd ask customer service or read the terms of service before I worried about it further.

tsvehla1220
01-30-2006, 10:23 AM
I havent checked with yahoo. but shouldnt it work on my computer? because on my computer it goes to the Buy.html page but the X and Y does not appear.

Thats my question is why wont the X any Y appear on the page. If yahoo doesnt support the POST then ill switch thats not a big deal. But I wanna know why the X and Y doesnt show up on the Buy.html page. It doesnt even show up when its just on my harddrive


Please help!!! :(

tsvehla1220
01-30-2006, 11:00 AM
here is my HTML coding for the index.html page

The seperate JavaScript file is at www.****wallstreet.com/test/script.js

PLEASE HELP ME :( :(

If you go to http://www.mypersonalpixel.com/
On this kids webpage when you click any box on the page it goes to a Buy page and on there it says the X and Y properties of where he clicked. Whats the script for that? Or where could i find it.

HELP ME!!!!!!!! :(


======================================================
<?xml version="1.0" encoding="utf-8"?>
<!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" xml:lang="en" lang="en">
<head>
<title>Million Dollar Home Page. Own a piece of Internet Hystory! - Pixels</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Million Dollar Home Page. Your Final Chance to Own a Piece of Internet History!" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.ico" />
<link rel="shortcut icon" href="favicon.ico" />
<script src="script.js" type="text/javascript"></script>





<style type="text/css">
<!--
body {
background-color: #999999;
}
.style1 {color: #660000}
.style3 {font-size: 12px; }
.style4 {color: #990000}
.style6 {font-size: 14px}
-->
</style></head>
<body onload="">
<div class="container">
<div class="header">
<div style="padding: 0px;">
<table width="1004" border="0" align="left">
<tr>
<td width="10">&nbsp;</td>
<td width="778"><table width="769" border="0">
<tr>
<td width="534" rowspan="4"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="530" height="100">
<param name="movie" value="new_banner.swf" />
<param name="quality" value="high" />
<embed src="new_banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="530" height="100"></embed>
</object></td>
<td width="225" valign="top"><p class="style3">&nbsp;</p></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> 1,000,000 Pixels</span></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> $1 A Pixel</span></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> For all the best sites online!</span></td>
</tr>
</table></td>
<td width="311"><table width="200" border="0" bordercolor="#330000">
<tr>
<td width="90" bgcolor="#330000">Sold:</td>
<td width="100" bgcolor="#666666">0</td>
</tr>
<tr>
<td bgcolor="#330000">Available:</td>
<td bgcolor="#666666">1,000,000</td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>
<div class="header_nav">
<div class="header_div"> <a href="index.html" class="header_link" title="View Pixels">View Pixels</a>&nbsp;| <a href="Blog.html" class="header_link" title="Blog">Blog</a>&nbsp;| <a href="FAQ.html" class="header_link" title="FAQ">FAQ</a>&nbsp;| <a href="testimonials.html" class="header_link" title="Testimonials">Testimonials</a>&nbsp;| <a href="Press.html" class="header_link" title="Press">Press</a>&nbsp;| <a href="Contact.html" class="header_link" title="Contact Us">Contact Us</a>&nbsp;| <a href="Buy.html" class="header_link" title="Buy Pixels">Buy Pixels</a> </div>
</div>
<div class="center">
<div class="adsense" style="display: none;"> </div>
<center>
<div class="grid" id="grid" onclick="return getPosition(event);" onmouseover="return escape('These pixels are available, click on the spot where you want your ad placed.');"">
<div align="left"><span style="position: relative;"><a href="http://www.yahoo.com" title="Find Women and Men Latin. Free Services"><img src="0d357ade3f9492a602e34c63c97df54c.jpg" style="position: absolute; left: 50px; top: 30px; z-index: 1;" alt="Find Women and Men Latin. Free Services, visited 21 times (50, 30)" /></a></span></div>
</div>
</center>
<form action="Buy.html" method="post" id="grid_form">
<input type="hidden" name="x" />
<input type="hidden" name="y" />
</form>
</div>
<script src="wz_tooltip.js" type="text/javascript"></script>
&copy; 2006 <a href="http://www.****wallstreet.com/" title="**** Wallstreet" class="link style1">****Wallstreet.com</a> <br />
All rights reserved. I am not responsible for the content of external sites. Images featured on homepage are &copy; of their respective owners. <br />
<img border="0" src="paypal.gif" width="68" height="29" /> </div>
</body>
</html>

======================================================

please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

jscheuer1
01-30-2006, 01:46 PM
The example site you list is PHP driven. Which, is probably a good idea. To do this with javascript alone will mean that you miss non-javascript enabled browsers and run the risk of having some folks hack your data - to what end, I don't know but, if there is anyway to cause problems someone will find it.

With that in mind, this can be done with javascript by changing the method to get on the sending page and making your code on the receiving page look like so:


<div class="row">
<span class="label style1">X_1 position: </span><span class="formw" id="x_1"></span>

<input type="hidden" id="x" name="x" value="" />
</div>
<div class="row">
<span class="label style1">Y_1 position: </span><span class="formw" id="y_1"></span>

<input type="hidden" id="y" name="y" />

<script type="text/javascript">
document.getElementById('x_1').innerHTML=document.getElementById('x').value=window.location.search.match(/x=\d*/).toString().replace(/x=/, '')
document.getElementById('y_1').innerHTML=document.getElementById('y').value=window.location.search.match(/y=\d*/).toString().replace(/y=/, '')
</script>
</div>

tsvehla1220
01-30-2006, 01:52 PM
so my input page would be the index.html file, but then my receiving page would be the buy page? So i'd put that coding on my buy page correct?

jscheuer1
01-30-2006, 01:58 PM
Yep, substitute it for the similar looking html code you already have there on Buy.html.

tsvehla1220
01-30-2006, 02:06 PM
i did that and it didnt work here's what my page looks like for the buy.html




==================================================
<?xml version="1.0" encoding="utf-8"?>
<!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" xml:lang="en" lang="en">
<head>
<title>HAHAHA YES! :)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Hell Yea!" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.ico" />
<link rel="shortcut icon" href="favicon.ico" />
<script src="script.js" type="text/javascript"></script>

<style type="text/css">
<!--
body {
background-color: #999999;
}
.style1 {color: #660000}
.style3 {font-size: 12px; }
.style4 {color: #990000}
.style6 {font-size: 14px}
.style7 {color: #FFFFFF}
-->
</style></head>
<body onload="">
<div class="container">
<div class="header">
<div style="padding: 0px;">
<table width="1004" border="0" align="left">
<tr>
<td width="10">&nbsp;</td>
<td width="778"><table width="769" border="0">
<tr>
<td width="534" rowspan="4"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="530" height="100">
<param name="movie" value="new_banner.swf" />
<param name="quality" value="high" />
<embed src="new_banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="530" height="100"></embed>
</object></td>
<td width="225" valign="top"><p class="style3">&nbsp;</p></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> 1,000,000 Pixels</span></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> $1 A Pixel</span></td>
</tr>
<tr>
<td valign="top"><span class="style6"><span class="style4">&gt;</span> For all the best sites online!</span></td>
</tr>
</table></td>
<td width="311"><table width="200" border="0" bordercolor="#330000">
<tr>
<td width="90" bgcolor="#330000">Sold:</td>
<td width="100" bgcolor="#666666">0</td>
</tr>
<tr>
<td bgcolor="#330000">Available:</td>
<td bgcolor="#666666">1,000,000</td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>
<div class="header_nav">
<div class="header_div"> <a href="index.html" class="header_link" title="View Pixels">View Pixels</a>&nbsp;| <a href="Blog.html" class="header_link" title="Blog">Blog</a>&nbsp;| <a href="FAQ.html" class="header_link" title="FAQ">FAQ</a>&nbsp;| <a href="testimonials.html" class="header_link" title="Testimonials">Testimonials</a>&nbsp;| <a href="Press.html" class="header_link" title="Press">Press</a>&nbsp;| <a href="Contact.html" class="header_link" title="Contact Us">Contact Us</a>&nbsp;| <a href="Buy.html" class="header_link" title="Buy Pixels">Buy Pixels</a> </div>
</div>

<div style="text-align: left; padding-left: 10px; font-size: 15px; font-weight: bold; color: #435e82;">
<p align="center" class="style2 style7">Fill the following form to complete your request.</p>
</div>

<center><div style="width: 410px; text-align: center;">
<span style="text-align: left;"></span>


<form action="" method="post" enctype="multipart/form-data">
<div class="row">
<p><span class="label style1">Name:</span>
<span class="formw">
<input type="text" name="name" id="name" maxlength="50" class="form-item" value="" />
<input type="hidden" id="predefined_price" name="predefined_price" value="1" />
<input type="hidden" id="hidden_price" name="price" value="" />
</span> </p>
</div>

<div class="row">
<span class="label style1">Email:</span>
<span class="formw">
<input type="text" name="email" id="email" maxlength="250" class="form-item" value="" /></span>
</div>
<div class="row">
<span class="label style1">X_1 position: </span><span class="formw" id="x_1"></span>

<input type="hidden" id="x" name="x" value="" />
</div>
<div class="row">
<span class="label style1">Y_1 position: </span><span class="formw" id="y_1"></span>

<input type="hidden" id="y" name="y" />

<script type="text/javascript">
document.getElementById('x_1').innerHTML=document.getElementById('x').value=window.location.search.match(/x=\d*/).toString().replace(/x=/, '')
document.getElementById('y_1').innerHTML=document.getElementById('y').value=window.location.search.match(/y=\d*/).toString().replace(/y=/, '')
</script>
</div>

<div class="row">
<span class="label style1">Width (in blocks):</span>
<span class="formw">
<input type="text" name="width" id="width" maxlength="3" class="form-item" style="width: 30px;" value="" onchange="return calculate();" /></span>
</div>
<div class="row">
<span class="label style1">Height (in blocks):</span>
<span class="formw">
<input type="text" name="height" id="height" maxlength="3" class="form-item" style="width: 30px;" value="" onchange="return calculate();" /></span>
</div>
<div class="row">

<span class="label style1">Website link:</span>
<span class="formw">
<input type="text" name="link" id="link" maxlength="250" class="form-item" value="" /></span>
</div>
<div class="row">
<span class="label style1">Message (link title):</span>
<span class="formw">
<input type="text" name="title" id="title" maxlength="50" class="form-item" value="" /></span>
</div>
<div class="row">

<span class="label style1">Image:</span>
<span class="formw">
<input type="file" name="file" /></span>
</div>
<div class="row">
<span class="label style1">Allowed file types:</span>
<span class="formw">*.jpg, *jpeg, *.gif, *.png, *.bmp. Not animated!</span> </div>
<div class="Vspace"></div>

<div class="row">
<span class="label style1">Price:</span>
<span class="formw" style="font-weight: bold;" id="price_">Not calculated yet.</span> </div>
<div class="row">
<p><span class="label"></span>
<span class="formw">
<input type="image" src="templates/images/paypal.gif" name="submit" onclick="return this.form.submit();" />
</span></p>
<p>&nbsp;

</p>
</div>

<div class="Vspace"></div>
</form>
</div></center>
</div>

<script src="templates/scripts/wz_tooltip.js" type="text/javascript"></script>
<div class="Vspace"></div>
<div class="bottom" style="">
&copy; 2006 <a href="http://www.****wallstreet.com" title="Yeah!" class="link style1">Yeah!</a>

<br>
All rights reserved. I am not responsible for the content of external sites. Images featured on homepage are &copy; of their respective owners.


<br>
<img border="0" src="templates/images/paypal.gif" width="68" height="29">
</div>
</div>

</body>
</html>
==================================================


What am i missing? I know its something small! Thanks for your help ive been looking everywhere trying to figure this one out. I havent even gone to bed yet, i have a deadline in 1 hour lol

What do i need to do?

jscheuer1
01-30-2006, 02:10 PM
Did you remember to change the method to get on the sending page?

tsvehla1220
01-30-2006, 02:12 PM
change what method on the sending page

I have the page index.html and thats the page where you click and then where ever you click it goes to the buy.html page and thats where the X and Y coords show up

on the buy.html page i changed the old stuff to this

<div class="row">
<span class="label style1">X_1 position: </span><span class="formw" id="x_1"></span>

<input type="hidden" id="x" name="x" value="" />
</div>
<div class="row">
<span class="label style1">Y_1 position: </span><span class="formw" id="y_1"></span>

<input type="hidden" id="y" name="y" />

<script type="text/javascript">
document.getElementById('x_1').innerHTML=document.getElementById('x').value=window.location.search.match(/x=\d*/).toString().replace(/x=/, '')
document.getElementById('y_1').innerHTML=document.getElementById('y').value=window.location.search.match(/y=\d*/).toString().replace(/y=/, '')
</script>
</div>

and put that all on the buy page.

Did i mess up some where? or was i suppose to change something on the index.html page?

jscheuer1
01-30-2006, 02:16 PM
on the sending page:


<form action="Buy.html" method="get" id="grid_form">
<input type="hidden" name="x" />
<input type="hidden" name="y" />
</form>

tsvehla1220
01-30-2006, 02:17 PM
nevermind i figured out what you were saying my bad! thanks man! i really appreciate it

but im having one other problem hold on and ill post
(its real small)

tsvehla1220
01-30-2006, 02:25 PM
i got it all figured out except my box's are off.

On my page when you click it shows up but the X and Y is not accurate
when you click the Top Left corner it should be 0,0. and the bottom right corner should be the biggest #'s ya know?
like maybe 99, 99 i dont know what the numbers are though ill count really quick. But do you know what i need to do to fix that?

http://www.****wallstreet.com/helpme/

tsvehla1220
01-30-2006, 02:29 PM
its 100 pixel boxs from left to right
and 150 pixel boxes from top to bottom

and i want the top left to be box # (1,1)
and the bottom right to be box # (100, 150)
anyway to fix that?
you catch what i mean?

tsvehla1220
01-30-2006, 02:49 PM
I think it might have something to do with my CSS file
file name is style.css

===================================================

/**
* The default template style sheet.
*/
body {
margin: 0;
padding: 0;
font-family: 'Trebuchet MS', Georgia, Times, "Times New Roman", sans-serif;
font-size: 12px;
text-align: center;
color: #FFFFFF;
line-height: 1.3em;
background: #f9f9f9;
}

.container {
position: relative;
height: 50em;
width: 100%;
}

.header {
position: relative;
height: 121px;
background-color: #333333;
font-weight: bold;
font-size: 20px;
text-align: left;
}

.header_stats {
position: static;
right: 7px;
top: 6px;
height: 90px;
width: 0px;
background-image: url(stats_small.jpg);
background-repeat: no-repeat;
text-align: right;
}

.header_nav {
position: relative;
background-image: url(top.jpg);
background-repeat: repeat-x;
background-position: top;
margin-bottom: 20px;
height: 20px;
text-align: left;
}

.header_div {
position: absolute;
left: 130px;
font-size: 15px;
font-weight: bold;
font-style: italic;
top: 1px;
}

.header_link {
text-decoration: none;
color: #ebeff4;
}

.header_link:hover {
text-decoration: none;
border-bottom: 1px solid;
}

.grid {
position: center;
width: 1000px;
height: 1500px;
border: 0px;
background-image: url(grid.gif);
background-repeat: repeat;
border-bottom: 1px solid #660000;
left: 2px;
top: 141px;
}

.adsense {
margin: 0 auto;
text-align: center;
padding-top: 0.2em;
padding-bottom: 0.2em;
width: 80%;
}

.text {
padding: 0.5em;
}

.faq_answer {
border: 1px solid;
border-style: dashed;
background-color: #d5d5d5;
width: 50%;
margin-top: 0.5em;
margin-bottom: 0.5em;
padding: 5px;
}

.blog_wrapper /* I hate IE */ {
text-align: center;
}

.blog {
margin: 0 auto;
text-align: left;
width: 80%;
border: 1px solid;
border-style: dashed;
padding: 0.5em;
}

.blog_title {
font-weight: bold;
font-style: italic;
font-size: 15px;
}

.blog_text {
font-style: italic;
padding-left: 0.5em;
}

.blog_date {
color: #616161;
font-weight: bold;
padding: 0.5em;
}

blockquote.quote {
background: transparent url(quote.jpg) left top no-repeat;
}

blockquote.quote div {
padding: 0 30px;
background:transparent url(quote.jpg) right bottom no-repeat;
}

.link {
text-decoration: none;
color: #9cbfef;
font-weight: bold;
}

.link:hover {
text-decoration: underline;
color: #FF0000;
font-weight: bold;
}

.topic_link {
text-decoration: none;
color: #6b8dba;
font-weight: bold;
}

.topic_link:hover {
text-decoration: underline;
color: #6b8dba;
font-weight: bold;
}

.medium_font {
color: #9cbfef;
font-weight: bold;
font-size: 15px;
}

.topic_line {
text-align: left;
padding-left: 10px;
font-weight: bold;
color: #435e82;
background-color: #FFCC00;
border: 1px solid;
}

/**
*
* The center block
*
*/
.center {
margin: 0 auto;
width: auto;
text-align: left;
}

.bottom {
position: relative;
margin: 0 auto;
padding-bottom: 0.5em;
width: 80%;
clear: both;
}

.title {
margin-top: 0 auto;
margin-bottom: 0 auto;
float: left;
font-size: 2em;
font-style: oblique
}

.error {
text-align: left;
color: #ff0000;
font-style: italic;
background-color: #ffffe1;
border: 1px solid #b5b5b1;
border-style: dashed;
padding: 0.5em;
}

.Vspace {
height: 20px;
}

.Hspace {

}

img {
border: 0px;
}

.hr {
margin: 0 auto;
width: 95%;
border-top: 1px solid #d5d5d5;
}

/**
*
* Form style
*/
textarea, .form-item {

border: 1px solid #d7d7d7;
width: 300px;

}

textarea {

height: 200px;

}

div.row {

clear: both;
padding-top: 5px;

}

div.row span.label {

float: left;
width: 100px;
text-align: right;
font-weight: bold;
}

div.row span.formw {
float: right;
width: 300px;
text-align: left;
}

.button {
color: #4d73a7;
background-color: #ffffff;
border: 1px solid;
}

jscheuer1
01-30-2006, 05:54 PM
Just add one in your script then (script.js):


gForm.x.value = x+1;
gForm.y.value = y+1;

tsvehla1220
01-30-2006, 06:05 PM
I did that and it still doesnt work right. If i click the top left corner it comes up as

(1,30) when it should be (1,1). What else should i change?

Thanks for all your help i really appreciate it, your the bomb man!
What do i need to change? This is my last question haha then my problems are solved! Thanks! i also have a wz_tooltip.js file too, here's the link http://www.****wallstreet.com/test/wz_tooltip.js for the file

Thanks man i owe you big time, i wont forget this!!!!!!!!!!!1

======================================================

/**
*
*/

/**
*
* Function to open a new window
* Replaces _target since it's not implemented in xhtml strict
*
*/
function nw(link) {

window.open(link.href);

return false;

}


/**
*
* Grid handler
*
*/
function getPosition(e) {

if(confirm('Are you sure this is the place you want your ad placed?')) {

y_sub = document.getElementById("grid").offsetTop;

if (!e) e = window.event; // works on IE, but not NS

if (e) {
if (e.pageX || e.pageY) { // this doesn't work on IE6!! (works on FF,Moz,Opera7)
x = e.pageX;
y = e.pageY;
}
else if (e.clientX || e.clientY) { // works on IE6,FF,Moz,Opera7
x = e.clientX + document.body.scrollLeft;
y = e.clientY + document.body.scrollTop;
}
}


if (((x / 10) % 10) != 0) {

x = Math.floor(x / 10);

}

if (((y - y_sub) % 10) != 0) {

y = Math.floor((y - y_sub) / 10);

}

var gForm = document.getElementById("grid_form");

gForm.x.value = x+1;
gForm.y.value = y+1;

gForm.submit();

}

}
/**
*
* Grid mouse tip coordinates. Unused atm.
*
*/
function gridCoord(e) {

y_sub = document.getElementById("grid").offsetTop;

if (!e) var e = window.event;

if (e.pageX || e.pageY) {

var x = e.pageX;
var y = e.pageY;

} else if (e.clientX || e.clientY) {

var x = e.clientX;
var y = e.clientY;

}

if (((x / 10) % 10) != 0) {

x = Math.floor(x / 10) + 1;

}

if (((y - y_sub) % 10) != 0) {

y = Math.floor((y - y_sub) / 10) + 1;

}

window.status = "[ " + x + " ; " + y + " ]";

}

/**
*
* FAQ handler
*/
function faq(id) {

var el = document.getElementById(id);

displayType = (el.style.display == "none")?"block":"none";

el.style.display = displayType;

}

/**
*
* Buy handler.
* Method to calculate the price dynamicaly
*/
function calculate() {

var width = document.getElementById("width").value;
var height = document.getElementById("height").value;
var price = document.getElementById("predefined_price").value;

if (!isNaN(parseInt(width)) && !isNaN(parseInt(height))) {

document.getElementById("width").value = parseInt(width);
document.getElementById("height").value = parseInt(height);

document.getElementById("price_").innerHTML = "$" + parseInt(width) * parseInt(height) * price * 100;
document.getElementById("hidden_price").value = parseInt(width) * parseInt(height) * price * 100;

} else {

document.getElementById("price_").innerHTML = "Not calculated yet.";

}

}

=====================================

Thanks again!!!!!!!11

jscheuer1
01-30-2006, 08:37 PM
With the modification I suggested, adding one to each value in the script before submitting the form, it works fine here in a local demo.

tsvehla1220
01-30-2006, 08:41 PM
Are you talking about the +1 on the X and Y on the javascript?
If so i did that,

check it out i uploaded the newest stuff

http://www.****wallstreet.com/test/

click the Top Left corner it reads out to (1,30) and i even changed the dealio the Y computes right, but the X does not

jscheuer1
01-30-2006, 08:54 PM
Your demo is working fine here. Try clearing your cache and making sure you are using the actual address you posted above.

tsvehla1220
01-30-2006, 08:56 PM
clearing my cache? i havent gone to bed yet lol and its 2pm here lol. refresh my memory on how to do that lol

so you went to http://www.****wallstreet.com/test/
and the #'s came up 1 and 1 on the top left corner? or did they come up 1 and 30?

jscheuer1
01-30-2006, 09:26 PM
Yes, but it's not the cache or the address, it is the screen resolution. At 1024X768, it works fine, at higher resolutions, the x coordinate is off. You need an x_sub like the y_sub (in your script.js - additions red):


y_sub = document.getElementById("grid").offsetTop;
x_sub = document.getElementById("grid").offsetLeft;

and:


x = Math.floor((x - x_sub) / 10);

tsvehla1220
01-30-2006, 09:39 PM
so where do i put that code in?

I set the page up so you can view it at 1024 but i am at a higher resolution of 1600 by 1200.

Where do i put that code in? and if i put that code in does it work at all resolutions?

tsvehla1220
01-30-2006, 09:42 PM
hahah never mind you give such great directions.
It all works great thanks to you man, i really truly appreciate it. Thank you very much!!!!!!!!!1