Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > window.close()

Reply
Thread Tools

window.close()

 
 
mcnewsxp
Guest
Posts: n/a
 
      11-21-2010

"Jonathan N. Little" <(E-Mail Removed)> wrote in message
news:icbau8$dmm$(E-Mail Removed)-september.org...
> mcnewsxp wrote:
>> "Jonathan N. Little"<(E-Mail Removed)> wrote in message
>> news:ic8q1c$mmc$(E-Mail Removed)-september.org...
>>> mcnewsxp wrote:
>>>> "Dylan Parry"<(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)-september.org...
>>>>> "mcnewsxp"<(E-Mail Removed)> wrote:
>>>
>>>>
>>>> sweet.
>>>
>>> Dylan is correct. There could be countless reasons why you are having
>>> problems which your little fragments just do not provide enough detail
>>> to
>>> diagnose. It is like calling up your mechanic and saying "my car will
>>> not
>>> start" and then expect a solution from him.
>>>
>>> BTW before you do it, posting ALL your markup is not equivalent to
>>> posting
>>> a URL from a web server...
>>>
>>> --

>>
>> unfortuneately the websites i work on are not public. they require
>> logging
>> in with UID and PW. our development sites are internal and require using
>> citrix or other remote desktop or actually being on site.
>> also, i think i described what i needd in a simple enough way that dylan
>> parry was able to answer my question, tho he wasn't able to resist giving
>> me
>> a pinch of grief. ;^)
>>
>>

>
> I find it amazing that folks that cry for help with problem they admit
> they *do not know the cause*, yet are so confident in their ability it
> isolate the *exact* bit of code which contains the problem.
>
> I will offer a tip knowing full well it will be ignored: If your project
> is on a private|passworded|intranet|top-secret-spy site and you want
> assistance in debugging. Do not post code fragments. Find a public server
> (there are freebies out there) to post "sanitized" examples that exhibit
> the same problem as you are witnessing with your "inaccessible" site.
>
>


yea, but i am certain that i did have a bug. i think what i was
experiencing is what is supposed to happen when you have an onclick method
for your button and a POST action for the form. both events fire. i
haven't tried adding the return false bit yet, i knew that someone must've
experienced this behavior and knew what to do about it. that's all.
for the future - can you suggest a place i can post code for you all to see?
best,
mike


 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      11-21-2010
In article <icbau8$dmm$(E-Mail Removed)-september.org>,
"Jonathan N. Little" <(E-Mail Removed)> wrote:

> I will offer a tip knowing full well it will be ignored: If your project
> is on a private|passworded|intranet|top-secret-spy site and you want
> assistance in debugging. Do not post code fragments. Find a public
> server (there are freebies out there) to post "sanitized" examples that
> exhibit the same problem as you are witnessing with your "inaccessible"
> site.


And in the process, you can often spot what fixes it.

--
dorayme
 
Reply With Quote
 
 
 
 
mcnewsxp
Guest
Posts: n/a
 
      11-22-2010
On Nov 21, 12:50*pm, "mcnewsxp" <(E-Mail Removed)> wrote:
> "Jonathan N. Little" <(E-Mail Removed)> wrote in messagenews:icbau8$dmm$(E-Mail Removed)-september.org...
>
>
>
> > mcnewsxp wrote:
> >> "Jonathan N. Little"<(E-Mail Removed)> *wrote in message
> >>news:ic8q1c$mmc$(E-Mail Removed)-september.org...
> >>> mcnewsxp wrote:
> >>>> "Dylan Parry"<(E-Mail Removed)> * wrote in message
> >>>>news:(E-Mail Removed)-september.org...
> >>>>> "mcnewsxp"<(E-Mail Removed)> * wrote:

>
> >>>> sweet.

>
> >>> Dylan is correct. There could be countless reasons why you are having
> >>> problems which your little fragments just do not provide enough detail
> >>> to
> >>> diagnose. It is like calling up your mechanic and saying "my car will
> >>> not
> >>> start" and then expect a solution from him.

>
> >>> BTW before you do it, posting ALL your markup is not equivalent to
> >>> posting
> >>> a URL from a web server...

>
> >>> --

>
> >> unfortuneately the websites i work on are not public. *they require
> >> logging
> >> in with UID and PW. *our development sites are internal and require using
> >> citrix or other remote desktop or actually being on site.
> >> also, i think i described what i needd in a simple enough way that dylan
> >> parry was able to answer my question, tho he wasn't able to resist giving
> >> me
> >> a pinch of grief. * ;^)

>
> > I find it amazing that folks that cry for help with problem they admit
> > they *do not know the cause*, yet are so confident in their ability it
> > isolate the *exact* bit of code which contains the problem.

>
> > I will offer a tip knowing full well it will be ignored: If your project
> > is on a private|passworded|intranet|top-secret-spy site and you want
> > assistance in debugging. *Do not post code fragments. Find a public server
> > (there are freebies out there) to post "sanitized" examples that exhibit
> > the same problem as you are witnessing with your "inaccessible" site.

>
> yea, but i am certain that i did have a bug. *i think what i was
> experiencing is what is supposed to happen when you have an onclick method
> for your button and a POST action for the form. *both events fire. *i
> haven't tried adding the return false bit yet, i knew that someone must've
> experienced this behavior and knew what to do about it. *that's all.
> for the future - can you suggest a place i can post code for you all to see?
> best,
> mike


certain that i did NOT have a bug (dang fumble fingers never proof
read). what i described is the way it works and what i needed was a
work around - not a bug fix. so stating that you either have
encountered this or not is not being flippant.
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      11-22-2010
mcnewsxp wrote:
> On Nov 21, 12:50 pm, "mcnewsxp"<(E-Mail Removed)> wrote:
>> "Jonathan N. Little"<(E-Mail Removed)> wrote in messagenews:icbau8$dmm$(E-Mail Removed)-september.org...
>>
>>
>>
>>> mcnewsxp wrote:
>>>> "Jonathan N. Little"<(E-Mail Removed)> wrote in message
>>>> news:ic8q1c$mmc$(E-Mail Removed)-september.org...
>>>>> mcnewsxp wrote:



>>> I will offer a tip knowing full well it will be ignored: If your project
>>> is on a private|passworded|intranet|top-secret-spy site and you want
>>> assistance in debugging. Do not post code fragments. Find a public server
>>> (there are freebies out there) to post "sanitized" examples that exhibit
>>> the same problem as you are witnessing with your "inaccessible" site.

>>
>> yea, but i am certain that i did have a bug. i think what i was
>> experiencing is what is supposed to happen when you have an onclick method
>> for your button and a POST action for the form. both events fire. i
>> haven't tried adding the return false bit yet, i knew that someone must've
>> experienced this behavior and knew what to do about it. that's all.
>> for the future - can you suggest a place i can post code for you all to see?
>> best,
>> mike

>
> certain that i did NOT have a bug (dang fumble fingers never proof
> read). what i described is the way it works and what i needed was a
> work around - not a bug fix. so stating that you either have
> encountered this or not is not being flippant.



Hmmm you are certain you have a bug, your are certain you do not have a
bug. Well at least we know you are "certain".

Here is why I was flippant, sure I have seen the behavior you describe.
The problem is it is vague. There is nearly a countless number of
reasons why your are not trapping an event, without actually "seeing" an
example any "solution" would be a WAG. Event bubbling or capture, which
browsers, how are you trapping the event, what is the DOM structure that
the event traverses...

So again, <flippant purpose="illustrate my point">"my car won't start so
tell me what is wrong with provided info..."</flippant>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
mcnewsxp
Guest
Posts: n/a
 
      11-22-2010
On Nov 22, 9:27*am, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> mcnewsxp wrote:
> > On Nov 21, 12:50 pm, "mcnewsxp"<(E-Mail Removed)> *wrote:
> >> "Jonathan N. Little"<(E-Mail Removed)> *wrote in messagenews:icbau8$dmm$(E-Mail Removed)-september.org...

>
> >>> mcnewsxp wrote:
> >>>> "Jonathan N. Little"<(E-Mail Removed)> * *wrote in message
> >>>>news:ic8q1c$mmc$(E-Mail Removed)-september.org...
> >>>>> mcnewsxp wrote:
> >>> I will offer a tip knowing full well it will be ignored: If your project
> >>> is on a private|passworded|intranet|top-secret-spy site and you want
> >>> assistance in debugging. *Do not post code fragments. Find a public server
> >>> (there are freebies out there) to post "sanitized" examples that exhibit
> >>> the same problem as you are witnessing with your "inaccessible" site.

>
> >> yea, but i am certain that i did have a bug. *i think what i was
> >> experiencing is what is supposed to happen when you have an onclick method
> >> for your button and a POST action for the form. *both events fire. *i
> >> haven't tried adding the return false bit yet, i knew that someone must've
> >> experienced this behavior and knew what to do about it. *that's all.
> >> for the future - can you suggest a place i can post code for you all to see?
> >> best,
> >> mike

>
> > certain that i did NOT have a bug (dang fumble fingers never proof
> > read). *what i described is the way it works and what i needed was a
> > work around - not a bug fix. *so stating that you either have
> > encountered this or not is not being flippant.

>
> Hmmm you are certain you have a bug, your are certain you do not have a
> bug. Well at least we know you are "certain".
>
> Here is why I was flippant, sure I have seen the behavior you describe.
> The problem is it is vague. There is nearly a countless number of
> reasons why your are not trapping an event, without actually "seeing" an
> example any "solution" would be a WAG. Event bubbling or capture, which
> browsers, how are you trapping the event, what is the DOM structure that
> the event traverses...
>
> So again, <flippant purpose="illustrate my point">"my car won't start so
> tell me what is wrong with provided info..."</flippant>
>
> --


yes, but a form that has an action method and a button that has an
onclick method that closes the window surely must be a common thing on
an HTML page. the onclick fires then the form's action method fires.
how many variations of that could there be? none? adding return
false; solved my problem - without having to view the URL.
so there was no bug, but i was ignorant about a particular behavior
and now i am not. so i tried to frame my question with enough info to
get the help i needed therefore i don't think your car analogy is apt.
 
Reply With Quote
 
Mayeul
Guest
Posts: n/a
 
      11-22-2010
On 22/11/2010 15:51, mcnewsxp wrote:
> yes, but a form that has an action method and a button that has an
> onclick method that closes the window surely must be a common thing on
> an HTML page. the onclick fires then the form's action method fires.
> how many variations of that could there be? none?


No, zero is what you get if you divide an int N by the number of variations.

--
Mayeul
 
Reply With Quote
 
mcnewsxp
Guest
Posts: n/a
 
      11-22-2010
On Nov 19, 12:40*pm, "mcnewsxp" <(E-Mail Removed)> wrote:
> when i set the onclick method of my button to "javascript:window.close()"
> the cancel button fires, but my form's action method fires and opens the
> page in the action method (bipassing my validation script - but that's
> another problem) anyway.
> what's the way to make this work right?
>
> note: if this isn't enough detail please don't ask for URL or feel you need
> to comment. *you've either worked this one out before or not.
>
> peace & tia,
> mcnewsxp


of course then there's firefox....
something to do with window.close won't close unless window.open is
used?
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      11-22-2010
mcnewsxp <(E-Mail Removed)> wrote:
> of course then there's firefox....
> something to do with window.close won't close unless window.open is
> used?


Most browsers won't allow you to close a window with JavaScript unless
it was opened by a script to begin with, and they're not supposed to
either.

--
Dylan Parry
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      11-23-2010
Gazing into my crystal ball I observed "mcnewsxp"
<(E-Mail Removed)> writing in
news:icb4ko$pvq$(E-Mail Removed)-september.org:

>
> "Jonathan N. Little" <(E-Mail Removed)> wrote in message
> news:ic8q1c$mmc$(E-Mail Removed)-september.org...
>> mcnewsxp wrote:
>>> "Dylan Parry"<(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)-sep
>>> tember.org...
>>>> "mcnewsxp"<(E-Mail Removed)> wrote:

>>
>>>
>>> sweet.

>>
>> Dylan is correct. There could be countless reasons why you are having
>> problems which your little fragments just do not provide enough
>> detail to diagnose. It is like calling up your mechanic and saying
>> "my car will not start" and then expect a solution from him.
>>
>> BTW before you do it, posting ALL your markup is not equivalent to
>> posting a URL from a web server...
>>
>> --

>
> unfortuneately the websites i work on are not public. they require
> logging in with UID and PW. our development sites are internal and
> require using citrix or other remote desktop or actually being on
> site. also, i think i described what i needd in a simple enough way
> that dylan parry was able to answer my question, tho he wasn't able to
> resist giving me a pinch of grief. ;^)
>
>


I'm sorry. This is going to sound rude, but I am on my second 7&7, so
here it goes.

Please try to write in an acceptable manner. Use correct grammer, use
correct punctuation, check your spelling.

You will be surprised at how effective this is when trying to get a
useful response from others. It's a matter of respect.

Be careful, also, to correctly spell a person's name, especially when
that person was "able to answer my question". Again, it's a matter of
respect. How would you feel if I referred to you as mdacousticgitar?

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      11-23-2010
mcnewsxp wrote:

> the onclick fires then the form's action method fires.
> how many variations of that could there be?


<snip>

> so i tried to frame my question with enough info to
> get the help i needed therefore i don't think your car analogy is apt.



Obviously more than you understand. Which event model are you using?
Which browsers have the problem? How was the window first opened. How is
is being closed? The code? With a button? Do you mean a <button> element
or a <input type="submit">? How are you trapping the event? How did you
attach the JavaScript, hard-coded or via addEventListener & attachEvent?
On which element and on which event?

So yes, my car analogy is most apt.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments