473,412 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

DIV tags don't show text from onblur

31
I'm totally lost! I've been trying for several days to make Onblur fill in the city, state after the user inputs inside a textbox a 5 digit zip code, from the the zip, city, state text boxes I want to extract the info and pu it in a separate line like this:
a) user puts a zipcode:95051
b) Onblur fills in city and state
c) a new line in the same page showing ex.
Support Services
SantaClara,CA 95051

I have a test page loaded with all the code here: http://www.echildcaremanagement.com/prototype/step6.html

The HTML code:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head>
  4. <title>ZIP Code to City and State using XmlHttpRequest</title>
  5. <script language="javascript"  type="text/javascript">
  6. var url = "CityState.php?param="; // The server-side script
  7. function handleHttpResponse() {
  8.   if (http.readyState == 4) {
  9.     // Split the comma delimited response into an array
  10.     results = http.responseText.split(",");
  11.     document.getElementById('city').value = results[0];
  12.       document.getElementById('state').value = results[1];
  13.       document.getElementById('areacode').value = results[2];
  14.       document.getElementById('zip').firstChild.nodeValue = city + ', ' + state;
  15.       document.getElementById('zip1').firstChild.nodeValue = zip;
  16.   }
  17. }
  18. function updateCityState() {
  19.   var zipValue = document.getElementById("zip").value;
  20.   http.open("GET", url + escape(zipValue), true);
  21.   http.onreadystatechange = handleHttpResponse;
  22.   http.send(null);
  23. }
  24. function getHTTPObject() {
  25.   var xmlhttp;
  26.   /*@cc_on
  27.   @if (@_jscript_version >= 5)
  28.     try {
  29.       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  30.     } catch (e) {
  31.       try {
  32.         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  33.       } catch (E) {
  34.         xmlhttp = false;
  35.       }
  36.     }
  37.   @else
  38.   xmlhttp = false;
  39.   @end @*/
  40.   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  41.     try {
  42.       xmlhttp = new XMLHttpRequest();
  43.     } catch (e) {
  44.       xmlhttp = false;
  45.     }
  46.   }
  47.   return xmlhttp;
  48. }
  49. var http = getHTTPObject(); // We create the HTTP Object
  50. </script>
  51. <style type="text/css">
  52. <!--
  53. .style1 {
  54.     font-size: 16px;
  55.     font-weight: bold;
  56.     font-style: italic;
  57. }
  58. -->
  59. </style>
  60. </head>
  61. <body>
  62. <p>&nbsp;</p>
  63. <p>&nbsp;</p>
  64. <p class="style1"><fieldset>
  65. <legend>Computer information:</legend>
  66. <legend><div id="city1"></div></legend>
  67. <legend>
  68. <div id="state1"></div>
  69. </legend>
  70. <legend>
  71. </legend>
  72. </fieldset></p>
  73.  
  74. <p class="style1">Schedule your services now!</p>
  75. <p>&nbsp;</p>
  76. <p>&nbsp;</p>
  77. <p>&nbsp;</p>
  78. <p>&nbsp; </p>
  79. <form action="post">
  80.   <p>ZIP code:
  81.     <input type="text" size="5" name="zip" id="zip1" onblur="updateCityState();" />
  82.   </p>
  83.   City:
  84.   <input type="text" name="city" id="city1" />
  85.   State:
  86.   <input type="text" size="2" name="state" id="state1" />
  87. </form>
  88. </body>
  89. </html>
Thanks for your help!

Ed
PS pbmods has been helping, somehow it was working before now is not working? am I missing something inside the DIV tags?
Jul 23 '07 #1
26 2232
gits
5,390 Expert Mod 4TB
hi ...

the only id of a div (where you want the output?) that you have in your document is 'city1' but in handleHttpResponse you try to getElementById('city') etc. so you will get an error that your elements are not found ... put all divs with the correct ids in your document, or outcomment all lines that try to get an unavailable id for testing purposes ... so: your problem are the ids! ;)

kind regards
Jul 23 '07 #2
edwire
31
hi ...

the only id of a div (where you want the output?) that you have in your document is 'city1' but in handleHttpResponse you try to getElementById('city') etc. so you will get an error that your elements are not found ... put all divs with the correct ids in your document, or outcomment all lines that try to get an unavailable id for testing purposes ... so: your problem are the ids! ;)

kind regards
But I'm trying to get zip, city and state info inside the textboxes from there I want to extract that information and put it in another line, if I was to remove handleHttpResponse you try to getElementById('city') then nothing works! on the DIV all I want in there is to be able to have the output from the city, state and zipcode once onblur updates the textbox, but I wan to keep the information also inside the textboxes.. I hope this is clear enough?

All I need to be able to show is when someone enters a zip number the city and state with Onblur which it does! from there i want to be able to put it somewhere like this: Support Services one line, Santa Clara, CA 95051 seconde line, call 408-445-4573 third line.

Thanks a lot!

Ed
Jul 23 '07 #3
epots9
1,351 Expert 1GB
with some help from firefox i was able to get your code working...fixes:

u are using the command "getElementById" but your using the name attribute instead of the id.

ie:
[HTML]<input type="text" size="2" name="state" id="state1" />[/HTML]
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("state").value = results[1];
  2. //this line won't find anything, gives an error.
  3.  
in your html code, make the id and name have the same value, cuz some browsers don't support the attribute id, so at least this way they are the same value so the way u call them would be different.

[HTML]<input type="text" size="2" name="state" id="state" />[/HTML]

also,
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("areacode").value = results[2];
  2.  
does not exist, so it throws an error, comment it out or add a textbox with areacode as its id.

correct these errors and test it out, if there are still any problems repost the new version to that site u have above and we'll take a look.

if all is working, post back to tell us.

good luck
Jul 23 '07 #4
epots9
1,351 Expert 1GB
**double post....my bad
Jul 23 '07 #5
edwire
31
with some help from firefox i was able to get your code working...fixes:

u are using the command "getElementById" but your using the name attribute instead of the id.

ie:
[HTML]<input type="text" size="2" name="state" id="state1" />[/HTML]
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("state").value = results[1];
  2. //this line won't find anything, gives an error.
  3.  
in your html code, make the id and name have the same value, cuz some browsers don't support the attribute id, so at least this way they are the same value so the way u call them would be different.

[HTML]<input type="text" size="2" name="state" id="state" />[/HTML]

also,
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("areacode").value = results[2];
  2.  
does not exist, so it throws an error, comment it out or add a textbox with areacode as its id.

correct these errors and test it out, if there are still any problems repost the new version to that site u have above and we'll take a look.

if all is working, post back to tell us.

good luck
Here is the HTML with changes:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head>
  4. <title>ZIP Code to City and State using XmlHttpRequest</title>
  5. <script language="javascript"  type="text/javascript">
  6. var url = "CityState.php?param="; // The server-side script
  7. function handleHttpResponse() {
  8.   if (http.readyState == 4) {
  9.     // Split the comma delimited response into an array
  10.     results = http.responseText.split(",");
  11.     document.getElementById('city').value = results[0];
  12.       document.getElementById('state').value = results[1];
  13.       document.getElementById('zip').firstChild.nodeValue = city + ', ' + state;
  14.       document.getElementById('zip1').firstChild.nodeValue = zip;
  15.   }
  16. }
  17. function updateCityState() {
  18.   var zipValue = document.getElementById("zip").value;
  19.   http.open("GET", url + escape(zipValue), true);
  20.   http.onreadystatechange = handleHttpResponse;
  21.   http.send(null);
  22. }
  23. function getHTTPObject() {
  24.   var xmlhttp;
  25.   /*@cc_on
  26.   @if (@_jscript_version >= 5)
  27.     try {
  28.       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  29.     } catch (e) {
  30.       try {
  31.         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  32.       } catch (E) {
  33.         xmlhttp = false;
  34.       }
  35.     }
  36.   @else
  37.   xmlhttp = false;
  38.   @end @*/
  39.   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  40.     try {
  41.       xmlhttp = new XMLHttpRequest();
  42.     } catch (e) {
  43.       xmlhttp = false;
  44.     }
  45.   }
  46.   return xmlhttp;
  47. }
  48. var http = getHTTPObject(); // We create the HTTP Object
  49. </script>
  50. <style type="text/css">
  51. <!--
  52. .style1 {
  53.     font-size: 16px;
  54.     font-weight: bold;
  55.     font-style: italic;
  56. }
  57. -->
  58. </style>
  59. </head>
  60. <body>
  61. <p>&nbsp;</p>
  62. <p>&nbsp;</p>
  63. <p class="style1"><fieldset>
  64. <legend>Computer information:</legend>
  65. <legend><div id="city1"></div></legend>
  66. <legend>
  67. <div id="state1"></div>
  68. </legend>
  69. <legend>
  70. </legend>
  71. </fieldset></p>
  72.  
  73. <p class="style1">Schedule your services now!</p>
  74. <p>&nbsp;</p>
  75. <p>&nbsp;</p>
  76. <p>&nbsp;</p>
  77. <p>&nbsp; </p>
  78. <form action="post">
  79.   <p>ZIP code:
  80.     <input type="text" size="5" name="zip" id="zip" onblur="updateCityState();" />
  81.   </p>
  82.   City:
  83.   <input type="text" name="city" id="city" />
  84.   State:
  85.   <input type="text" size="2" name="state" id="state" />
  86. </form>
  87. </body>
  88. </html>
This is the test webpage: http://www.echildcaremanagement.com/prototype/step6.html with all the changes I'm able to show with Onblur the city, state but under " Computer Information: I want to read in line one: state, city and zip code (Santa Clara, CA 95051), in line 2: I want to show a telephone number( North Call 408-458-4855). When I input the zip code all I get now is the update inside the text boxes for city and state and NOT the DIV info? am I missing something? the more I read the more I confuse myself.

epots thanks for your help, this is driving me insane!

Ed
Jul 23 '07 #6
epots9
1,351 Expert 1GB
modify this:
Expand|Select|Wrap|Line Numbers
  1. function handleHttpResponse() {
  2.   if (http.readyState == 4) {
  3.     // Split the comma delimited response into an array
  4.     results = http.responseText.split(",");
  5.     var city = document.getElementById('city').value = results[0];
  6.       var state = document.getElementById('state').value = results[1];
  7.       document.getElementById('city1').innerHTML = city + ", " + state + ", " + document.getElementById('zip').value;
  8.        document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  9.   }
  10. }
  11.  
u have to use innerHTML to write into a div tag.

good luck
Jul 23 '07 #7
edwire
31
modify this:
Expand|Select|Wrap|Line Numbers
  1. function handleHttpResponse() {
  2.   if (http.readyState == 4) {
  3.     // Split the comma delimited response into an array
  4.     results = http.responseText.split(",");
  5.     var city = document.getElementById('city').value = results[0];
  6.       var state = document.getElementById('state').value = results[1];
  7.       document.getElementById('city1').innerHTML = city + ", " + state + ", " + document.getElementById('zip').value;
  8.        document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  9.   }
  10. }
  11.  
u have to use innerHTML to write into a div tag.

good luck
Hey epots, thanks for your help! I've updated with the new tags and still don't work? is there anything missing in the DIV tags? I've just can't figure this out?

here is the new HTML and script code:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head>
  4. <title>ZIP Code to City and State using XmlHttpRequest</title>
  5. <script language="javascript"  type="text/javascript">
  6. var url = "CityState.php?param="; // The server-side script
  7. function handleHttpResponse() {
  8.   if (http.readyState == 4) {
  9.     // Split the comma delimited response into an array
  10.     results = http.responseText.split(",");
  11.     document.getElementById('city').value = results[0];
  12.       document.getElementById('state').value = results[1];
  13.       document.getElementById('zip').firstChild.nodeValue = city + ', ' + state;
  14.       document.getElementById('city1').innerHTML = city + ', ' + state;
  15.       document.getElementById('zip').value;
  16.       document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  17.   }
  18. }
  19. function updateCityState() {
  20.   var zipValue = document.getElementById("zip").value;
  21.   http.open("GET", url + escape(zipValue), true);
  22.   http.onreadystatechange = handleHttpResponse;
  23.   http.send(null);
  24. }
  25. function getHTTPObject() {
  26.   var xmlhttp;
  27.   /*@cc_on
  28.   @if (@_jscript_version >= 5)
  29.     try {
  30.       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  31.     } catch (e) {
  32.       try {
  33.         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  34.       } catch (E) {
  35.         xmlhttp = false;
  36.       }
  37.     }
  38.   @else
  39.   xmlhttp = false;
  40.   @end @*/
  41.   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  42.     try {
  43.       xmlhttp = new XMLHttpRequest();
  44.     } catch (e) {
  45.       xmlhttp = false;
  46.     }
  47.   }
  48.   return xmlhttp;
  49. }
  50. var http = getHTTPObject(); // We create the HTTP Object
  51. </script>
  52. <style type="text/css">
  53. <!--
  54. .style1 {
  55.     font-size: 16px;
  56.     font-weight: bold;
  57.     font-style: italic;
  58. }
  59. -->
  60. </style>
  61. </head>
  62. <body>
  63. <p>&nbsp;</p>
  64. <p>&nbsp;</p>
  65. <p class="style1"><fieldset>
  66. <legend>Computer information:</legend>
  67. <legend><div id="city1"></div></legend>
  68. <legend>
  69. <div id="state1"></div>
  70. </legend>
  71. <legend>
  72. </legend>
  73. </fieldset></p>
  74.  
  75. <p class="style1">Schedule your services now!</p>
  76. <p>&nbsp;</p>
  77. <p>&nbsp;</p>
  78. <p>&nbsp;</p>
  79. <p>&nbsp; </p>
  80. <form action="post">
  81.   <p>ZIP code:
  82.     <input type="text" size="5" name="zip" id="zip" onblur="updateCityState();" />
  83.   </p>
  84.   City:
  85.   <input type="text" name="city" id="city" />
  86.   State:
  87.   <input type="text" size="2" name="state" id="state" />
  88. </form>
  89. </body>
  90. </html>
thank you!

Ed
Jul 23 '07 #8
edwire
31
epost9 sorry line 13 was edited from the code.

Ed
Jul 23 '07 #9
epots9
1,351 Expert 1GB
epost9 sorry line 13 was edited from the code.

Ed
are there any improvements?
Jul 23 '07 #10
edwire
31
nope still same, just shows the text boxes info and nothing on the DIV

I wonder if the DIV tag is wrong?



Ed
Jul 23 '07 #11
epots9
1,351 Expert 1GB
nope still same, just shows the text boxes info and nothing on the DIV

I wonder if the DIV tag is wrong?



Ed
did u use my code from my post above 'handleHttpResponse'?

replace yours with the one i posted.
Jul 23 '07 #12
edwire
31
Yes I did, here is the HTML with the chnages:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head>
  4. <title>ZIP Code to City and State using XmlHttpRequest</title>
  5. <script language="javascript"  type="text/javascript">
  6. var url = "CityState.php?param="; // The server-side script
  7. function handleHttpResponse() {
  8.   if (http.readyState == 4) {
  9.     // Split the comma delimited response into an array
  10.     results = http.responseText.split(",");
  11.     document.getElementById('city').value = results[0];
  12.       document.getElementById('state').value = results[1];
  13.       document.getElementById('city1').innerHTML = city + ', ' + state;
  14.       document.getElementById('zip').value;
  15.       document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  16.   }
  17. }
  18. function updateCityState() {
  19.   var zipValue = document.getElementById("zip").value;
  20.   http.open("GET", url + escape(zipValue), true);
  21.   http.onreadystatechange = handleHttpResponse;
  22.   http.send(null);
  23. }
  24. function getHTTPObject() {
  25.   var xmlhttp;
  26.   /*@cc_on
  27.   @if (@_jscript_version >= 5)
  28.     try {
  29.       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  30.     } catch (e) {
  31.       try {
  32.         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  33.       } catch (E) {
  34.         xmlhttp = false;
  35.       }
  36.     }
  37.   @else
  38.   xmlhttp = false;
  39.   @end @*/
  40.   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
  41.     try {
  42.       xmlhttp = new XMLHttpRequest();
  43.     } catch (e) {
  44.       xmlhttp = false;
  45.     }
  46.   }
  47.   return xmlhttp;
  48. }
  49. var http = getHTTPObject(); // We create the HTTP Object
  50. </script>
  51. <style type="text/css">
  52. <!--
  53. .style1 {
  54.     font-size: 16px;
  55.     font-weight: bold;
  56.     font-style: italic;
  57. }
  58. -->
  59. </style>
  60. </head>
  61. <body>
  62. <p>&nbsp;</p>
  63. <p>&nbsp;</p>
  64. <p class="style1"><fieldset>
  65. <legend>Computer information:</legend>
  66. <legend><div id="city1"></div></legend>
  67. <legend>
  68. <div id="state1"></div>
  69. </legend>
  70. <legend>
  71. </legend>
  72. </fieldset></p>
  73.  
  74. <p class="style1">Schedule your services now!</p>
  75. <p>&nbsp;</p>
  76. <p>&nbsp;</p>
  77. <p>&nbsp;</p>
  78. <p>&nbsp; </p>
  79. <form action="post">
  80.   <p>ZIP code:
  81.     <input type="text" size="5" name="zip" id="zip" onblur="updateCityState();" />
  82.   </p>
  83.   City:
  84.   <input type="text" name="city" id="city" />
  85.   State:
  86.   <input type="text" size="2" name="state" id="state" />
  87. </form>
  88. </body>
  89. </html>
Ed
Jul 23 '07 #13
drhowarddrfine
7,435 Expert 4TB
Validate your html for a list of errors, particularly in your forms.
Jul 23 '07 #14
epots9
1,351 Expert 1GB
u are missing some:
Expand|Select|Wrap|Line Numbers
  1. //notice var city =
  2. var city = document.getElementById('city').value = results[0]; 
  3. //notice var state =
  4. var state = document.getElementById('state').value = results[1];
  5. //next line is only one line long
  6. document.getElementById('city1').innerHTML = city + ", " + state + ", " + document.getElementById('zip').value;
  7. //another line
  8. document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  9.  
u didn't delcare the variables.
Jul 23 '07 #15
edwire
31
u are missing some:
Expand|Select|Wrap|Line Numbers
  1. //notice var city =
  2. var city = document.getElementById('city').value = results[0]; 
  3. //notice var state =
  4. var state = document.getElementById('state').value = results[1];
  5. //next line is only one line long
  6. document.getElementById('city1').innerHTML = city + ", " + state + ", " + document.getElementById('zip').value;
  7. //another line
  8. document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  9.  
u didn't delcare the variables.

Can you show me one example of how to declare the variables? Please.

Thanks a lot for your help!

Ed
Jul 23 '07 #16
edwire
31
Can you show me one example of how to declare the variables? Please.

Thanks a lot for your help!

Ed
By the way your line 6 is wrong if you look at the code is no a ONE long line.

Thanks again

Ed
Jul 23 '07 #17
epots9
1,351 Expert 1GB
Can you show me one example of how to declare the variables? Please.

Thanks a lot for your help!

Ed
its in my code, this is how u do it:
Expand|Select|Wrap|Line Numbers
  1. var num = 1;
  2. // the word 'var' indicates that are declaring a variable
  3. // 'num' is the name we are giveing the variable
  4. // '1' is the value that the variable will be storing
  5.  
the code i gave u has everything u need, just use it as is.

good luck
Jul 23 '07 #18
edwire
31
its in my code, this is how u do it:
Expand|Select|Wrap|Line Numbers
  1. var num = 1;
  2. // the word 'var' indicates that are declaring a variable
  3. // 'num' is the name we are giveing the variable
  4. // '1' is the value that the variable will be storing
  5.  
the code i gave u has everything u need, just use it as is.

good luck

epost9 which variable do I need to declare?

Expand|Select|Wrap|Line Numbers
  1.     document.getElementById('city').value = results[0];
  2.       document.getElementById('state').value = results[1];
  3.       document.getElementById('city1').innerHTML = city + ', ' + state;
  4.       document.getElementById('zip').value;
  5.       document.getElementById('state1').innerHTML = "North Call 408-458-4855";
Ed
Jul 23 '07 #19
epots9
1,351 Expert 1GB
u have
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('city').value = results[0];
  2. document.getElementById('state').value = results[1];
  3. document.getElementById('city1').innerHTML = city + ', ' + state;
  4. document.getElementById('zip').value;
  5. document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  6.  
should be:
Expand|Select|Wrap|Line Numbers
  1. //have to declare city and state here
  2. var city = document.getElementById('city').value = results[0];
  3. var state = document.getElementById('state').value = results[1];
  4.  
  5. //or else city and state don't work here
  6. document.getElementById('city1').innerHTML = city + ', ' + state + " " + document.getElementById('zip').value;
  7.  
  8. document.getElementById('state1').innerHTML = "North Call 408-458-4855";
  9.  
good luck
Jul 23 '07 #20
edwire
31
eposts9 here again, like this:

Expand|Select|Wrap|Line Numbers
  1.     var city = document.getElementById('city').value = results[0]; 
  2.     var state = document.getElementById('state').value = results[1];
  3.      var city1 = document.getElementById('city1').innerHTML = city + ', ' + state;
  4.       var zipcode = document.getElementById('zipcode').value;
  5.       document.getElementById('state1').innerHTML = "North Call 408-458-4855";
Ed
Jul 23 '07 #21
edwire
31
I GOT IT! it finally works!

your da man! thanks for patience! and good help!

Ed
Jul 23 '07 #22
edwire
31
quick question eposts9, is showing the city and state but I'm missing the zipcode.

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('city1').innerHTML = city + ', ' + state;
do I need to add to this code the zip?

ex. Santa, Clara (missing the zip code)

Ed
Jul 23 '07 #23
epots9
1,351 Expert 1GB
quick question eposts9, is showing the city and state but I'm missing the zipcode.

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('city1').innerHTML = city + ', ' + state;
do I need to add to this code the zip?

ex. Santa, Clara (missing the zip code)

Ed
remove the semi-colon add this:
+ " " + document.getElementById('zip').value;

good luck
Jul 23 '07 #24
edwire
31
Hey epots9 it rocks!

I don't know how to say it, but really thank you for your time.

Ed

PS I hope I can keep your e-mail for other projects but this time for real money.
Jul 23 '07 #25
epots9
1,351 Expert 1GB
i'm glad i could happy and that were able to solve the problem.

**i don't post my email.
Jul 23 '07 #26
pbmods
5,821 Expert 4TB
PS I hope I can keep your e-mail for other projects but this time for real money.
Heya, Ed.

Well, as flattering as that is (to epots9, I mean), I'm afraid that it would violate our ToS. HOWEVER, if you ever do need paid help with a project, you are welcome to post to our jobs forum, and if there are particular members that you want to point it out to, you can send them a PM.

Good luck with your project, and if you ever need anything, post back anytime :)

P.S. This is me in moderator mode.
Jul 24 '07 #27

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Abby Lee | last post by:
I have back to back text boxes used to create university account numbers. I'm actually creating them with a script so they can create as many account numbers as they need. <edited and cut down...
8
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta...
2
by: nikou_70 | last post by:
I have a page with one text box when I search name, return value such as (address, phone...) I show these value in the table but I want to show these in text box that I have in my page. ...
4
by: Dabbler | last post by:
Is there a way to mark the text in a TextBox control as selected so when the user types a new value the existing text is replaced? Thanks
10
by: Barry L. Camp | last post by:
Hi all... hope someone can help out. Not a unique situation, but my search for a solution has not yielded what I need yet. I'm trying to come up with a regular expression for a...
8
by: Zytan | last post by:
I thought each XmlNodeType.Element has a matching XmlNodeType.EndElement. But, this does not occur when the XML file has the following: <example attr1="1" attr2="2" /> Even though this is...
7
by: miladhatam | last post by:
hi friends i've built a page that should show first 150 chars of every of my topics but when i wanted to do this work with SubString() it included the tags of my field of my db and very bad...
17
by: V S Rawat | last post by:
I joined this ng and tried to post my first message that had a small php code (HTML and all). my newsserver aioe.net rejected the post saying "HTML Tags". My message was in text format, not in...
8
by: azjudd | last post by:
Thank you in advance for your help on this one. I'm using named anchor tags on a FAQ page with questions listed at the top and answers below; a standard jump-to feature. However, anytime an anchor...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.