This is for work and I'm just not that good at coding.

The simple redirect code I know:

<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

What I need is for the redirected page to be presized (width=800,height=564). I only know how to do it when a user pushed a button not on a redirect.

The problem is this is a webcast that they are putting on plasma screens so there will be no user interaction.

Using the hardware/software they are trying to use they just put a link in and it goes.

I am sure this is a simple thing.

Any help would be apreciated.

Thank you!

Recommended Answers

All 13 Replies

You cannot force a page to be a certain size.

The only way to resize a page is to control the window in which it appears, which you already know how to do "when a user pushed a button", meaning, using the window.open() method, I presume.

When you redirect, you aren't creating a new window. You lose control over the window. The new page owns it, so that page will need to contain its own resize code.

Thank you for the reply.

I was hoping there was something I could do.

I can't build a whole new page for these plasmas in time and my prebuilt (by my now deceased predecessor) webcast template isn't full screen. I can give them the direct link to the frameset but without controling the window size everything is distorted.

I thought a redirect may work but I guess not.

Does anyone have any suggestions for a quikish work around?

Perhaps I wasn't very clear: only the "current page" can resize and/or open a window. Once the web server redirects to a page, only THAT PAGE can resize its window.

You could open the page in a new window of the specified size and close the old window behind you.

It's not the best solution, but it will work in a pinch.

I'll give it a try Deacon. It's better then having to reprogram a whole new webcast template from scratch.

What would be the code for that?

Well crap...that only works in IE.

The latest Netscape and FireFox browsers won't let javascript close a window it did not open.

Well crap...that only works in IE.

The latest Netscape and FireFox browsers won't let javascript close a window it did not open.

Well this is just for one box so the browser can be whatever I need it to be so I think that code would work.

Let me know what your using and I'll give it a try.

Well, for IE, use

<script type="text/javascript">
window.open("test2.html",null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
self.close();
</script>

I guess I'm having a hard time picturing what you are trying to do?

How it the webcast accessed in the first place? By a link from another page? Through a frameset?

It seems like you should be able to contain it inside a div element and set the height and width using css.

Is this something I can look at on the Web to get an idea of what you are working with?

Deacon, you have totally saved me! :mrgreen: :mrgreen: :mrgreen:

I took out the auto close since IE prompts you if you want to close it or not but it totally worked the way I needed it to! :mrgreen: :mrgreen: :mrgreen:

I'll give you the credit, don't worry! ;)

Just to explain myself a little better. I am contracting with one of the large telecoms to support their webcasts which serve as their internal communications. It's the standard talking head next to powerpoint but rather than using an out of the box software/hardware package for webcasting they had someone custom build the whole thing from the ground up. Unfortunately this person passed away a few months ago and I am trying to use his code.

What the company wants to do is also distribute the webcast via satellite TV to it's various offices. They can't just send the video because then they wouldn't see the powerpoint. They bought this box that can send a web link on the satellite channel on certain times automatically.

How the webcast is built is that the link I send out takes them to a standard webpage with all the information and FAQs on it as well as a "view webcast" button. In order to see the webcast the user needs to hit that button.

They wanted to automate the process for the box feeding the satellite which your code is perfect for.

Thank you again!

Glad to help.

I find this thread totally baffling. You started out by saying you already knew how to use window.open(), and close the thread by saying that the window.open() method totally saved you. If you didn't know about window.open(), you saw it mentioned in the very first reply to your question...

As long as you're happy, I guess. <shrug>

I don't know javascript at all really. I'm using code I didn't build. I can somewhat change things around as I need to but something new required a little help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.