Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

microtime issue with javascript and HTML

Status
Not open for further replies.

Steel811

Programmer
Jan 2, 2008
26
0
0
US
Hello, I have a small snippet of code that isn't functioning the way I expected it to, after migrating the website from a Linux box to a windows server with PHP 5.2.5. Below is that snippet of code:
<?php
...code that is working ok...
for($i = 0; $i <= $numberOfDays; $i++){

$thisDiv = microtime();
?>


<!-- BEGIN ARRAY ITEMS-->
<div class="boundingBox" id="bb<?= $thisDiv ?>">
<!-- -->
<label for="hotelID">Sleeping Room</label>
<input type="hidden" name="hotelID[]" value="hotelroom" />
<!-- -->

<!-- -->
<label for="date">Day and Date:</label>
<input type="text" name="stayDate[]" value=<?php echo $getNextDay ?> />
<!-- -->

<!-- -->
<label for="date">number of Rooms:</label>
<input type="text" name="numberOfRooms[]" value="1" />
<!-- -->
<a href="javascript:greyOut('bb<?= $thisDiv ?>')">X</a>
<!-- END ARRAY ITEMS -->
</div>

<?php
$dateItem = explode("/", $getNextDay);

$getNextDay = Date_Calc::nextDay($dateItem[1],$dateItem[0],$dateItem[2],'%m/%d/%Y');
}

?>

The line in particular that is giving me trouble is the <a href="javascript:greyOut('bb<?= $thisDiv ?>')">X</a> line. This is supposed to remove or greyOut the box by clicking on the X, but what it does is when I click on the first one, it deletes it, but when I click on the second one, the first one re-appears. It's quite odd. Does anyone know what may be causing this?

Thanks,
Sheel Shah
 
am i missing something? is this a php question? feels like javascript.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top