By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Mac Error

P: n/a
Hi

When I submit data from a dropdown in a form, it works fine except on
macs when the value is a zero. It then submits values like "NsNu" or
"H?vH?vR?y". I can't find a solution and searching on the net semms
to show that i am the only person experiencing this problem.

What can I do
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I have read the following message from te*******@privateproperty.co.za
(Paul Ten-Bokum)
and have decided to lend my vast knowledge.

The writer said:
Hi

When I submit data from a dropdown in a form, it works fine except on
macs when the value is a zero. It then submits values like "NsNu" or
"H?vH?vR?y". I can't find a solution and searching on the net semms
to show that i am the only person experiencing this problem.

What can I do


and my reply is:
1. Are they the same browser and version?
2. You may have an error that the PC version allows but the Mac version
doesn't. If using javascript turn on error checking or check logs.
3. I would recommend that you place the page where it can be accessed
by everyone and mayby someone can test it and find the answer.

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #2

P: n/a
Hi

Ok, the html code that I am using is a bit long but here it is:

<html>

<head>
<script language="JavaScript">

var NS4 = (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) < 5);
var NSX = (navigator.appName == "Netscape");
var IE4 = (document.all) ? true : false;

function SetPrice(formname) {
var theForm = document.getElementById(formname);
var listVal = theForm.listtype.value;

if (listVal == 5) {
clearDD(theForm.fromprice);
AddOpt (theForm.fromprice,"0","0","");
AddOpt (theForm.fromprice,"1000","1 000","");
AddOpt (theForm.fromprice,"1500","1 500","");
AddOpt (theForm.fromprice,"2000","2 000","");
AddOpt (theForm.fromprice,"2500","2 500","");
AddOpt (theForm.fromprice,"3000","3 000","");
AddOpt (theForm.fromprice,"4000","4 000","");
AddOpt (theForm.fromprice,"5000","5 000","");
AddOpt (theForm.fromprice,"6000","6 000","");
AddOpt (theForm.fromprice,"8000","8 000","");
AddOpt (theForm.fromprice,"10000","10 000","");

clearDD(theForm.toprice);
AddOpt (theForm.toprice,"1000","1 000","");
AddOpt (theForm.toprice,"1500","1 500","");
AddOpt (theForm.toprice,"2000","2 000","");
AddOpt (theForm.toprice,"2500","2 500","");
AddOpt (theForm.toprice,"3000","3 000","");
AddOpt (theForm.toprice,"4000","4 000","");
AddOpt (theForm.toprice,"5000","5 000","");
AddOpt (theForm.toprice,"6000","6 000","");
AddOpt (theForm.toprice,"8000","8 000","");
AddOpt (theForm.toprice,"10000","10 000","");
AddOpt (theForm.toprice,"100000","> 10 000","");
} else {
clearDD(theForm.fromprice);
AddOpt (theForm.fromprice,"0","0","");
AddOpt (theForm.fromprice,"100000","100 000","");
AddOpt (theForm.fromprice,"150000","150 000","");
AddOpt (theForm.fromprice,"200000","200 000","");
AddOpt (theForm.fromprice,"250000","250 000","");
AddOpt (theForm.fromprice,"300000","300 000","");
AddOpt (theForm.fromprice,"350000","350 000","");
AddOpt (theForm.fromprice,"400000","400 000","");
AddOpt (theForm.fromprice,"450000","450 000","");
AddOpt (theForm.fromprice,"500000","500 000","");
AddOpt (theForm.fromprice,"600000","600 000","");
AddOpt (theForm.fromprice,"700000","700 000","");
AddOpt (theForm.fromprice,"800000","800 000","");
AddOpt (theForm.fromprice,"900000","900 000","");
AddOpt (theForm.fromprice,"1000000","1 000 000","");
AddOpt (theForm.fromprice,"1500000","1 500 000","");
AddOpt (theForm.fromprice,"2000000","2 000 000","");
AddOpt (theForm.fromprice,"2500000","2 500 000","");
AddOpt (theForm.fromprice,"3000000","3 000 000","");
AddOpt (theForm.fromprice,"3500000","3 500 000","");
AddOpt (theForm.fromprice,"4000000","4 000 000","");
AddOpt (theForm.fromprice,"4500000","4 500 000","");
AddOpt (theForm.fromprice,"5000000","5 000 000","");
AddOpt (theForm.fromprice,"6000000","6 000 000","");
AddOpt (theForm.fromprice,"7000000","7 000 000","");
AddOpt (theForm.fromprice,"8000000","8 000 000","");
AddOpt (theForm.fromprice,"9000000","9 000 000","");
AddOpt (theForm.fromprice,"10000000","10 000 000","");

clearDD(theForm.toprice);
AddOpt (theForm.toprice,"100000","100 000","");
AddOpt (theForm.toprice,"150000","150 000","");
AddOpt (theForm.toprice,"200000","200 000","");
AddOpt (theForm.toprice,"250000","250 000","");
AddOpt (theForm.toprice,"300000","300 000","");
AddOpt (theForm.toprice,"350000","350 000","");
AddOpt (theForm.toprice,"400000","400 000","");
AddOpt (theForm.toprice,"450000","450 000","");
AddOpt (theForm.toprice,"500000","500 000","");
AddOpt (theForm.toprice,"600000","600 000","");
AddOpt (theForm.toprice,"700000","700 000","");
AddOpt (theForm.toprice,"800000","800 000","");
AddOpt (theForm.toprice,"900000","900 000","");
AddOpt (theForm.toprice,"1000000","1 000 000","");
AddOpt (theForm.toprice,"1500000","1 500 000","");
AddOpt (theForm.toprice,"2000000","2 000 000","");
AddOpt (theForm.toprice,"2500000","2 500 000","");
AddOpt (theForm.toprice,"3000000","3 000 000","");
AddOpt (theForm.toprice,"3500000","3 500 000","");
AddOpt (theForm.toprice,"4000000","4 000 000","");
AddOpt (theForm.toprice,"4500000","4 500 000","");
AddOpt (theForm.toprice,"5000000","5 000 000","");
AddOpt (theForm.toprice,"6000000","6 000 000","");
AddOpt (theForm.toprice,"7000000","7 000 000","");
AddOpt (theForm.toprice,"8000000","8 000 000","");
AddOpt (theForm.toprice,"9000000","9 000 000","");
AddOpt (theForm.toprice,"10000000","10 000 000","");
AddOpt (theForm.toprice,"1000000000","> 10 000 000","");
}
}

</script>
<script language="JavaScript">

function clearDD(currentDD) {
// Clears the previously set data.

for (t = currentDD.options.length - 1; t >= 0; t--) {
if (NSX) {
currentDD.options[t] = null;
} else {
currentDD.options.remove(t);
}
}
}

function AddOpt (dropdown,val,text,colour) {
if (NSX) {
opt = new Option(text,val)
opt.style.color = colour;
var sellength = dropdown.length;
dropdown.options[sellength] = opt;
if (NS4) {
history.go(0);
}
} else {
opt = new Option(text);
opt.style.color=colour;
opt.value = val;
//opt.selected = true;
dropdown.options.add (opt);
}
}
</script>

<script language="javascript">

function Validate(theForm) {

if (theForm.listtype.value.length < 1) {
alert("please select a property type.");
theForm.listtype.focus();
return false;
}

}

</script>
</head>

<body onload="SetPrice('searchform')">

<table class="maincontainer">
<tr>
<td class="maincontainer">



<table border="0" cellpadding="0" cellspacing="0" width="90%"
align=center>
<tr>
<td valign="top" align="center" width="100%">

<table align=center width="100%">
<tr>

<td width="84%" align=left>

<form id="searchform" method="get"
action="listresults.asp" onSubmit="return Validate(this);">
<input type="hidden" name="franchiseid" value="1">
<input type="hidden" name="province" value="1">

<!---------- start search table ---------->
<img border="0"
src="/images/franchisee/advancedpropertysearch.gif">
<table border="1" cellpadding="3" cellspacing="0"
width="55%" bordercolor="#E0E8EF" style="border-collapse: collapse">
<tr>
<td width="1%" height="19">Type:</td>
<td width="100%" height="19"><select
name="listtype" onchange="SetPrice('searchform')"><option value="">---
Choose one ---</option><option value="1">Residential
Sales</option><option value="5">Residential Rentals</option><option
value="2">New Residential Developments</option><option
value="4">Land</option><option value="3">Farms &
Smallholdings</option><option value="9">Commercial Sales</option><option
value="10">Commercial Rentals</option></select></td>
</tr>
<tr>
<td width="0" height="19">Suburb:</td>
<td width="100%" height="19"><select name="suburb"
onchange=""><option value="">All</option><option
value="20">Berea</option><option value="21">CBD</option><option
value="22">Glenwood</option><option
value="23">Morningside</option><option
value="24">Sherwood/Sydenham</option><option
value="25">Glenmore/Carrington Heights</option><option
value="26">Beachfront</option><option
value="27">Umbilo/Congella</option><option
value="28">Mayville/Westridge</option><option
value="29">Overport/Puntan's Hill</option><option value="583">Manor
Gardens</option></select></td>
</tr>
<tr>
<td width="0" height="19">From:</td>
<td width="100%" height="19"><select size="1"
name="fromprice">
<option></option>
</select></td>
</tr>
<tr>
<td width="0" height="19">To:</td>
<td width="100%" height="19"><select size="1"
name="toprice">
<option></option>
</select></td>
</tr>
<tr>
<td width="100%" colspan="2" align=right>

<input type="image" value="submit" border="0"
src="../images/franchisee/go-.gif" align="bottom" width="57"
height="13"></td>


<!---------- end search table ---------->

</form>
</tr></table>
</td></tr><tr><td align=left width="84%">
<!--- start contact table ---->

<!--- end contact table ---->

</td>
</tr>

</table>

</td>
</tr>
</table>

&nbsp;
</td>
</tr>
</table>


</body>

</html>

-------------------------------------------------------

I then submit the form to a perl page that gets the values using the
following code:

-------------------------------------------------------
$fromprice = $Request->QueryString("fromprice")->item;
$toprice = $Request->QueryString("toprice")->item;
--------------------------------------------------------

I don't have any control over what browsers or which versions people use
on the website so I can't rely give any more information other than that
it only happens on macs and it only occurs when they choose the option
that submits a "0".
thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.