News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Link works in Firefox but not IE

Started by Tom, October 30, 2004, 07:41:52 PM

Previous topic - Next topic

Tom

The following link works fine in Firefox, but in IE it cuts off after the "vbjack-". Does anyone know why this would be happening, or any workaround of it?

<a href="javascript:openPopup('http://play.pogo.com/room/connect.jsp?game=Array&site=pogop&tab=1&apidautorules&auto=PlayNow&name=vbjack-plvbsf056')">Link</a>

Thanks.

[Unknown]

<a href="javascript:alert('http://play.pogo.com/room/connect.jsp?game=Array&site=pogop&tab=1&apidautorules&auto=PlayNow&name=vbjack-plvbsf056');">Link</a>

What does this show?  Also note the game=Array...

-[Unknown]


[Unknown]

It may be a bug in your openPopup function, then.

-[Unknown]

Tom

Ok, thanks very much as always [Unknown]. I'll see if I can figure it out from here.

Tom

Oh, I just realized the links aren't appearing the same in IE and firefox!
Firefox: javascript:openPopup('http://play.pogo.com/room/connect.jsp?game=vbjack&site=pogop&tab=1&apidautorules&auto=PlayNow&name=vbjack-plvbsf077')
IE: javascript:openPopup('http://play.pogo.com/room/connect.jsp?game=Array&site=pogop&tab=1&apidautorules&auto=PlayNow&name=vbjack-plvbsf077')

This wouldn't be caused by the openPopup function, would it?

[Unknown]

Are you using PHP to generate the link?

-[Unknown]

Tom

#7
Yes I am.

Here's the main part of it:

<?php
if (isset($_COOKIE['room'])) {
   foreach ($_COOKIE['room'] as $name => $value) {
       echo "<a href=\"javascript:openPopup('http://play.pogo.com/room/connect.jsp?",stripslashes($value),"</a>";
   }
}

?>

[Unknown]

What happens if you try...

<?php
if (isset($_COOKIE['room'])) {
   foreach ($_COOKIE['room'] as $name => $value) {
       echo "<a href=\"javascript:openPopup('http://play.pogo.com/room/connect.jsp?"stripslashes(print_r($valuetrue)), "</a>";
   }
}

?>


-[Unknown]

Tom

#9
The result is the same.

Here is the code for setting the cookie, if it makes any difference:

<?php
if ($add == "true")
 
setcookie("room[$id]""game=$game&site=pogop&tab=1&apidautorules&auto=PlayNow&name=$id')\">$name"time() + 525600 60);
?>

[Unknown]

And , in that context, what is $game?

-[Unknown]

Tom

It would be assigned through the url, ie. /favorites.php?add=true&game=vbjack&id=vbjack-plvbsf089&name=linktext

[Unknown]

Well, it's being set as 'Array' for some reason, meaning that $game is an array.

-[Unknown]

Tom

Hey, I just changed the variable to something else and it worked!

Thanks [Unknown]!!  :D

Advertisement: