Welcome to WebmasterWorld Guest from 23.22.250.113

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Submit button not showing in Safari

     

TucsonBill

5:42 pm on Mar 20, 2011 (gmt 0)



I have a form with a submit button on an include page in PHP. All works well with IE and Firefox, but the button does not display in Safari. You can see this by going to [swwoodcarvers.org...] and navigating to the "Newsletters" page. There should be a Submit button below the dropdown. The code for this is:


<form action="index.php" method="post">
<?php
$query = "SELECT id, date, name from newsletter order by date desc";
$result = mysql_query($query) or die('Sorry, could not read newsletter table');
echo "<center>";
echo "<select name=\"newsletter\">\n";
echo "</center>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$value = $row['name'];
echo "<option value=\"$row[id]\">$value";
}
?>
<input type="hidden" name="content" value="showNewsletter">
<center>
. <br /><input type="image" name="news" src="Images/submitButton.jpg">
</center>
</form>


Anyone have any idea why the button will not show?

Thanks,
Bill

Matthew1980

12:56 pm on Mar 21, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



All looks good to me, can see the button on FF safari & IE & opera.

Try setting a variable for doing absolute file paths, so that you can eliminate any ambiguity on that.

Cheers,
MRb

jspeed

2:32 pm on Mar 21, 2011 (gmt 0)

5+ Year Member



I can see the submit button, however, the <center> tags I know are deprecated now.

Matthew1980

4:22 pm on Mar 21, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



>>however, the <center> tags I know are deprecated now.

Quite right, this is done through css now, and is really quite a nifty thing to do.

Cheers,
MRb

rocknbil

4:30 pm on Mar 21, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



This is likely nothing to do with PHP. Try

<input type="submit" style="border:none; display: block; width:150px; height:60px; text-indent:-50000px; outline:none; cursor:pointer; background:url(Images/submitButton.jpg) top left no-repeat;" value="Submit">

If that works, assign an ID to it and move the inline CSS to your style sheet.

<input type="submit" id="submitButton" value="Submit">

.....

#submitButton { border:none; display: block; width:150px; height:60px; text-indent:-50000px; outline:none; cursor:pointer; background:url(Images/submitButton.jpg) top left no-repeat; }

IntegrityWebDev

3:21 pm on Mar 22, 2011 (gmt 0)

5+ Year Member



If you remove the PHP completely does the button show up in Safari?

rocknbil

4:41 pm on Mar 22, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



<facepalm> (Thanks to integrity!) You also have a missing closing select tag which is probably the culprit. :-)

echo "<select name=\"newsletter\">\n";
echo "</center>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$value = $row['name'];
echo "<option value=\"$row[id]\">$value</option>";
}
echo "</select>";
?>

TucsonBill

8:00 pm on Mar 22, 2011 (gmt 0)



That did it rocknbil! Thanks a bunch! Can't believe I made a bonehead mistake like that.

Bill

rocknbil

4:59 pm on Mar 23, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



We all missed it. LOL
 

Featured Threads

Hot Threads This Week

Hot Threads This Month