PDA

View Full Version : Need ASSISTANCE: Please Advise...important...resizeTo()


BrightNail
09-13-2002, 12:09 AM
hey guys...I have the following code....when I pass "NORMAL" url string...ala...

someplace.html
profile.html
contact.html

it works great......>BUT.......

when I pass a long string with some special characters, the function bombs and it shuts down...
How can I circumevent this, or unescape or make this work..

I've tried it in Mozilla, and IE and I generate errors...Please help..


<html>
<head>
<title></title>

<script language="javascript">
function newVenue(venueWin,x,y) {
var VenueWind;
VenueWind = window.open(venueWin,'venueInfo','toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars= 1,resizable=yes,width='+x+',height='+y);
VenueWind.resizeTo(x,y);
//VenueWind.moveTo(screen.width-screen.availWidth,screen.height-screen.availHeight);
VenueWind.focus();
}
</script>
</head>
<body>
<a href="javascript:newVenue('http://www.someplace.com/someplace.asp?msn=grand&currentID=7&usr=dean','100','300')">page 1</a><br><br>
<a href="javascript:newVenue('http://www.someplace.com/someplace.asp?msn=grand&currentID=453&usr=sandy','200','200')">page 2</a><br><br>
<a href="javascript:newVenue('http://www.someplace.com/someplace.asp?msn=grand&currentID=7&usr=brian','500','500')">page 3</a>
</body>
</html>


thanks...james

glenngv
09-13-2002, 01:40 AM
you should escape() querystring that has special characters

<a href="javascript:newVenue('http://www.someplace.com/someplace.asp?msn='+escape('grand¤') +'&tID=7&usr=dean','100','300')">page 1</a>

BrightNail
09-13-2002, 07:57 AM
actually,

the problem is the fact that the URLS are on a different server/domain and you can't gain permission when using a "window.resizeTo() " ..

when I was testing earlier I was referncing pages off my desktop server..so it was working..when I 'added' urls "outside" my domain, I was getting exceptions and permission denied errors...so I guess it was that..

thanks,
james