Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Java Script
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 28 October 2007 :  04:09:34  Show Profile

I am using below code but getting some javascript error :

quote:

<script>
function addressVer_popup() {
{
var Add1 = document.getElementById("txtAddress1").value;
var Add2 = document.getElementById("txtAddress2").value;
var City = document.getElementById("txtcity").value;
var State = document.getElementById("slctState").value;
var Zip = document.getElementById("txtZip").value;
var URL = "verify.asp?Address=" + Add1 + Add2 + "&city=" + City + "&state=" + State + "&zip=" + Zip;
var winPop = window.open(URL,"winPop","width=800,height=600,directories=no,location=no,me nubar=no,resizable=yes,scrollbars=yes,status=yes,too lbar=no");
}
}
//-->
</script>

<%

Response.write "<br><b><font color=red><a href=javascript:addressVer_popup();>Verify Address</a>[After entering Address,City,State,Zip]</font></b>"

%>

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 28 October 2007 :  07:02:48  Show Profile
Assuming that this line
document.getElementById("slctState").value;
is accessing a select box, I think this may give an error, at least nothing else jumps out at me as wrong. Try
document.getElementById("slctState").options[document.getElementById("slctState").selectedIndex].value;
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 28 October 2007 :  11:11:29  Show Profile
var State = document.getElementById("slctState_" & document.getElementById("slctCampaign").value);

Above line work but it returns NULL.

It shld have VALUE property with slctState field. but dont know where

Like :

var State = document.getElementById("slctState_" & document.getElementById("slctCampaign").value).VALUE ;

Edited by - kolucoms6 on 28 October 2007 21:12:34
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 30 October 2007 :  07:37:37  Show Profile
Did Hamlin's answer not work for you?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 31 October 2007 :  09:33:04  Show Profile
It worked but I have an array of slctCampaign which is causing me a problem.
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 31 October 2007 :  09:43:27  Show Profile

document.getElementById("slctCampaign").value return me the array number..

Like

SlctState_11 or SlctState_12
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 31 October 2007 :  13:41:36  Show Profile
Are you sure document.getElementById("slctCampaign").value is returning what you expect it too?

Try doing
alert(document.getElementById("slctCampaign").value)
and seeing what it is returning.
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 31 October 2007 :  13:55:22  Show Profile

Its returning me correct figure/value.

I tried it..
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 31 October 2007 :  14:07:01  Show Profile
Ok...I'm a bit stuck then. Only thing I can think of is case. In your example you use SlctState_12 and sometimes you are using slctState_

The uppercase/lowercase S maybe causing it a problem...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07