473,698 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two questions...

1/. Can anyone tell me why renaming a function from 'update()' to
'form_update()' makes Safari work when it didn't before?
2/. I would LIKE if possible, to do the following.

User is filling in a BIG form. MYSQL/PHP generated. he finds that the
option he needs in a select statement isn't there, and needs to be added
via a different form.

I can easily spawn a new window to do this, but what I need to happen is

- new window opens in NEW WINDOW - not new tab..even if that's how the
browser is configured.

- on shutting down new window..yea even unto clicking on it's corner and
saying 'close' , the main program window can be forced to reload its
data, to pick up the changes.

I am very unsure of inter-window communications, and could use any
pointers...
Sep 12 '07 #1
11 1283
The Natural Philosopher wrote:
1/. Can anyone tell me why renaming a function from 'update()' to
'form_update()' makes Safari work when it didn't before?
Hi,

First question: I have no clue.
Safari? I gave up on Safari and JavaScript a long time ago.
Maybe Apple upgraded it to a better browser lately?

>

2/. I would LIKE if possible, to do the following.

User is filling in a BIG form. MYSQL/PHP generated. he finds that the
option he needs in a select statement isn't there, and needs to be added
via a different form.
OK.
>
I can easily spawn a new window to do this, but what I need to happen is

- new window opens in NEW WINDOW - not new tab..even if that's how the
browser is configured.
As far as I know, the tabbed opening of a new window only happens when
you do not give dimensions.
If you do, it opens a real new window (not tabbed).

Could open in tab:
window.open("in dex.php","testi ng");

Will NOT open in tab:
window.open("in dex.php","testi ng","width=300, height=300");

>
- on shutting down new window..yea even unto clicking on it's corner and
saying 'close' , the main program window can be forced to reload its
data, to pick up the changes.
Have a look at the unOnload event handler.
You can write something like this:

in popup window:
<body onUnload="refre shDaddyPlease() ;">

<script type="text/javascript">
function refreshDaddyPle ase(){
opener.location .reload(true);
}
</script>

The true in reload(true) means force reloads, even if the http-header
If-Modified_since says otherwise.

>
I am very unsure of inter-window communications, and could use any
pointers...
Well, basic inter-window communication is simple.
eg:
[from openerpage]
var myRefToNewWindo w = window.open("in dex.php","testi ng");

Now you can use myRefToNewWindo w whenever you want to address the new
window. You can also call its javascript functions, eg:
myRefToNewWindo w.someFunction( "testing");

From the popup window, simply use the keyword 'opener' to find the
window that did it.

Good luck!

Regards,
Erwin Moller
Sep 12 '07 #2
Erwin Moller wrote:
<snip>
Have a look at the unOnload event handler.
You can write something like this:
Correction: The event handler is NOT called unOnload, but onUnload.
But you figured that yourself already probably.
;-)

Regards,
Erwin Moller
Sep 12 '07 #3
On Sep 12, 10:43 am, The Natural Philosopher <a...@b.cwrot e:
1/. Can anyone tell me why renaming a function from 'update()' to
'form_update()' makes Safari work when it didn't before?
Not without the context. The balance of probability is that you were
referring to the function from an event handler generated from an
intrinsic event attributer and the scope chain that the browser
generated for the event handling function it built from the attribute
value included an object with an - update - property above the global
object.
2/. I would LIKE if possible, to do the following.

User is filling in a BIG form. MYSQL/PHP generated. he finds that the
option he needs in a select statement isn't there, and needs to be added
via a different form.

I can easily spawn a new window to do this,
Not in the sense of expecting an attempt to open a new window to be
successful.
but what I need to happen is

- new window opens in NEW WINDOW - not new tab..
Too late. The new window/tab distinction is (where available)
exclusively under user control.
even if that's how the
browser is configured.
Hard luck.
- on shutting down new window..yea even unto clicking on it's
corner and saying 'close' , the main program window can be
forced to reload its data, to pick up the changes.
So that is two inevitable HTTP request/response pairs and two sets of
processing HTML into displayed forms. In which case why not have the
existing window show the new form and then return to the old form when
it is submitted (with the data from the old form stored in the user's
session on the server in the interim)?
I am very unsure of inter-window communications, and could use any
pointers...
Avoid it like the plague.

Sep 12 '07 #4
Erwin Moller wrote:
Thomas 'PointedEars' Lahn wrote:
>Erwin Moller wrote:
>>Will NOT open in tab:
window.open(" index.php","tes ting","width=30 0,height=300");
Wrong.

[...]
Wrong?
Yes.
Care to explain that a little more?
It is wrong that the above call will necessarily not open a new tab.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8************ *******@news.de mon.co.uk>
Sep 12 '07 #5
Thomas 'PointedEars' Lahn wrote:
Erwin Moller wrote:
>Thomas 'PointedEars' Lahn wrote:
>>Erwin Moller wrote:
Will NOT open in tab:
window.open( "index.php","te sting","width=3 00,height=300") ;
Wrong.
[...]
Wrong?

Yes.
>Care to explain that a little more?

It is wrong that the above call will necessarily not open a new tab.
Well, that clears it all up then.... NOT.
Did you care to test the samplescript?
Why don't you explain why you think it is wrong?
I did those tests on ff2 and ie7, you know, and I saw the results.

Don't get me wrong, I don't question your experience with javascript.
I know you know a lot, but your educational abilities leave somewhat to
be desired.
You might throw in a little more, like: "but it is not RFC xxy" or
"doesn't work like that in Safari/opera/Lynx".

Regards,
Erwin Moller
>

PointedEars
Sep 12 '07 #6
Erwin Moller wrote:
Thomas 'PointedEars' Lahn wrote:
>Erwin Moller wrote:
>>Thomas 'PointedEars' Lahn wrote:
Erwin Moller wrote:
Will NOT open in tab:
window.open ("index.php","t esting","width= 300,height=300" );
Wrong.
[...]
Wrong?
Yes.
>>Care to explain that a little more?
It is wrong that the above call will necessarily not open a new tab.

Well, that clears it all up then.... NOT.
Did you care to test the samplescript?
No, I did not need to. I used very similar code more often than you can
imagine.
Why don't you explain why you think it is wrong?
Because the correct explanation was already given by another person in this
thread.
I did those tests on ff2 and ie7, you know, and I saw the results.
So? You have tested with a very small subset of Web browsers (you did not
even include a non-browser UA), and saw your assumption confirmed. Why
would that be confirming your assumption for the general case? Don't answer
-- it does not.
Don't get me wrong, I don't question your experience with javascript.
I know you know a lot, but your educational abilities leave somewhat to
be desired.
Since when is this a J(ava)Script school? Am I being paid to sacrifice
free/business time to teach someone?
You might throw in a little more, like: "but it is not RFC xxy" or
"doesn't work like that in Safari/opera/Lynx".
For example, it does not work with Firefox 2.0.0.6 when the Tab Mix Plus
extension is installed and appropriately configured.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Sep 12 '07 #7
Erwin Moller wrote:
The Natural Philosopher wrote:
>1/. Can anyone tell me why renaming a function from 'update()' to
'form_update() ' makes Safari work when it didn't before?

Hi,

First question: I have no clue.
Safari? I gave up on Safari and JavaScript a long time ago.
Maybe Apple upgraded it to a better browser lately?

>>

2/. I would LIKE if possible, to do the following.

User is filling in a BIG form. MYSQL/PHP generated. he finds that the
option he needs in a select statement isn't there, and needs to be
added via a different form.

OK.
>>
I can easily spawn a new window to do this, but what I need to happen is

- new window opens in NEW WINDOW - not new tab..even if that's how the
browser is configured.

As far as I know, the tabbed opening of a new window only happens when
you do not give dimensions.
If you do, it opens a real new window (not tabbed).

Could open in tab:
window.open("in dex.php","testi ng");

Will NOT open in tab:
window.open("in dex.php","testi ng","width=300, height=300");

>>
- on shutting down new window..yea even unto clicking on it's corner
and saying 'close' , the main program window can be forced to reload
its data, to pick up the changes.

Have a look at the unOnload event handler.
You can write something like this:

in popup window:
<body onUnload="refre shDaddyPlease() ;">

<script type="text/javascript">
function refreshDaddyPle ase(){
opener.location .reload(true);
}
</script>

The true in reload(true) means force reloads, even if the http-header
If-Modified_since says otherwise.

>>
I am very unsure of inter-window communications, and could use any
pointers...

Well, basic inter-window communication is simple.
eg:
[from openerpage]
var myRefToNewWindo w = window.open("in dex.php","testi ng");

Now you can use myRefToNewWindo w whenever you want to address the new
window. You can also call its javascript functions, eg:
myRefToNewWindo w.someFunction( "testing");

From the popup window, simply use the keyword 'opener' to find the
window that did it.

Good luck!

Regards,
Erwin Moller
Thanks Erwin.
That's the key phrases I needed.. I can 'keeep buggering on' and make
that lot work fine.
Sep 12 '07 #8
Bart Van der Donck said the following on 9/12/2007 1:26 PM:
Thomas 'PointedEars' Lahn wrote:
>Erwin Moller wrote:
>>Philosopher needed a popup to add some stuff to a big form.
What makes you think he wants a popup window for a non-browser
agent? I think that is a farfetched remote possibility,
and the OP would have stated it if that was the case.
Non sequitur.

Some common sense would suit you.
Don't get your hopes up, he has been told that for about 3-4 years now.
>>And IE & FF are a small subset of webbrowsers?
Yes, they are. Two out of a dozen, at the minimum.

No, they are not. MSIE/FF are the De Facto browsers.

MSIE & FF are a subset = right.
MSIE & FF are a small subset = wrong.
He is going to reply back with a pedant about other OS'es and that 2 is
a small subset of 12.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 12 '07 #9
The Natural Philosopher wrote:
<snip>
Indeed. It isn't even for public consumption really.
Its for an internal database.
If you are going to ask people for advice on a subject where design and
implementation decisions should be largely context driven it would be a
very good idea if you stated the real context along with the questions.
Otherwise you are just wasting people's time. It is the case that this
group's FAQ sates that the default assumption about the context will be
that questions asked relate to public web use if not stated otherwise.

<snip>
I was looking for practical solutions, and Erwins
response is practical.
<snip>

You state that you did not want the 'new window' opening in a new tab.
You can take no action that will prevent that (even on the small sub-set
of browsers that interest you) as the users of some of those browsers
have an absolute veto on the outcome of window opening attempts. The
practical advice is to design a system that does not need to be opening
new windows, and in a controlled intranet context there are at least a
couple of ways of achieving that.

Richard.

Sep 12 '07 #10

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

Similar topics

0
4096
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for all companies between year 2000-2005 in my website http://www.geocities.com/allinterviewquestion/ So please have a look and make use of it.
0
4591
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
7218
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
4
2510
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for cross-posting. I am trying to build a "checklist", where a user can navigate to an ASP page on the intranet which shows a list of "questions" that the user can check off. I am trying to figure out how to do this so that it is scalable, but I am...
8
7977
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying to catch up again with Python. I am now appearing for Job Interviews these days and I am wondering if anybody of you appeared for a Python Interview. Can you please share the questions you were asked. That will be great help to me.
0
1495
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html C# Interview Questions and Answers 5...
1
1620
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html C# Interview Questions and Answers 5...
0
4499
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html C# Interview Questions and Answers 6 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html C# Interview Questions and Answers 5...
0
3428
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions http://interviewdoor.com/technical/C-Interview-Questions.htm C# Interview Questions http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm C++ Interview Questions http://interviewdoor.com/technical/C++-Interview-Questions.htm
0
2940
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions http://interviewdoor.com/technical/C-Interview-Questions.htm C# Interview Questions http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm C++ Interview Questions http://interviewdoor.com/technical/C++-Interview-Questions.htm
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.