Welcome! Log In Create A New Profile

Advanced

Differen browsers different code behavior?

Posted by Ordo 
Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Differen browsers different code behavior?
October 29, 2009 11:26AM
I have run into a bit of a problem!

IE8 does not run my project the correct way. I have been developing with Firefox 3.5.1 and all works as it should but IE 8 is an issue (not crashing but not executing correctly).

Anybody else found something similar?

Mac, what are you going to test our projects with?.Can we request that you use a specific browser?
avatar Re: Differen browsers different code behavior?
October 29, 2009 12:16PM
Chrome and Firefox behaves correctly but IE 8 not.
Re: Differen browsers different code behavior?
October 29, 2009 01:28PM
Yes, me too
avatar Re: Differen browsers different code behavior?
October 29, 2009 01:56PM
I recommend i.e. 7. it's more stable, and i think it'd be more commonly used... But i think Mac will be marking the php mainly, so perhaps browser behavior wont affect our final marks, so long as the php is good right?
avatar
Mac
Re: Differen browsers different code behavior?
October 29, 2009 02:01PM
IE8 does has a compatibility view button (next to the refresh button). Try that. Browser should not affect PHP code in any way. So it can only be CSS stuff and maybe Javascript.
avatar Re: Differen browsers different code behavior?
October 29, 2009 03:28PM
Compatibility view does not help.

The problem is specifically in the edit and also the delete student or course pages. I use a form button inside a table (normal HTML stuff) to allow the user to Edit or Delete a student or a course (different pages of course). In Chrome and also in Firefox the correct "sno" or "cid" is passed to the actual edit page, BUT IE only wants to pass the LAST student or course displayed to the edit page.

Here's a piece of the code from the "Manage Courses" page (the Delete Button code):

Language: PHP
// Delete Button echo "<td width='20%'>"; echo "<form method=post action='delete_course.php'>"; echo "<input name='cid' type='hidden' value='$cid'>"; echo "<input type='submit' value='Delete'"; echo "</form>"; echo "</tr>";
avatar Re: Differen browsers different code behavior?
October 29, 2009 03:50PM
Problem solved!

Seems IE8 is much more particular to syntax issues!

Language: PHP
// Delete Button echo "<td width='20%'>"; echo "<form method=post action='delete_course.php'>"; echo "<input name='cid' type='hidden' value='$cid'>"; echo "<input type='submit' value='Delete'>"; echo "</form>"; echo "</td>";
avatar
Mac
Re: Differen browsers different code behavior?
October 30, 2009 06:59AM
IE does not evaluate your php code, so if there is an error, the server will tell you about it - not IE. IE cannot decide what to pass or not to pass - your code does. The reason lies elsewhere.
avatar Re: Differen browsers different code behavior?
October 30, 2009 08:47AM
I see your code is different in each of the examples Ordo.

Your last line.
Re: Differen browsers different code behavior?
November 02, 2009 02:50PM
I must say, I also had a similar issue. but not between browsers, between OS/Servers...

I programmed my whole project on my Ubuntu machine at home with the LAMP config installed. everything was working pretty much 100% and then I tested it on my XP mork machine with WAMP installed and it broke it... most of the fields were out of whack and some still is... but didn't have time to fix it all.. had to send it in...
avatar
Mac
Re: Differen browsers different code behavior?
November 03, 2009 03:12PM
The only issue can be that LAMP runs maybe PHP4 and XAMPP PHP5. The bowser displays the results from your PHO code, which is parsed (interpreted) by the server and send to the browser as HTML. So only stuff like javascript, or how it is presented, can be affected.
fcb
Re: Differen browsers different code behavior?
November 04, 2009 11:34AM
also check the DOCTYPE for you page - i've solved many cross-browser issues by fixing this!
Sorry, only registered users may post in this forum.

Click here to login