By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,034 Members | 971 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,034 IT Pros & Developers. It's quick & easy.

problem redirecting in explorer 7 and firefox!

100+
P: 155
Hello friends , i got this code that works perfect in google chrome,but not in IE7 or FireFox!!

Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <META HTTP-EQUIV="refresh" content="1;URL=http://www.bonker.co.il/product_detailclose.php?bid_id=<?=$bid_id?>">
  3. <HEAD>
  4. </HEAD>
  5.  
  6.  
  7. </HTML>
i try javascript insted but no luck!! i try alot of combinations and nothing works for me!!

any help please!!

thanx :)
Dec 7 '08 #1
Share this Question
Share on Google+
10 Replies


Markus
Expert 5K+
P: 6,050
Where do you use PHP? You don't. Ergo, this is not a PHP problem. Ergo, you have posted in the wrong forum. I'll move it over to HTML/CSS for you, where it is more suited.
Dec 7 '08 #2

Markus
Expert 5K+
P: 6,050
I'm guessing you're relatively new to HTML, right? A couple of things to say: html elements should be lower-case, as opposed to UPPER-CASE. You need a Doctype for your page to work properly in IE.

Fix those.
Dec 7 '08 #3

100+
P: 155
before moving any thing!!

i got a ridirection from php file to this file ,what im having here is to redirect to other php file!!

whats the problem having it here?
Dec 7 '08 #4

100+
P: 155
what is it? :)

im writing html with covered eyes man :)
Dec 7 '08 #5

eWish
Expert 100+
P: 971
What versions of IE and Firefox are you using?
Dec 7 '08 #6

100+
P: 155
IE 7 ,FireFox 2

thanx
Dec 7 '08 #7

Atli
Expert 5K+
P: 5,058
If this is in fact a PHP page, you could use the PHP header function, rather than the META tag.

Like:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. header("Location: http://example.com");
  3. ?>
  4.  
Note that this MUST be the first thing on the page. If you put so much as a white-space before it, you will get an error.
Dec 7 '08 #8

Markus
Expert 5K+
P: 6,050
The redirect works fine for me in the latest versions of FF and IE.
Dec 7 '08 #9

100+
P: 155
i have a page.php ,in this page there is AJAX call to other file.php in this file php i try to do HEADER Location and it was opening the new location inside the div of the ajax!!!

what i did to pass it to top of the window ,i created a newfile.php and in this file i put the META HTTP redirection and it works fine for me "BUT" only in google chrome!!! ,im stupid that i didnt try it in explorer!! now im stuck.


i hope you get me better now!!

:)
Dec 8 '08 #10

Atli
Expert 5K+
P: 5,058
An AJAX call is an independent HTTP request. If you use a redirect in the file your AJAX is calling, it will have no effect on the page the AJAX is in.

If you want to redirect based on results from an AJAX call, try using the JavaScript "location.href" property.
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. location.href = 'http://example.com';
  3. </script>
  4.  
Putting that anywhere in your script should redirect you to the example URL in any decent browser.

@canabatz
No, actually, that's usually the smart thing to do. Design for standard compliant browsers (like Chrome) and then work around the problems IE causes.
Dec 8 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.