Jump to content

PHP Script Works in FF, Not in IE


darrin365

Recommended Posts

I have this function that works in FF,but not in IE. Can anyone tell why? I just stops altogether after the Javascript.
[code]<?php
function add_form() {
global $database, $my;
?>

<script type="text/javascript">
function submitbutton2( pressbutton ) {
var form = document.add_form;
add_form.submit(pressbutton);
}
</script>
<?php
$userid = ($my->id);

$query = "SELECT dtd_trips.trip_name AS trip_name, dtd_trips.trip_id AS trip_id"
."\n FROM dtd_trips, dtd_trip2user"
."\n WHERE dtd_trips.trip_id = dtd_trip2user.trip_id"
."\n AND dtd_trip2user.user_id = $userid"
;
$database->setQuery( $query );
$database->query();
$rows = $database->loadObjectList();
foreach ($rows AS $t) {
echo $t->trip_id;
?>
<div class="componentheading">Add to This Trip</div><br />
<form name="add_item" action="<?php echo $mosConfig_live_site ?>/index.php?option=com_tripmaker" method="post">
<select name="trip">
<option value="<?php echo $t->trip_id; ?>"><?php echo $t->trip_name; ?></option>
</select>
<input type="hidden" name="task" value="add" />
<input type="submit" class="button" value="Add" onclick="javascript:submitbutton2('additem')" />
</form>
<?php
}
}
}
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/35559-php-script-works-in-ff-not-in-ie/
Share on other sites

Thanks. I have...and have...and have...and have. I figured it was probably something obvious, I'm just not seeing it. I thought maybe a fresh pair of eyes would spot it.

BTW, ignore the extra "}" at the bottom. It's left over from a class declaration that I didn't copy over to this post.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.