Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's wrong with this simple code?

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Hi, this is the code for an ASP.NET page (aspx extension) but I have also tried to change the extension to .htm and I get the same browser error (Error - Page cannot be displayed) The file exists and has the right permissions. Am I missing something syntactical or what?


<HTML>
<HEAD>
<title>map</title>
<script language=&quot;javascript&quot;>
function openwindow(){window.open(&quot; &quot;my_new_window&quot;, &quot;toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=400,height=400&quot;)
}
</script>
</HEAD>
<body onload=&quot;openwindow()&quot;>
<form runat=&quot;server&quot;>
</form>
</body>
</HTML>
Chris says: &quot;It's time for a beer.&quot;
 
The worst thing is, this works when I open it with IE manually, but not when I response.redirect to it from my ASP.NET application... Chris says: &quot;It's time for a beer.&quot;
 
When I clicked the link, it gave me the page cannot be displayed problem. But, the semicolon does need to go.

Rick If I have helped you just click the first link below to let me know :)
 
Like I said, the tek-tips editor must have a bug, it places that semicolon there after I submit it. It wasn't there when I typed it: i.e.:

&quot;

In the editor the semicolon that you see on the end of the line above does not appear. This is quite a flaw in the Tek-Tips editor I think. Chris says: &quot;It's time for a beer.&quot;
 
Why use the editor??? Use textpad It's great. It does only what you tell it to do!

Rick If I have helped you just click the first link below to let me know :)
 
but you still have to cut & paste your post into the text box before clicking &quot;Submit Post&quot; right?

when you do that, the semicolon will be placed there. Try it! Chris says: &quot;It's time for a beer.&quot;
 
I agree Chris - I've had it happen to me too...the semicolon thing.

It looks like your file is on an intranet? your url reads &quot;dataserver&quot;, not &quot; or something...for this reason we won't be able to test the link.

Just to test with no URL at all in the window.open() command, it works fine here on IE 5.5.
======================================

if (!succeed) try();
-jeff
 
I sent an email to the tek-tips support guys about this - seems important enough to fix..

Yes I am on an intranet, but I never intended for people to click the link anyway, I was just asking a javascript syntax question..

Cheers all Chris says: &quot;It's time for a beer.&quot;
 
Oh. I misunderstood. I thought you meant that tek-tips had an editor that you were using. I didn't realize that you meant this box I'm typing in.

Rick If I have helped you just click the first link below to let me know :)
 
Try dropping the http:// from window.open() function. I've had problems in the past where if you used you either had to specify file:/// (or something like that) or a web URL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top