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
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.