Lord_Hynarc
07-11-2005, 08:48 PM
Hi All,
I am a complete novice at Javascript and am struggling so thought I'd seek help - is that a collective groan I hear?
I suspect that I have probably designed a most complicated way of achieving something very simple. The problem is this. I have a series of PHP programs which access a database and create webpages based on the information therein. In order to provide a good front end to this process I need to have a JS program which finds out the width of the window and passes it into the PHP program. This JS program is in an HTML document. Now I can extract the information and put it into a link on the page using the following statement -
document.write('<a href="fh_sub_index.php?width='+maxWidth+'&name='+strName+'" target="_parent">List of First Names</a>') ;
This works fine. However, I don't want a link; I want the page to load automatically at this point. If I use window.open the page I want, with the required parameters, loads. However, this produces a new window. I want it to load in the existing window. How can I get round this?
Please help me solve this little conundrum - preferably without baffling me with science - me being a 'bear of very little brain'!
Thanks for your help
Vidda
I am a complete novice at Javascript and am struggling so thought I'd seek help - is that a collective groan I hear?
I suspect that I have probably designed a most complicated way of achieving something very simple. The problem is this. I have a series of PHP programs which access a database and create webpages based on the information therein. In order to provide a good front end to this process I need to have a JS program which finds out the width of the window and passes it into the PHP program. This JS program is in an HTML document. Now I can extract the information and put it into a link on the page using the following statement -
document.write('<a href="fh_sub_index.php?width='+maxWidth+'&name='+strName+'" target="_parent">List of First Names</a>') ;
This works fine. However, I don't want a link; I want the page to load automatically at this point. If I use window.open the page I want, with the required parameters, loads. However, this produces a new window. I want it to load in the existing window. How can I get round this?
Please help me solve this little conundrum - preferably without baffling me with science - me being a 'bear of very little brain'!
Thanks for your help
Vidda