View Full Version : Hidden value problem

May 27th, 2010, 07:04 PM
Hi, i have 640 hidden values like this:

<input type="hidden" name="b1r1c1" value="&nbsp;">

now when the page loads the value is not &nbsp; it is just nothing. im guessing its because the browser interprets as a space if you know what i mean and doesn't give the hidden value that value.

the way i solved this was to have 640 line of


this was in vbscript as the page loads but the problem that lies here is that this makes the page load very slowly. i just wondered if there was anyother way to solve this.


May 27th, 2010, 07:42 PM
Would something like:

<input type="hidden" name="b1r1c1" value="&amp;nbsp;">

Work? Because the &amp; is the entity for the & symbol...

What is this being used for and how are you retrieving the value, PHP or something?

May 27th, 2010, 07:46 PM
It doesn't seem to work. and im actually retrieving the value in javascript and vbscript and differnet times throughout the script. They are there because they represent the values of table cells.

May 27th, 2010, 08:03 PM
Well this works for me:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>


<input type="hidden" id="test" value="&amp;nbsp;">
<script type="text/javascript">

I can't see why you'd need an empty space, but you could even use a flag as the value then in your JS/VB do something like: flag = &nbsp;

May 27th, 2010, 08:07 PM
i tried it again and it works now with the &amp bit. Thanks for your help.