472,958 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

get spawns loads of browsers.. solution?

Afternoon all.
I wonder if someone might lend a little hand here?

I'm using input.htm to take some data using radio and a text field
from the user, which then "get"s them to update.php.
Now then, there is a lot of data to input, so i need to go back to
input.htm repeatedly, so, at the bottom of update.php, there is an
image which has a javascript onload command, that loads up update.php.

You probably know where this is going by now? After a short while, I
end up with a screen full of browsers and it's annoying me.

What is my best way forward here? Can I make pass the data from
input.htm to update.php without it firing up a new browser, or should
I be thinking about how to make update.php close itself after the
javascript onload has executed?

Any guidance on which route, or any other for that matter and how I
might implement them would be greatly appreciated
Jul 17 '05 #1
5 1618
Paul Eden wrote:

Hi Paul,
Afternoon all.
I wonder if someone might lend a little hand here?
Of course, this is the most friendly NG you'll ever find. :-)

I'm using input.htm to take some data using radio and a text field
from the user, which then "get"s them to update.php.
That is by POSTing, right?
Now then, there is a lot of data to input, so i need to go back to
input.htm repeatedly, so, at the bottom of update.php, there is an
image which has a javascript onload command, that loads up update.php.
What do you mean?
Is the form submitted by the user pressing a submit-button (or image), or is
the form submitted automatically by some onLoad-event?

If the latter, you need to explain why, because that is confusing (to me).
Why?
Because I do not see the point in submitting a form when the client didn't
fill it first.


You probably know where this is going by now? After a short while, I
end up with a screen full of browsers and it's annoying me.
Why is that happening?
If you submit the form, did you gave a certain target (= new window)???

if your target is the same name, the same window will be recycled.
The new result of update.php will be displayed.

What is my best way forward here? Can I make pass the data from
input.htm to update.php without it firing up a new browser, or should
I be thinking about how to make update.php close itself after the
javascript onload has executed?
Yes, that is a solution.
I take it your update.php is not producing any relevant output?
In that case, just let JS close the window.

<html>
<body onLoad="self.close();">
</body>
</html>

should do the trick.

Maybe it is less irritating for the client if you do not create a new window
every time, but use a frameset, or IFrame.

Any guidance on which route, or any other for that matter and how I
might implement them would be greatly appreciated


hope this helped.

Regards,
Erwin Moller
Jul 17 '05 #2
Paul Eden wrote:
I'm using input.htm to take some data using radio and a text field
from the user, which then "get"s them to update.php.
Now then, there is a lot of data to input, so i need to go back to
input.htm repeatedly
Then why don't you use a php file (let's call it "input.php") that submits
the data to itself. That way you can enter a new set of data straight away
while the server gets on with whatever process it has to do. If you like,
you can get the server to populate the form with the data you entered last
time you submitted it.
so, at the bottom of update.php, there is an
image which has a javascript onload command, that loads up update.php.
That sounds ugly. You've got a page that loads itself into an image? What
for?
You probably know where this is going by now? After a short while, I
end up with a screen full of browsers and it's annoying me.
Why is your screen full of browsers?
What is my best way forward here? Can I make pass the data from
input.htm to update.php without it firing up a new browser
Do you mean without opening a new window? This won't happen if you avoid
using javascript pop-ups and target attributes in your links.
or should
I be thinking about how to make update.php close itself after the
javascript onload has executed?
I don't understand what you're doing here. Sorry :-(
Any guidance on which route, or any other for that matter and how I
might implement them would be greatly appreciated


Could you provide a URL so we can see what you're trying to do?

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 17 '05 #3
Erwin Moller <si******************************************@spam yourself.com> wrote in message news:<42*********************@news.xs4all.nl>...
Paul Eden wrote:

Hi Paul,
Afternoon all.
I wonder if someone might lend a little hand here?
Of course, this is the most friendly NG you'll ever find. :-)

I'm using input.htm to take some data using radio and a text field
from the user, which then "get"s them to update.php.


That is by POSTing, right?


<form method=get action="update.php">
Now then, there is a lot of data to input, so i need to go back to
input.htm repeatedly, so, at the bottom of update.php, there is an
image which has a javascript onload command, that loads up update.php.
What do you mean?
Is the form submitted by the user pressing a submit-button (or image), or is
the form submitted automatically by some onLoad-event?

If the latter, you need to explain why, because that is confusing (to me).
Why?
Because I do not see the point in submitting a form when the client didn't
fill it first.

The user presses the form object "submit". I mention the onload
command because it's used to *reopen* the input.htm (not update.php
like I previously said). You were rightly confused!

You probably know where this is going by now? After a short while, I
end up with a screen full of browsers and it's annoying me.
Why is that happening?
If you submit the form, did you gave a certain target (= new window)???


I used default (in other words, I didn't specify a target) , which
presumably is new window. If its possible to specify self, this may be
the solution?

if your target is the same name, the same window will be recycled.
The new result of update.php will be displayed.

What is my best way forward here? Can I make pass the data from
input.htm to update.php without it firing up a new browser, or should
I be thinking about how to make update.php close itself after the
javascript onload has executed?
Yes, that is a solution.
I take it your update.php is not producing any relevant output?
In that case, just let JS close the window.

<html>
<body onLoad="self.close();">
</body>
</html>

should do the trick.

It's not producing any meaningful output. Mostly debugg stuff that I
haven't got around to removing yet.
Question reference onload="self.close". Can I be assured that the
browser will close *after* it's php has executed?
I did try having an image at the bottom of the page. Having used an
image with an onload behaviour (dreamweaver) to fire up input.htm, I
tried to add another image below it with onload self close.
Unfortunately it produced an error. Not from the parser, but in the
status bar, I got the little yellow ! mark. I clikced it and
;"Problems with this webpage may prevent it displaying properly blah
blah." "Error at line 5, object expected."
Line 5 is where I put a pragma meta tag to prevent caching (to make
sure the images loaded last). Most odd.

Maybe it is less irritating for the client if you do not create a new window
every time, but use a frameset, or IFrame.
Yes. Good point. I'll look into that.

Any guidance on which route, or any other for that matter and how I
might implement them would be greatly appreciated


hope this helped.

Regards,
Erwin Moller


Indeed it did. Many thanks Erwin,

Paul
Jul 17 '05 #4
Philip Ronan <in*****@invalid.invalid> wrote in message news:<BE6F4B0B.2D2A9%in*****@invalid.invalid>...
Paul Eden wrote:
I'm using input.htm to take some data using radio and a text field
from the user, which then "get"s them to update.php.
Now then, there is a lot of data to input, so i need to go back to
input.htm repeatedly


Then why don't you use a php file (let's call it "input.php") that submits
the data to itself. That way you can enter a new set of data straight away
while the server gets on with whatever process it has to do. If you like,
you can get the server to populate the form with the data you entered last
time you submitted it.
so, at the bottom of update.php, there is an
image which has a javascript onload command, that loads up update.php.


That sounds ugly. You've got a page that loads itself into an image? What
for?
You probably know where this is going by now? After a short while, I
end up with a screen full of browsers and it's annoying me.


Why is your screen full of browsers?
What is my best way forward here? Can I make pass the data from
input.htm to update.php without it firing up a new browser


Do you mean without opening a new window? This won't happen if you avoid
using javascript pop-ups and target attributes in your links.
or should
I be thinking about how to make update.php close itself after the
javascript onload has executed?


I don't understand what you're doing here. Sorry :-(
Any guidance on which route, or any other for that matter and how I
might implement them would be greatly appreciated


Could you provide a URL so we can see what you're trying to do?


Yeah, sorry. I'm not being very clear. Let me start again.

In a FPS game my clan plays and the game awards points. I wanted to
take the points awarded and make a league, so we could see who was
best.

So, I have input.htm, which has a form. Firstly, the user selects
which player they are entering a score for (radio button) then a
textspace to enter the score. When they click submit, input.htm sends
the playerid and score to update.php, which reads the player/score
datafile and writes it back to disk.

Now. update.php has, at the bottom of the page, an image, with a
javascript onload command that tells is to reload input.htm, as there
as more scores to enter.

The problem is, that the onload fires up a new browser, when I'd like
it to be in the same one. My current form of attack is to use the
<body close> as suggested earlier, to automatically close update.php.
This does sort of have the required effect, except that as the new
browser opens and the old one closes, it "marches" across the screen.

Obviously, this is pretty inelegant. Ideally, the java onload would be
told to use itself as a target browser.
Jul 17 '05 #5
It sounds like you're making this WAY too hard. You can just have the
page submit to itself. i'd just put at the very top of the page:

<?php
if ($submit) {
//enter scores...
}
?>

then

<form action="<?php echo $PHP_SELF; ?>" method="post">
.... form stuff...
<input type=submit name=submit value=submit>
</form>

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Michael J. Moore | last post by:
Is it the listener process, or some other Oracle process. Also, on a UNIX system, when you do "ps -ef" to see your processes, the PPID points back to a process named "init". Why does the PPID not...
2
by: TonyJeffs | last post by:
I'm new to this, and stole/doctored my code from the "Ugly JavaScript Handbook" I have a slide show program. First theres stuff to set up the array, and the time between slides Then a function...
111
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: ...
8
by: Mike | last post by:
I have a page with the following code (just the essentials...) Anyway, the style sheet loads and formats perfectly locally on all my test browsers (IE 6, NS 7.1, K-Meleon, Phoenix/Mozilla, Opera),...
16
by: Harlan Messinger | last post by:
1. CSS has five generic font family specifiers: serif, sans-serif, cursive, fantasy, monospace. IE lets the users select a default proportional font and a default monospace font. Is there any way...
5
by: Steve | last post by:
Is it possible to close a page using Javascript that will close *after* the page is loaded (it's an ASP page that performs an action).
133
by: Alan Silver | last post by:
Hello, Just wondered what range of browsers, versions and OSs people are using to test pages. Also, since I don't have access to a Mac, will I have problems not being able to test on any Mac...
6
by: Tarun Mistry | last post by:
Hi everyone, thought my current testing, it seems a new session is opened for a user per browser window. I would like my sessions to track based on the machine, i.e. once per machine. What...
2
dlite922
by: dlite922 | last post by:
What do you use to view your page in atleast the minimum browsers: FF, IE6, IE7 ? I tried IE7 Standalone and was buggy, re-installed my OS (XP) and I'm looking for something that let's me view...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.