spiceydog Posted August 24, 2008 Share Posted August 24, 2008 The only browser i've found to have this problem is Safari on PC and a few different browsers on Mac. It seems that when the query returns more than one result the input boxes after the first are all shown empty in certain browsers. Here is a picture of what i'm talking about: Working: Not Working: The Relevant Code: <script> function SelectAll(id) { document.getElementById(id).select(); } </script> <?php $dlcount = 1; $resultdl = mysql_query("SELECT * FROM albuminfo WHERE post='$id' GROUP BY albumname"); while($rowdl = mysql_fetch_array($resultdl)) { $dl = split("\r", $rowdl['dl']); foreach ($dl as $value) { ?> <input type="text" id="dl<?php print $dlcount; ?>" onFocus="SelectAll('dl<?php print $dlcount++; ?>');" value="<?php print htmlentities($value); ?>"> <?php } } ?> Now like i said above, the code is in the source with safari browsers but it just isn't shown! Here is the relevant source: <input type="text" id="dl1" onFocus="SelectAll('dl1');" rows=1 cols="15" value="http://site.com/1.html"> <input type="text" id="dl2" onFocus="SelectAll('dl2');" rows=1 cols="15" value="http://site.com/2.html"> Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/ Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 did u check for w3 compliance on www.org? if u are compliant with w3 all major browsers will render the code just fine Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624355 Share on other sites More sharing options...
spiceydog Posted August 24, 2008 Author Share Posted August 24, 2008 I went to the website and went to http://validator.w3.org/check?uri=http%3A%2F%2Fmuzicwarez.info%2Fviewpost.php%3Fid%3D550&charset=%28detect+automatically%29&doctype=Inline&group=0 I get 59 errors and 26 warnings but i dont think any of them relate to my problem. Why would it not work in safari but work in Opera, Firefox, and IE? Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624361 Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 I get 59 errors and 26 warnings but i dont think any of them relate to my problem. Why would it not work in safari but work in Opera, Firefox, and IE? Well why don't u spend some time and fix them because trust me they are important and probably 1 of em relates to your problem. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624364 Share on other sites More sharing options...
trq Posted August 24, 2008 Share Posted August 24, 2008 I get 58 errors but i dont think any of them relate to my problem. Well php definately doesn't relate to your problem. Why would it not work in safari but work in Opera, Firefox, and IE? Different browsers render things differently. I would suggest fixing your errors and seeing if that helps. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624365 Share on other sites More sharing options...
spiceydog Posted August 24, 2008 Author Share Posted August 24, 2008 I've been looking through the errors and I must say, most of them don't make alot of sense and deffinetly do not relate to my problem.. there is alot about required "alt" attribute.. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624370 Share on other sites More sharing options...
DeanWhitehouse Posted August 24, 2008 Share Posted August 24, 2008 Please take our advice ,and fix them. How do you know what one relates to your problem. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624373 Share on other sites More sharing options...
spiceydog Posted August 24, 2008 Author Share Posted August 24, 2008 blade why would an alt tag for an image have anything to do with a mysql query and an input box? i know i'm going to get in trouble for saying this sense you have alot of posts and seem important but why not contribute something to a thread rather than just claiming to by saying "our advice"? really not very helpful. but to seriously answer your question "How do you know what one relates to your problem". Well I used process of elimination and found that the first 9 errors are bogus. end tag for element "A" which is not open . menu2[0]='<a href="/inbox.php">Inbox</a>' looks to be like the A was pretty open. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624380 Share on other sites More sharing options...
DeanWhitehouse Posted August 24, 2008 Share Posted August 24, 2008 If you want help dont act like a jerk, W3C compliancy is what you should aim for when coding , and it can cause wierd display errors in some browsers. If you dont want to listen to our advice , dont ask for it. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624383 Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 If you fix the alt tag errors than you will discover what the other errors are which probably pertain to your input boxes. The conforming to w3 standards is optional just like us helping you here is optional so you make the choice. Quote Link to comment https://forums.phpfreaks.com/topic/121108-safari-not-displaying-something-in-input-box/#findComment-624386 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.